Skip to content

Commit b5df8e2

Browse files
authored
Merge pull request #1022 from mprpic/add-codeql-scanning
ci: add CodeQL static analysis workflow
2 parents 5a49262 + be4ae09 commit b5df8e2

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

.github/workflows/codeql.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# CodeQL static analysis for security vulnerabilities
2+
# https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning
3+
4+
name: CodeQL
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
pull_request:
11+
branches:
12+
- main
13+
schedule:
14+
# Run weekly on Monday at 02:00 UTC
15+
- cron: "0 2 * * 1"
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
analyze:
22+
name: Analyze
23+
runs-on: ubuntu-latest
24+
25+
permissions:
26+
security-events: write
27+
contents: read
28+
actions: read
29+
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
language:
34+
- python
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
39+
40+
- name: Initialize CodeQL
41+
uses: github/codeql-action/init@7fc1baf373eb073c686865bd453d412d506a05a2 # v3
42+
with:
43+
languages: ${{ matrix.language }}
44+
45+
- name: Autobuild
46+
uses: github/codeql-action/autobuild@7fc1baf373eb073c686865bd453d412d506a05a2 # v3
47+
48+
- name: Perform CodeQL Analysis
49+
uses: github/codeql-action/analyze@7fc1baf373eb073c686865bd453d412d506a05a2 # v3
50+
with:
51+
category: "/language:${{ matrix.language }}"

0 commit comments

Comments
 (0)