Skip to content

Commit 68c976f

Browse files
Shiva Sankarshivasurya
andauthored
chore: add checkov scan script (#653)
Add checkov scan for this repo to scan for vuln in infra. ### Checklist - CI 🟢 - [x] Follow the [manual testing process](https://github.com/sourcegraph/deploy-sourcegraph-helm/blob/main/TEST.md) - [x] Update [changelog](https://github.com/sourcegraph/deploy-sourcegraph-helm/blob/main/charts/sourcegraph/CHANGELOG.md) - [x] Update [Kubernetes update doc](https://docs.sourcegraph.com/admin/updates/kubernetes) ### Test plan - CI github action should be actively executing on all pull request <!-- As part of SOC2/GN-104 and SOC2/GN-105 requirements, all pull requests are REQUIRED to provide a "test plan". A test plan is a loose explanation of what you have done or implemented to test this, as outlined in our Testing principles and guidelines: https://docs.sourcegraph.com/dev/background-information/testing_principles Write your test plan here after the "Test plan" header. --> --------- Co-authored-by: shivasurya <[email protected]>
1 parent c473211 commit 68c976f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/checkov.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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: |
27+
echo "${{ vars.CHECKOV_SKIP_CHECKS }}" > .checkov.yaml
28+
29+
- name: Run Checkov scan
30+
run: |
31+
checkov -d ./charts --output cli --output sarif --output-file-path console,results.sarif
32+
continue-on-error: true
33+
34+
- name: Upload SARIF file
35+
uses: github/codeql-action/upload-sarif@v3
36+
with:
37+
sarif_file: results.sarif

0 commit comments

Comments
 (0)