File tree 3 files changed +40
-10
lines changed
3 files changed +40
-10
lines changed Original file line number Diff line number Diff line change 1
- name : Validate AZD template
1
+ name : Validate bicep templates
2
2
on :
3
3
push :
4
4
branches :
5
5
- main
6
6
paths :
7
- - " infra/** "
7
+ - " **/*.bicep "
8
8
pull_request :
9
9
branches :
10
10
- main
11
11
paths :
12
- - " infra/** "
12
+ - " **/*.bicep "
13
13
workflow_dispatch :
14
14
15
15
jobs :
@@ -21,15 +21,23 @@ jobs:
21
21
- name : Checkout
22
22
uses : actions/checkout@v4
23
23
24
- - name : Run Microsoft Security DevOps Analysis
25
- uses : microsoft/security-devops-action@preview
26
- id : msdo
27
- continue-on-error : true
24
+ - name : Run PSRule analysis
25
+
28
26
with :
29
- tools : templateanalyzer
27
+ modules : PSRule.Rules.Azure
28
+ baseline : Azure.Pillar.Security
29
+ inputPath : infra/*.test.bicep
30
+ outputFormat : Sarif
31
+ outputPath : reports/ps-rule-results.sarif
32
+ summary : true
33
+ continue-on-error : true
34
+
35
+ env :
36
+ PSRULE_CONFIGURATION_AZURE_BICEP_FILE_EXPANSION : ' true'
37
+ PSRULE_CONFIGURATION_AZURE_BICEP_FILE_EXPANSION_TIMEOUT : ' 30'
30
38
31
- - name : Upload alerts to Security tab
39
+ - name : Upload results to security tab
32
40
uses : github/codeql-action/upload-sarif@v3
33
41
if : github.repository_owner == 'Azure-Samples'
34
42
with :
35
- sarif_file : ${{ steps.msdo.outputs.sarifFile }}
43
+ sarif_file : reports/ps-rule-results.sarif
Original file line number Diff line number Diff line change
1
+ // This file is for doing static analysis and contains sensible defaults
2
+ // for the bicep analyser to minimise false-positives and provide the best results.
3
+
4
+ // This file is not intended to be used as a runtime configuration file.
5
+
6
+ targetScope = 'subscription'
7
+
8
+ param environmentName string = 'testing'
9
+ param location string = 'westus2'
10
+
11
+ module main 'main.bicep' = {
12
+ name : 'main'
13
+ params : {
14
+ environmentName : environmentName
15
+ location : location
16
+ }
17
+ }
Original file line number Diff line number Diff line change
1
+ # YAML: Set the AZURE_BICEP_FILE_EXPANSION configuration option to enable expansion
2
+ configuration :
3
+ AZURE_BICEP_FILE_EXPANSION : true
4
+ AZURE_DEPLOYMENT_NONSENSITIVE_PARAMETER_NAMES :
5
+ - resourceToken
You can’t perform that action at this time.
0 commit comments