This commit is contained in:
Bernie White 2023-11-16 13:46:36 +10:00 коммит произвёл GitHub
Родитель 9a06edaa89
Коммит 1513c48df8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 26 добавлений и 1 удалений

20
.github/workflows/azure-analyze.yaml поставляемый
Просмотреть файл

@ -37,3 +37,23 @@ jobs:
uses: microsoft/ps-rule@v2.9.0 uses: microsoft/ps-rule@v2.9.0
with: with:
modules: PSRule.Rules.Azure modules: PSRule.Rules.Azure
outputFormat: Sarif
outputPath: reports/ps-rule-results.sarif
summary: true
# If you have GitHub Advanced Security you can upload PSRule scan results.
# Uncomment the next step to use this feature.
# - name: Upload results to security tab
# uses: github/codeql-action/upload-sarif@v2
# if: always()
# with:
# sarif_file: reports/ps-rule-results.sarif
- name: Upload results
uses: actions/upload-artifact@v3
if: always()
with:
name: PSRule-Sarif
path: reports/ps-rule-results.sarif
retention-days: 1
if-no-files-found: error

Просмотреть файл

@ -55,3 +55,4 @@ stages:
- publish: $(System.DefaultWorkingDirectory)/reports/ps-rule-results.sarif - publish: $(System.DefaultWorkingDirectory)/reports/ps-rule-results.sarif
artifact: CodeAnalysisLogs artifact: CodeAnalysisLogs
displayName: Publish SARIF logs displayName: Publish SARIF logs
condition: succeededOrFailed()

Просмотреть файл

@ -41,3 +41,4 @@ stages:
- publish: $(System.DefaultWorkingDirectory)/reports/ps-rule-results.sarif - publish: $(System.DefaultWorkingDirectory)/reports/ps-rule-results.sarif
artifact: CodeAnalysisLogs artifact: CodeAnalysisLogs
displayName: Publish SARIF logs displayName: Publish SARIF logs
condition: succeededOrFailed()

Просмотреть файл

@ -13,10 +13,13 @@ binding:
- type - type
- resourceType - resourceType
execution:
unprocessedObject: Ignore
# Require minimum versions of modules. # Require minimum versions of modules.
requires: requires:
PSRule: '@pre >=2.9.0' PSRule: '@pre >=2.9.0'
PSRule.Rules.Azure: '@pre >=1.28.2' PSRule.Rules.Azure: '@pre >=1.31.1'
# Use PSRule for Azure. # Use PSRule for Azure.
include: include: