Commit 3c93152
authored
fix(security): scope CodeQL to authored code instead of the captured upstream evidence trees (#240)
The promotion PR (#236) is blocked by a CodeQL failure — "1 new alert including 1
high severity security vulnerability":
js/incomplete-sanitization (high)
specs/_vendor/mcp-spec-docs/snapshot.html:61
"This does not escape backslash characters in the input."
That file is not our code. It is a verbatim captured copy of a
modelcontextprotocol.io page, fetched by scripts/fetch-capture.py and committed as
the EVIDENCE that the spec said what we claim it said on a given date. The alert
is about bundled JavaScript inside someone else's documentation site.
WHY THIS IS UNACTIONABLE BY CONSTRUCTION, NOT MERELY INCONVENIENT
The only way to "fix" the alert is to edit a capture — which corrupts the
provenance every drift comparison and every re-vendor decision depends on. It
would also fail the gate added one commit ago
(scripts/check-vendor-meta-integrity.py), which exists precisely to make an edited
capture fail loudly against its recorded sha256.
So the choices were: leave a permanent red on every promotion PR, edit evidence,
or scope the scanner to code we actually author. The first is the failure mode
this whole track keeps being repaired from — a red lane people learn to ignore —
and the second is worse than the alert.
WHAT CHANGED
New .github/codeql-config.yml with paths-ignore for the capture tiers
(specs/_vendor/**, archive/**, _vendor/**), wired via the init action's
config-file. Nothing under those paths is imported, executed, packaged or served;
the extractors read them as text.
Chose a path-scoped config over dismissing the individual alert because the next
captured page carrying bundled JS re-raises it, and over disabling
security-extended because that would weaken the scanner on code we DO write. This
narrows WHAT is scanned, not HOW strictly.
Deliberately NOT excluded: scripts/, research/, and every workflow. Verified the
exclusion hides no authored code — of 66 tracked .py/.js/.ts/.sh files, the only
one now out of scope is specs/_vendor/mcp-schema-ts/snapshot.ts, itself a captured
upstream schema.
ALSO
Corrected the workflow header, which still described CodeRabbit as the
complementary reviewer. CodeRabbit is retired and, as of 2026-07-22, NO AI
reviewer runs on this repo (Gemini sunset, Greptile dark). CodeQL owns security;
correctness and design are the repo's own CI plus human review. Leaving that
comment in place would keep implying a review layer that does not exist.
Verified: both YAML files parse; the open-alert inventory is exactly one alert and
it is in a captured file; audit-harness verify OK after init (1 hash line changed,
the one workflow edited). The config's effect is confirmed by this PR's own CodeQL
run.
Co-authored-by: jeremylongshore <jeremylongshore@users.noreply.github.com>1 parent 421cd24 commit 3c93152
3 files changed
Lines changed: 41 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
| |||
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
42 | 51 | | |
43 | 52 | | |
44 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments