File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : " CodeQL"
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ paths :
7+ - ' src/**'
8+ - ' tests/**'
9+ - ' .github/workflows/codeql-analysis.yml'
10+ pull_request :
11+ branches : [ "main" ]
12+ paths :
13+ - ' src/**'
14+ - ' tests/**'
15+ - ' .github/workflows/codeql-analysis.yml'
16+ schedule :
17+ - cron : ' 30 18 * * 1' # Runs every Monday at 18:30 UTC
18+
19+ # Centralize the Python version here for easy updates
20+ env :
21+ PYTHON_VERSION : ' 3.12'
22+
23+ permissions :
24+ contents : read
25+ security-events : write
26+ actions : read
27+
28+ jobs :
29+ analyze :
30+ name : Analyze
31+ runs-on : ubuntu-latest
32+ timeout-minutes : 36
33+ permissions :
34+ actions : read
35+ contents : read
36+ security-events : write
37+
38+ strategy :
39+ fail-fast : false
40+ matrix :
41+ language : [ 'python' ]
42+
43+ steps :
44+ - name : Checkout repository
45+ uses : actions/checkout@v6
46+
47+ - name : Set up Python ${{ env.PYTHON_VERSION }}
48+ uses : actions/setup-python@v6
49+ with :
50+ python-version : ${{ env.PYTHON_VERSION }}
51+
52+ - name : Setup uv
53+ uses : astral-sh/setup-uv@v7
54+ with :
55+ enable-cache : true
56+ cache-dependency-glob : " uv.lock"
57+
58+ - name : Install dependencies
59+ run : uv sync --frozen --group github-action
60+
61+ - name : Initialize CodeQL
62+ uses : github/codeql-action/init@v3
63+ with :
64+ languages : ${{ matrix.language }}
65+ # Extended suites catch more complex vulnerabilities and code quality smells
66+ queries : security-extended,security-and-quality
67+
68+ - name : Perform Analysis
69+ uses : github/codeql-action/analyze@v3
70+ with :
71+ category : " /language:${{matrix.language}}"
Original file line number Diff line number Diff line change 1+ Integrated GitHub CodeQL analysis for automated security scanning of Python source code.
You can’t perform that action at this time.
0 commit comments