Skip to content

Commit 1b75ef3

Browse files
committed
added check scan script
1 parent c473211 commit 1b75ef3

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/checkov.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Checkov Scan
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
checkov-scan:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.9'
21+
22+
- name: Install Checkov
23+
run: pip install checkov
24+
25+
- name: Write skip checks config
26+
run: echo "${{ vars.CHECKOV_SKIP_CHECKS }}" > checkov-skip.yml
27+
28+
- name: Run Checkov scan
29+
run: |
30+
checkov -d . --output cli --output sarif --output-file-path console,results.sarif
31+
continue-on-error: true
32+
33+
- name: Upload SARIF file
34+
uses: github/codeql-action/upload-sarif@v3
35+
with:
36+
sarif_file: results.sarif

0 commit comments

Comments
 (0)