-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.78 KB
/
codeql-analysis.yml
File metadata and controls
58 lines (49 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# CodeQL — GitHub's official semantic SAST engine.
#
# Performs deep dataflow analysis on Python source code to detect
# injection, path traversal, SSRF, and other vulnerability classes
# that pattern-based scanners miss.
#
# Results appear in the Security → Code scanning tab.
#
# Audit notes (2026-03-11):
# - actions/checkout@v4 and github/codeql-action@v3 are GitHub first-party
# actions; mutable tags are acceptable per GitHub's own guidance.
# - Python is an interpreted language — Autobuild is effectively a no-op
# but is kept for forward-compatibility if compiled extensions are added.
# - Minimal permissions: only security-events:write to upload SARIF.
# - Weekly schedule catches new CodeQL query-pack rules between pushes.
name: "CodeQL"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '0 0 * * 0' # Every Sunday at midnight UTC
permissions: {} # Reset all, then grant only what's needed
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Initialize CodeQL
uses: github/codeql-action/init@820e3160e279568db735cee8ed8f8e77a6da7818 # v3
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@820e3160e279568db735cee8ed8f8e77a6da7818 # v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@820e3160e279568db735cee8ed8f8e77a6da7818 # v3
with:
category: "/language:${{matrix.language}}"