Skip to content

Commit 58bd35d

Browse files
authored
Update codeql.yml
1 parent cec960e commit 58bd35d

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

.github/workflows/codeql.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
#
55
# This workflow:
66
# • 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)
1211
# ---------------------------------------------------------------
1312

1413
name: CodeQL Advanced
@@ -19,16 +18,16 @@ on:
1918
pull_request:
2019
branches: [ "main" ]
2120
schedule:
22-
- cron: '15 21 * * 3' # Weekly on Wednesday at 21:15 UTC
21+
- cron: '15 21 * * 3' # Wednesday @ 21:15 UTC
2322

2423
# -----------------------------------------------------------------
2524
# Minimal permissions – principle of least privilege
2625
# -----------------------------------------------------------------
2726
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
3231

3332
jobs:
3433
analyze:
@@ -54,7 +53,7 @@ jobs:
5453
uses: actions/checkout@v4
5554

5655
# -------------------------------------------------------------
57-
# 1️⃣ Optional setup – runtimes for specific languages
56+
# 1️⃣ Optional runtimes (harmless for interpreted languages)
5857
# -------------------------------------------------------------
5958
- name: 🐍 Setup Python
6059
if: matrix.language == 'python'
@@ -76,18 +75,17 @@ jobs:
7675
with:
7776
languages: ${{ matrix.language }}
7877
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
8280

8381
# -------------------------------------------------------------
84-
# 3️⃣ Manual build step (not needed for JS/Python/Actions)
82+
# 3️⃣ Manual build placeholder (not required here)
8583
# -------------------------------------------------------------
8684
- if: matrix.build == 'manual'
8785
name: ⚙️ Manual build (placeholder)
8886
shell: bash
8987
run: |
90-
echo "Add manual build commands here if needed."
88+
echo "Add build commands here for compiled languages."
9189
exit 1
9290
9391
# -------------------------------------------------------------

0 commit comments

Comments
 (0)