Skip to content

Commit 1513c48

Browse files
authored
Fixes for pipeline #43 (#44)
1 parent 9a06eda commit 1513c48

4 files changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/azure-analyze.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,23 @@ jobs:
3737
uses: microsoft/ps-rule@v2.9.0
3838
with:
3939
modules: PSRule.Rules.Azure
40+
outputFormat: Sarif
41+
outputPath: reports/ps-rule-results.sarif
42+
summary: true
43+
44+
# If you have GitHub Advanced Security you can upload PSRule scan results.
45+
# Uncomment the next step to use this feature.
46+
# - name: Upload results to security tab
47+
# uses: github/codeql-action/upload-sarif@v2
48+
# if: always()
49+
# with:
50+
# sarif_file: reports/ps-rule-results.sarif
51+
52+
- name: Upload results
53+
uses: actions/upload-artifact@v3
54+
if: always()
55+
with:
56+
name: PSRule-Sarif
57+
path: reports/ps-rule-results.sarif
58+
retention-days: 1
59+
if-no-files-found: error

.pipelines/azure-analyze-with-monitor.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,4 @@ stages:
5555
- publish: $(System.DefaultWorkingDirectory)/reports/ps-rule-results.sarif
5656
artifact: CodeAnalysisLogs
5757
displayName: Publish SARIF logs
58+
condition: succeededOrFailed()

.pipelines/azure-analyze.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ stages:
4141
- publish: $(System.DefaultWorkingDirectory)/reports/ps-rule-results.sarif
4242
artifact: CodeAnalysisLogs
4343
displayName: Publish SARIF logs
44+
condition: succeededOrFailed()

ps-rule.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ binding:
1313
- type
1414
- resourceType
1515

16+
execution:
17+
unprocessedObject: Ignore
18+
1619
# Require minimum versions of modules.
1720
requires:
1821
PSRule: '@pre >=2.9.0'
19-
PSRule.Rules.Azure: '@pre >=1.28.2'
22+
PSRule.Rules.Azure: '@pre >=1.31.1'
2023

2124
# Use PSRule for Azure.
2225
include:

0 commit comments

Comments
 (0)