Skip to content

Commit 7780a10

Browse files
authored
chore: add codeql workflow (#12)
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
1 parent 171145b commit 7780a10

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

.github/workflows/check-actions.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
name: Check actions
44

5-
permissions: {}
5+
# permissions: {}
66

77
on:
88
pull_request:

.github/workflows/codeql.yaml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
3+
name: CodeQL
4+
5+
# permissions: {}
6+
7+
on:
8+
pull_request:
9+
branches:
10+
- main
11+
push:
12+
branches:
13+
- main
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
required:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
security-events: write
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27+
with:
28+
fetch-depth: 0
29+
- name: Run Trivy vulnerability scanner in repo mode
30+
uses: aquasecurity/trivy-action@d43c1f16c00cfd3978dde6c07f4bbcf9eb6993ca # v0.16.1
31+
with:
32+
scan-type: fs
33+
ignore-unfixed: false
34+
format: sarif
35+
output: trivy-results.sarif
36+
severity: CRITICAL,HIGH,MEDIUM
37+
scanners: vuln,secret
38+
exit-code: '0'
39+
vuln-type: os,library
40+
- name: Upload Trivy scan results to GitHub Security tab
41+
uses: github/codeql-action/upload-sarif@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4
42+
with:
43+
sarif_file: trivy-results.sarif
44+
category: code

0 commit comments

Comments
 (0)