Skip to content

Commit c354b71

Browse files
committed
Add CodeQL code scanning workflow for security analysis
1 parent 43b0838 commit c354b71

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# CodeQL code scanning workflow
2+
# Analyzes code for security vulnerabilities and coding errors
3+
4+
name: "CodeQL"
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
schedule:
12+
# Run at 6:00 UTC every Monday
13+
- cron: '0 6 * * 1'
14+
15+
jobs:
16+
analyze:
17+
name: Analyze
18+
runs-on: ubuntu-latest
19+
permissions:
20+
actions: read
21+
contents: read
22+
security-events: write
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
language: [ 'python' ]
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v6
32+
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v3
35+
with:
36+
languages: ${{ matrix.language }}
37+
# If you want to specify custom queries, uncomment and modify:
38+
# queries: security-extended,security-and-quality
39+
40+
- name: Autobuild
41+
uses: github/codeql-action/autobuild@v3
42+
43+
- name: Perform CodeQL Analysis
44+
uses: github/codeql-action/analyze@v3
45+
with:
46+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)