Repository navigation
Description
Written-by: Fledge Platform Product
Summary
main at 14d835abcda38fcb9f90ebfc82ef6d241551835c carries two red required checks that were green on the commit before it and green on the pull request's own head: Analyze JavaScript/TypeScript and codeql-required. The CodeQL gate reports one new high result on the merge result, in a file the merged pull request did not touch.
This card records the merge-result-only red. It is not a confirmed vulnerability: the Security Lead is verifying the finding independently, and this card deliberately carries no reproduction of the data flow at exploit level.
- Expected:
main's required checks are green, or they are red for a reason a maintainer can read off the card and the check. - Actual:
mainis red at2026-11-25T00:53:38Z(Analyze JavaScript/TypeScript) and00:53:47Z(codeql-required) withcodeql-gate: new high result js/insufficient-password-hash at src/lib/secrets.ts:99.
Because ci-ok aggregates the required set, every pull request cut from this main inherits the red until it is resolved.
Environment
- Repository
HugoXK/fledge, refmainat14d835abcda38fcb9f90ebfc82ef6d241551835c(committed2026-11-25T00:51:22Z, subjectfeat(audit): hash-chain the audit log and add a verify command (#1233) (#1288)); SHA and the responseDate: Wed, 25 Nov 2026 01:14:08 GMTwere read from the GitHub API for this card. - GitHub Actions run
45521328476, job138893637546(Analyze JavaScript/TypeScript), job138893712003(codeql-required). - No local server, database or SMTP was used; this is a CI-only reproduction.
Minimal reproduction
- Read the two check runs on
14d835ab(APIcommits/14d835ab.../check-runs):Analyze JavaScript/TypeScriptfailure, started00:51:28Z, completed00:53:38Z;codeql-requiredfailure, started00:51:38Z, completed00:53:47Z. - Read the log of job
138893637546, stepRun node base/scripts/codeql-gate.mjs --sarif codeql-results --baseline base/.github/agent/codeql-baseline.json, at00:53:32Z:codeql-gate: new high result js/insufficient-password-hash at src/lib/secrets.ts:99codeql-gate: parsed 7 result(s), 1 high/critical, 1 added; the baseline at b85777cc68a5b4ca4bced910baf2414c5a9b2ea9 holds 7
- Compare the same two checks on the predecessor and on the pull request head:
93307f5b7cb1c1bcb058492298d9b60322fbcc6b:Analyze JavaScript/TypeScriptsuccess14:45:42Z→14:49:03Z;codeql-requiredsuccess14:45:53Z→14:49:06Z.3f5d06302b693a9fe969fa9047fcf0bb62b35400(#1288head):Analyze JavaScript/TypeScriptsuccess08:23:00Z→08:24:44Z;codeql-requiredsuccess08:23:20Z→08:24:52Z;CodeQLsuccess08:24:32Z→08:24:36Z.
- Read
#1288's file list: 8 files, none of themsrc/lib/secrets.ts—changelog.d/1233.security.md,docs/architecture.md,docs/security.md,package.json,scripts/audit-verify.ts,src/db.ts(+37/−2),src/lib/auditChain.ts(+77),test/auditChain.test.ts.
So the flagged line was unchanged by the merge and green on both sides of it; the analysis only sees the result once the new files and the new call path exist in the same tree.
Where the new path is
- The sink CodeQL names is the shared helper,
sha256Hexinsrc/lib/secrets.ts:98-99— a general SHA-256 helper used across the app, not a password store. - The new caller is the audit chain:
src/lib/auditChain.ts:1importssha256Hex, andauditHashatsrc/lib/auditChain.ts:20-24interpolatesrow.detailinto the hashed string. detailis caller-supplied free text written byStore.auditatsrc/db.ts:8389(theauditHash(...)write issrc/db.ts:8399).- The result is one new high/critical result on the merge tree while the baseline holds 7 unchanged.
Scope note for the fixer, not a cause: src/lib/secrets.ts is untouched by #1288, the hash-chain guarantee is docs/security.md and docs/architecture.md as merged, and nothing in this card should be read as a claim about the algorithm — the audit chain hashes with SHA-256 on purpose and that is not what the rule objects to.
Proposed red test
This is a data-flow finding, so no unit test in test/ reproduces it: CodeQL's engine is the only thing that can, and the red half of the evidence is the check itself (step 2 above, log line quoted verbatim).
The acceptance test is therefore at two levels, and both must hold at the fix's own tip:
- CI level (red now, must go green):
Analyze JavaScript/TypeScriptandcodeql-requiredaresuccesson the fix's head and onmainafter the merge. The pull request body carries the before/aftercodeql-gate:line, not a narrative. - Offline level (new, cheap, and runnable by the Reviewer): a
test/case that feedsscripts/codeql-gate.mjsa two-result SARIF fixture — one baselined result and one added high — and asserts the exactcodeql-gate: new high result …exit and message, so the behaviour the merge changed is pinned by a test rather than only by CI. That case must fail against a gate that ignores the baseline and pass against the merged gate unchanged.
Optional and preferred where it is cheap: if the fix removes the data flow instead of baselining it, add one assertion that the audit chain still verifies — test/auditChain.test.ts as merged is the reference and must stay byte-identical and green.
Smallest mergeable slice
One pull request, one week at most, that leaves main green and the audit chain unchanged:
Analyze JavaScript/TypeScriptandcodeql-requiredgreen at the fix's own head;maingreen after the merge.test/auditChain.test.tsbyte-identical to the merged file and green, andverifyAuditChain's behaviour unchanged — the#1233guarantee is not traded for a green check.- The fix is one of two admissible outcomes, and the choice is the Dev's, recorded on this card: the new flow no longer reaches the flagged sink, or exactly one baseline entry carries a comment naming the path, the reason and the Security Lead's verdict.
Non-goals
- No change to the audit-chain format, the
auditHashinput, or the verify command's output; no backfill (the chain-start anchor question is separate). - No widening of the CodeQL baseline beyond this one added result, and no expiry change.
- No reproduction of the data flow at exploit level in this card, its comments, the pull request body or the commit message.
- Not the aggregate-gate logic (
#1304,#585,#1032,#422,#284), not the baseline expiry (#928,#645), not the arch-gate regression (#1309), and not theci:main-redtracker (#1308). - No UI face. Nothing user-visible changes; this restores the required checks.
Priority
High: a required check on main is red, so every pull request's aggregate ci-ok is red until this lands. Priority label is the Lead's to set; this card asks for review first.
Dedupe
Searched open and closed issues for codeql, CodeQL baseline, insufficient and main-red. The nearest cards are all about the gate's mechanics or the baseline's lifecycle (#884, #1304, #585, #1032, #422, #284, #928, #645) or about the arch gate (#1309, #1308); none records a new high that appears only on the merge result, and none names this data flow. #1288's pull request is merged, so this is not a review comment on it.
Open question for review
If the Security Lead's verification says the rule is right about something real, this card's slice stays the same but the urgency and the doc obligation change (docs/security.md owns the chain). If it says the flow is benign, the second admissible outcome (one commented baseline entry) is the whole fix. Either way the card should not be closed on "the check is green" alone.
Activity
HugoXK commentedon Nov 25, 2026
Written-by: Fledge Platform Product
Evidence update for the seat, comment only — the body stays byte-identical (
96490ca2bfc7), so nothing is voided and this is not a new claim.The red is still real; it is only unobserved on scheduled runs. On
14d835ab(livemain, read at APIDate: Wed, 25 Nov 2026 04:56:24 GMT) there are two runs of the same tree:45521328437(2026-11-25T00:51:26Z):Analyze JavaScript/TypeScript138893637546failure00:51:28Z→00:53:38Z,codeql-required138893712003failure00:51:38Z→00:53:47Z. This is the red the body describes.45537064667(03:01:41Z):codeql-required138946213119success03:01:55Z→03:02:02Z, and noAnalyze JavaScript/TypeScriptjob exists in that run. Its log line 136 says why:codeql-required: schedule: the weekly analysis observes, it does not gate a merge.So
GET /commits/14d835ab/check-runs?filter=latestnow returnscodeql-required: successwhileAnalyze JavaScript/TypeScriptis stillfailure, and the bot comment on the main-red tracker#1308at03:05:43Zlists onlytestas failing. Neither means the finding cleared: the scheduled run deliberately does not gate, and the only analysis of this tree is the failing push run at00:51Z.Nothing else changed on the card; no label touched, no scope added.