Skip to content

Commit cf3e7d5

Browse files
committed
Add CodeQL code scanning workflow
1 parent c0596b3 commit cf3e7d5

3 files changed

Lines changed: 60 additions & 0 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
schedule:
9+
- cron: "18 3 * * 1"
10+
workflow_dispatch:
11+
12+
permissions:
13+
actions: read
14+
contents: read
15+
security-events: write
16+
17+
jobs:
18+
analyze:
19+
name: Analyze (${{ matrix.language }})
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 45
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
- language: javascript-typescript
27+
build-mode: none
28+
- language: python
29+
build-mode: none
30+
- language: actions
31+
build-mode: none
32+
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
38+
39+
- name: Initialize CodeQL
40+
uses: github/codeql-action/init@v4
41+
with:
42+
languages: ${{ matrix.language }}
43+
build-mode: ${{ matrix.build-mode }}
44+
45+
- name: Perform CodeQL analysis
46+
uses: github/codeql-action/analyze@v4
47+
with:
48+
category: "/language:${{ matrix.language }}"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ The root check runs:
118118

119119
`check:workflows` lints `.github/workflows/` with a pinned `actionlint` version via Go.
120120

121+
CodeQL code scanning also runs on GitHub for `javascript-typescript`, `python`, and workflow files.
122+
121123
## Releases
122124

123125
- Release Drafter keeps a draft release updated from merged pull requests on `main` and can auto-label incoming pull requests by path.

SECURITY.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,15 @@ Useful reports include:
2525
- unsafe upload handling or API behavior
2626
- secrets exposure in docs, scripts, or CI
2727

28+
## Built-In Scanning
29+
30+
The repository also uses automated scanning to help catch common security issues:
31+
32+
- `gitleaks` in CI for tracked git content
33+
- CodeQL code scanning on GitHub for JavaScript/TypeScript, Python, and workflow files
34+
35+
Those checks do not replace private disclosure. If you believe a vulnerability is real or
36+
exploitable, please still report it through a private advisory.
37+
2838
Reports that depend entirely on downstream customizations may still be useful, but they
2939
may be treated as template hardening suggestions rather than direct vulnerabilities.

0 commit comments

Comments
 (0)