File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Checkov Bicep Scan
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+ security-events : write
12+ actions : read
13+
14+ jobs :
15+ checkov :
16+ name : Checkov Security Scan
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v4
22+
23+ - name : Set up Python
24+ uses : actions/setup-python@v5
25+ with :
26+ python-version : ' 3.x'
27+
28+ - name : Install Checkov
29+ run : |
30+ python -m pip install --upgrade pip
31+ python -m pip install checkov
32+
33+ - name : Run Checkov against lesson-05 Bicep templates
34+ run : |
35+ mkdir -p reports
36+ checkov -d lesson-05 \
37+ --framework bicep \
38+ --file-extension .bicep \
39+ --output sarif \
40+ --output-file-path reports/checkov-bicep.sarif
41+
42+ - name : Upload SARIF artifact
43+ uses : actions/upload-artifact@v4
44+ with :
45+ name : checkov-bicep-sarif
46+ path : reports/checkov-bicep.sarif
47+ if-no-files-found : error
48+
49+ - name : Upload SARIF to GitHub Code Scanning
50+ uses : github/codeql-action/upload-sarif@v3
51+ with :
52+ sarif_file : reports/checkov-bicep.sarif
You can’t perform that action at this time.
0 commit comments