Repository navigation
Description
Symptom
The Hypatia security-scan comment posted on boj-server-cartridges PRs (e.g. hyperpolymath/boj-server-cartridges#81, a 2-file docs/gateway change) reports 44 critical findings, all of the form:
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": ".../cartridges/cross-cutting/orchestration/stack-orchestrator-mcp/adapter/planner.ts",
"rule_module": "cicd_rules", "severity": "critical"
— every one under cartridges/**/adapter/**.
Why these are false positives
boj-server-cartridges/.claude/CLAUDE.md §"TypeScript / ReScript Exemptions (adapters)" documents cartridges/**/adapter/** (*.ts, 34 files) as an approved exemption class (MCP/LSP adapter glue against TS-native SDKs — the same carve-out boj-server documents for its 6 adapters), and states:
The canonical source of truth is the
path_allow_prefixesfield on the hypatia rulescicd_rules/typescript_detectedandcicd_rules/rescript_detectedinhyperpolymath/hypatia; this table mirrors that for human readability.
So either (a) the deployed rule's path_allow_prefixes does not actually contain the cartridges/*/adapter/ prefixes the CLAUDE.md says it mirrors, (b) the scan workflow runs a rule/config snapshot that predates the exemption, or (c) the prefix matching fails against the runner's absolute paths (/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/... vs a repo-relative prefix — worth checking the matcher normalises to repo-relative before comparing).
Impact
Every PR to the cartridge registry gets a "🔴 Critical ×44 — Action Required" banner for pre-existing, explicitly-exempted files. That's the FP-recurrence/credit-burn pattern hypatia's own Scanner Hygiene doctrine exists to prevent (cf. the PR #237 post-mortem, #260): reviewers learn to ignore the banner, which is how real criticals get missed.
Suggested fix (at source, per doctrine #14)
- Diff the deployed
cicd_rules/typescript_detectedpath_allow_prefixesagainst the exemption table inboj-server-cartridges/.claude/CLAUDE.md(and the boj-server mirror); add the missingadapter/(andpanels/for rescript_detected) prefixes if absent. - If the prefixes are present, check the matcher's path normalisation against the GitHub-runner absolute-path form above.
- Re-run the scan on
boj-server-cartridgesmainand confirm the 44 criticals drop to 0 without any baseline entry (fix > baseline, per Scanner Hygiene).
Surfaced from a session where the scan banner fired on boj-server-cartridges#81, a two-file README/mod.js change touching no TypeScript. Not filed against the PR — none of the findings are in its diff.
Activity
fix(rules): banned-language path exemptions — adapter/panels (#602) +…
hyperpolymath commentedon Aug 7, 2026
Fixed — cause (a) of the three you listed: the prefixes genuinely were absent from the rule, not stale-deployment or path-normalisation.
lib/rules/cicd_rules.extypescript_detected.path_allow_prefixeshad noadapter/orcartridges/entry at all, so theboj-server-cartridgesCLAUDE.md table that names this list as its canonical source of truth was mirroring something that didn't exist. Cause (c) is ruled out: matching isString.contains?/2(comment at the head of the list), so a bare/adapter/substring matches the runner's absolute path form fine.Landed:
typescript_detected: added/adapter/(documented MCP/LSP adapter-glue class).rescript_detected+rescript_interface_detected: added the/panels/counterpart you flagged.test/rules/cicd_rules_typescript_test.exscovering all three path shapes — repo-relative, nested, and the full/home/runner/work/...absolute form.vlang_detectedentries (linguist/samples,HOL/examples/PSL,echidna/examples,echidna/tests/live_goals) carried a leading slash, whichString.contains?/2can never match against repo-root-relative paths — the Coq/Verilog exemptions their tests asserted were dead. Fixed; that also closes test: 7 DETERMINISTIC Elixir failures (fail in isolation) — separate from the #643 order-dependent cluster #645 items 1–2.@banned_lang_ts_carveoutsduplicate table inlib/hypatia/scanner_suppression.ex(3 of ~12 carve-outs, the standards#382 re-drift trap) after verifying every entry is covered by the canonicalpath_allow_prefixesdelegation. One list now, per doctrine.Verified locally: typescript/rescript/vlang/suppression suites 75/75 green.
Step 3 of your suggested fix (re-run the scan on
boj-server-cartridgesand confirm 44 → 0) is NOT done and is blocked on #484 — the deployed scanner lagsmain, so this fix will not reach live scans until that's resolved. Closing on the source fix; please reopen or track under #484 if the banner persists after the next scanner refresh.