Use PSRule for Security testing and re-enable manual testing #31
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validate AZD template | |
on: | |
push: | |
branches: [ aca-openai-agent ] | |
paths: | |
- "infra/**" | |
pull_request: | |
branches: [ main ] | |
paths: | |
- "infra/**" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build Bicep for linting | |
uses: azure/CLI@v1 | |
with: | |
inlineScript: az config set bicep.use_binary_from_path=false && az bicep build -f infra/main.bicep --stdout | |
- name: Run PSRule analysis | |
uses: microsoft/[email protected] | |
with: | |
modules: PSRule.Rules.Azure | |
baseline: Azure.Pillar.Security | |
inputPath: infra/*.test.bicep | |
outputFormat: Sarif | |
outputPath: reports/ps-rule-results.sarif | |
summary: true | |
continue-on-error: true | |
env: | |
PSRULE_CONFIGURATION_AZURE_BICEP_FILE_EXPANSION: 'true' | |
PSRULE_CONFIGURATION_AZURE_BICEP_FILE_EXPANSION_TIMEOUT: '30' | |
- name: Upload alerts to Security tab | |
uses: github/codeql-action/upload-sarif@v2 | |
if: github.repository == 'Azure-Samples/contoso-creative-writer' | |
with: | |
sarif_file: reports/ps-rule-results.sarif |