4
4
#
5
5
# This workflow:
6
6
# • Scans JavaScript/TypeScript, Python, and GitHub Actions workflows
7
- # • Detects security vulnerabilities and code quality issues
8
- # • Uploads SARIF results to the “Code scanning” tab in GitHub Security
9
- # • Caches databases and dependencies to speed up analysis
10
- # • Runs on every push/PR to `main` and weekly (Wednesday @ 21:15 UTC)
11
- #
7
+ # • Detects security vulnerabilities & code-quality issues with CodeQL
8
+ # • Uploads SARIF results to the “Code scanning” tab
9
+ # • Caches databases & dependencies to speed up re-runs
10
+ # • Runs on every push/PR to `main` and weekly (Wed 21:15 UTC)
12
11
# ---------------------------------------------------------------
13
12
14
13
name : CodeQL Advanced
19
18
pull_request :
20
19
branches : [ "main" ]
21
20
schedule :
22
- - cron : ' 15 21 * * 3' # Weekly on Wednesday at 21:15 UTC
21
+ - cron : ' 15 21 * * 3' # Wednesday @ 21:15 UTC
23
22
24
23
# -----------------------------------------------------------------
25
24
# Minimal permissions – principle of least privilege
26
25
# -----------------------------------------------------------------
27
26
permissions :
28
- contents : read # for checking out the code
29
- security-events : write # required to upload SARIF results
30
- actions : read # required in private repositories
31
- packages : read # required to download CodeQL packs
27
+ contents : read # checkout
28
+ security-events : write # upload SARIF
29
+ actions : read # needed in private repos
30
+ packages : read # download query packs
32
31
33
32
jobs :
34
33
analyze :
54
53
uses : actions/checkout@v4
55
54
56
55
# -------------------------------------------------------------
57
- # 1️⃣ Optional setup – runtimes for specific languages
56
+ # 1️⃣ Optional runtimes (harmless for interpreted languages)
58
57
# -------------------------------------------------------------
59
58
- name : 🐍 Setup Python
60
59
if : matrix.language == 'python'
@@ -76,18 +75,17 @@ jobs:
76
75
with :
77
76
languages : ${{ matrix.language }}
78
77
dependency-caching : true
79
- queries : |
80
- +security-extended
81
- +security-and-quality
78
+ # NOTE: Comma-separated list — no "+" prefix needed
79
+ queries : security-extended,security-and-quality
82
80
83
81
# -------------------------------------------------------------
84
- # 3️⃣ Manual build step (not needed for JS/Python/Actions )
82
+ # 3️⃣ Manual build placeholder (not required here )
85
83
# -------------------------------------------------------------
86
84
- if : matrix.build == 'manual'
87
85
name : ⚙️ Manual build (placeholder)
88
86
shell : bash
89
87
run : |
90
- echo "Add manual build commands here if needed ."
88
+ echo "Add build commands here for compiled languages ."
91
89
exit 1
92
90
93
91
# -------------------------------------------------------------
0 commit comments