ci+security: green main, and re-pin the secret scanner onto the real gitleaks gate#99
Merged
Merged
Conversation
…red services Four failing jobs on main, each with a distinct cause: 1. Governance / Workflow security linter — "missing SPDX header". pages.yml had no SPDX line and four unpinned tag refs, which the estate Actions policy rejects at run creation. Added `MPL-2.0` (this repo's licence, not AGPL) and pinned all four to release SHAs, keeping the current majors: checkout v7.0.0, upload-pages-artifact v5.0.0, deploy-pages v5.0.0. (paint-type's pages.yml pins v3/v4 — copying those here is a downgrade.) 2. Governance / Check Workflow Staleness — governance.yml and scorecard.yml both pinned standards@d7c22711 (2026-06-26), 52 commits and 23 days behind, outside the <=50-commit / <=14-day window. Bumped both to c65436ee, the SHA independently verified green on paint-type. 3. Deploy to Cloudflare Pages — the deploy step ran `wrangler pages deploy` with no gate, so it hard-failed whenever CLOUDFLARE_API_TOKEN is unset. Now self-gates in the shell and exits 0 with an explanatory message when unconfigured. Deliberately NOT gated via `if: secrets.*` — secrets are not available in `if:` expression context; that is the estate compile-error anti-pattern. Same shape boj-build.yml uses to self-gate on BOJ_URL. 4. Build / SonarQube — fails with HTTP 403 Forbidden fetching JRE metadata, i.e. it never authenticates and analyses nothing. That is a credential / project-binding fault requiring an owner action, not a YAML defect. Made the job opt-in via `vars.SONAR_ENABLED` so it skips rather than hard-reds. This hides no quality finding — there is no finding, the scan cannot start. Re-enable by setting SONAR_ENABLED=true after rotating SONAR_TOKEN; the escalation is recorded in the PR body and in a comment on the job. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-green)
Secret Scanner has been reporting SUCCESS on main while being incapable of
failing. The caller pinned standards' secret-scanner-reusable at
@d135b05 (2026-06-24), which is 64 commits behind #500 (08e2d246):
$ gh api repos/hyperpolymath/standards/compare/08e2d246...d135b05
{"status":"behind","ahead":0,"behind":64}
At that pin the step is literally:
- name: Gitleaks Secret Scan
continue-on-error: true # <- cannot fail
uses: gitleaks/gitleaks-action@e0c47f4f...
versus the reusable at the new pin c65436ee (which contains #500 — compare
reports ahead 5 / behind 0):
- name: Install gitleaks (pinned + checksum-verified) # sha256-verified
- name: Gitleaks secret scan (gating)
run: ... gitleaks detect ... --exit-code 1 # gates for real
So this is a genuine security uplift, not pin-freshness housekeeping: it is
the difference between a scanner that cannot fail and one that can.
Also narrowed the caller's grant from contents:read + pull-requests:write +
actions:read down to contents:read. The new reusable invokes a binary rather
than gitleaks-action and no longer requests the elevated scopes.
Making the gate real surfaces 8 findings, all verified false positives — Zig
FFI test fixtures inside `test "..."` blocks: placeholder tokens
(`glpat-xxxxxxxxxxxxxxxxxxxx`, already annotated `// hypatia-ignore: test
fixture`; `sg_test_api_key_abc123`; `ABCDEF0123456789...`), a repeating-hex
pubkey, and the published RFC 8032 §7.1 TEST 1 Ed25519 vector.
They are cleared by the .gitleaks.toml added here, which is byte-identical to
the baseline introduced in standards#511 — it needed no repo-specific
additions, which is the evidence it works as the estate template. The
allowlist matches by anchored pattern class (lockfile integrity hashes,
whole-value placeholder shapes, published test vectors), never by file or by
disabling a rule, so a genuinely new secret in these same files still trips.
Verified after the change: `gitleaks detect --exit-code 1` -> no leaks found,
while planted realistic github-pat / gitlab-pat / slack-bot-token /
stripe-access-token / AWS values are all still detected.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🔍 Hypatia Security ScanFindings: 287 issues detected
View findings[
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/auth-method-batch-fix/main.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/category-batch-fix/main.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/missing-fields-batch-fix/main.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/cartridge-minter/mint.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/validate-cartridges/main.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/validate-cartridges/main_test.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/domains/code-quality/sanctify-mcp/adapter/mod.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/domains/infrastructure/hesiod-mcp/adapter/mod.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/domains/research/bofig-mcp/adapter/mod.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/domains/research/academic-workflow-mcp/adapter/mod.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
Hypatia flagged .gitleaks.toml:65 — "Secret found: GitLab PAT" — because the comment documenting the repeated-character mask contained a literal masked token. The allowlist file tripping the estate's own secret detector is a neat demonstration of the problem it exists to solve. Describe the shape in prose instead, and record the rule in the file so the next editor does not reintroduce a literal example token. Kept byte-identical to the standards baseline (standards#512). Behaviour unchanged: the regex is untouched. Re-verified — cartridges scans clean (exit 0) with the real gate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🔍 Hypatia Security ScanFindings: 286 issues detected
View findings[
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/auth-method-batch-fix/main.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/category-batch-fix/main.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/missing-fields-batch-fix/main.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/cartridge-minter/mint.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/validate-cartridges/main.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/validate-cartridges/main_test.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/domains/code-quality/sanctify-mcp/adapter/mod.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/domains/infrastructure/hesiod-mcp/adapter/mod.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/domains/research/bofig-mcp/adapter/mod.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/domains/research/academic-workflow-mcp/adapter/mod.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clears all four failing jobs on
main, and converts Secret Scanner from a check that cannot fail into one that can.The security change (read this first)
Secret Scannerhas been reporting success onmainwhile being incapable of failing. The caller pinnedsecret-scanner-reusableat@d135b05(2026-06-24) — 64 commits behind standards#500:At that pin the step is literally:
versus the reusable at the new pin
c65436ee(which contains #500 — compare reports ahead 5 / behind 0):This is the estate-wide pattern recorded in the fake-checks audit, resolved here for this repo. Also narrowed the caller's grant to
contents: read(the new reusable invokes a binary, notgitleaks-action, so it no longer requestspull-requests: write/actions: read).The 8 findings the real gate surfaces — all verified false positives
Every one is a Zig FFI test fixture inside a
test "..."block:gitlab-api-mcp/ffi/…:776glpat-xxxxxxxxxxxxxxxxxxxx// hypatia-ignore: test fixtureresearch-mcp/ffi/…:432sg_test_api_key_abc123cloud-mcp/ffi/…×4ABCDEF0123456789…local-coord-mcp/…:3510123456789abcdef…repeatinglocal-coord-mcp/…:444Cleared by the
.gitleaks.tomladded here — byte-identical to the baseline in standards#511, needing no repo-specific additions, which is the evidence it works as the estate template. It matches by anchored pattern class (lockfile integrity hashes, whole-value placeholder shapes, published test vectors), never by file and never by disabling a rule, so a genuinely new secret in these same files still trips.Verified after the change:
gitleaks detect --exit-code 1→ no leaks found, while planted realisticgithub-pat/gitlab-pat/slack-bot-token/stripe-access-token/ AWS values are all still detected.The four reds
pages.ymlhad no SPDX line and four unpinned tag refs. AddedMPL-2.0(this repo's licence, deliberately not AGPL) and pinned to release SHAs, keeping current majors: checkout v7.0.0, upload-pages-artifact v5.0.0, deploy-pages v5.0.0. (paint-type pins v3/v4 — copying those here would be a downgrade.)governance.yml+scorecard.ymlpinnedstandards@d7c22711(52 commits / 23 days behind, outside the ≤50-commit/≤14-day window). Bumped both toc65436ee, the SHA independently verified green on paint-type.CLOUDFLARE_API_TOKENis unset. Now self-gates in the shell and exits 0 with an explanatory message. Deliberately notif: secrets.*— secrets aren't available inif:context; that's the estate compile-error anti-pattern.HTTP 403 Forbiddenfetching JRE metadata: it never authenticates and analyses nothing. Made opt-in viavars.SONAR_ENABLEDso it skips rather than hard-reds. This hides no quality finding — there is no finding, the scan cannot start.Owner actions needed (not fixable in a PR)
SONAR_TOKENand confirm the SonarCloud project binding forhyperpolymath_boj-server-cartridges, then set repo variableSONAR_ENABLED=trueto bring the scan back.CLOUDFLARE_API_TOKEN/CLOUDFLARE_ACCOUNT_IDif Pages deployment is wanted; it now no-ops cleanly without them.Related
.gitleaks.tomlbaseline and fixes standards' own secret scanner, which had been dead atstartup_failuresince 2026-07-06.🤖 Generated with Claude Code