Repository navigation
feat(security): Strix-style security + pentest skill suite - #185
Merged
Merged
Conversation
Adds project-specific security testing skills modeled on Strix (autonomous recon -> test by category -> validate with a PoC -> report), rebuilt on Claude Code subagents and this repo's existing test-gate culture. - security/: umbrella knowledge skill (attack-surface inventory + the core category->exact-test-harness map + per-category method references). - pentest/: manual /pentest orchestrator; hermetic by default, fenced live-on-demand (local throwaway targets only), propose-or-fix. - agents/: security-tester (executor) and security-verifier (adversarial refuter with no write tools - the mechanism enforcing 'no speculative findings'; a finding is locked only by a regression test in an existing harness). Tooling only; adds no CI/hooks (deferred) and no repo code changes. Co-Authored-By: Claude Fable 5 <[email protected]>
The four Rust jobs are required status checks, so a workflow-level path filter would leave them pending forever and block the PR. Instead a `detect` job computes whether any non-`.claude` file changed and the required jobs gate on it with `if:` — a job skipped by `if:` reports a "skipped" conclusion, which branch protection accepts, so a skills-only PR stays mergeable with zero compute. Non-PR events (push to main, nightly) always run. Scoped to `.claude` only: `lint` runs `er-entity verify` (docs/erd.md staleness) + the OpenAPI gate, so docs changes must still run the gate. Co-Authored-By: Claude Fable 5 <[email protected]>
athvin
added a commit
that referenced
this pull request
Oct 20, 2026
…187) * ci(frontend): make the gate blocking, and add the supply-chain half The frontend has had a real CI workflow since #97, but it never gated anything: branch protection on main requires four contexts and all four are rust.yml's. `lint + types + unit` and `playwright functional tier` ran and were then ignored at merge time. On top of that the `paths:` filter meant #184, #185 and #186 did not run the frontend tier at all. Making those jobs required needs the filter gone first: a workflow a path filter skips never reports, so a required check would sit pending forever on every backend-only PR. rust.yml already solved this for its `.claude/**` skip — a `detect` job and an `if:` on each real job, since a job skipped by `if:` reports "skipped", which branch protection accepts. This mirrors that, filtering on `^frontend/` instead. Then the half that was missing entirely. The Rust side runs cargo-deny (advisories + licenses + bans) on every PR; the frontend ran nothing — no `pnpm audit`, no license check, no SAST — and Dependabot covered only `github-actions`, so npm dependencies were never bumped. The repo's own notes flagged it (skills/security/references/secrets-iac.md: "Dependabot does not cover cargo or npm"). Switching the gate on showed what that cost: 4 HIGH advisories, six of them against `next` itself, including a HIGH SSRF in image optimization fixed four patch releases earlier. So this also bumps next 16.3.6 → 16.3.8 (and the two eslint packages in lockstep), sharp → 0.35.5 and source-map-js → 1.2.2, taking the tree from 4 high / 5 moderate / 1 low to 1 high / 1 moderate. 16.3.8 rather than 16.4.2 deliberately: it is the minimum that clears the advisories and stays inside the pinned minor, which keeps the committed visual baselines in play. The one remaining HIGH is allowlisted with its reasoning, following deny.toml's convention of a prose justification per entry: [email protected] is the newest published version and the advisory records no patched release, it is reached only through @next/eslint-plugin-next at lint time, and the only glob patterns it ever sees are our own eslint config. New gates, each verified to fail as well as pass: - `pnpm audit:check` — HIGH/CRITICAL fail, moderate and below reported. Reports stale allowlist entries so exceptions cannot accumulate. - `pnpm licenses:check` — an allowlist, not a denylist, so an unseen license fails and gets looked at. deny.toml's 12 ids verbatim plus the npm tree's additions, each carrying why it is permissive enough. - `pnpm authz:check` — every tenant route calls requireOrgAccess and every admin route requireSuperAdmin (54 handlers, all compliant). This was written as a semgrep rule first; semgrep rejected the pattern as invalid TypeScript while still reporting the rule as run with zero findings, so two deliberately unauthorized handlers passed. It is now code with tests that plant violations and require them to be caught. - semgrep keeps the three sink rules confirmed to fire: HTML injection, dynamic eval, and NEXT_PUBLIC_* leakage. - the `pnpm gen:api` drift gate frontend/README.md has claimed since #38 but which never existed — the only related step was rust.yml's er-openapi-check, suffixed `|| true`. Also restores the five `make frontend-*` targets dropped by 9a55504, whose message says the frontend targets were retained. Their scripts were never deleted, and frontend/dev/run.sh:97 has been calling `make frontend-seed` since. `frontend-seed` itself is NOT restored: its implementation went in 7cc444f with no replacement, which is why the full-stack e2e tier is dormant. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(web): pin the GCM auth-tag length in the credential vault The first run of the new semgrep gate found this (javascript.node-crypto.security.gcm-no-tag-length), and it is a real if modest hardening. GCM accepts 4-16 byte authentication tags. `open()` slices the last TAG_BYTES off the stored ciphertext, so a row whose ciphertext is SHORTER than 16 bytes slices to a short tag — and without an explicit authTagLength, Node accepts it. A short tag is correspondingly cheaper to forge. The vault's whole premise is surviving someone who can write the row (that is what the org+role AAD binding is for), so this is exactly the threat model to care about. Pinning authTagLength on both ends makes Node reject any tag that is not 16 bytes. The new test truncates a sealed ciphertext to 0/1/8/15 bytes and requires each to throw. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: bmoore813 <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.
What
Adds a project-specific security testing suite as Claude Code skills, modeled on Strix (autonomous recon → test by category → validate with a working PoC → report → optionally patch) but rebuilt on Claude Code subagents and this repo's existing test-gate culture.
Tooling only — no repo code, CI, or hooks changed (CI/hook integration deliberately deferred).
Files (15, all under
.claude/).claude/skills/security/— umbrella knowledge skill (model-invocable). Attack-surface inventory + the core category → exact existing test harness map + per-category method references (tenant-isolation, injection, ssrf-egress, authn-session, business-logic, secrets-iac)..claude/skills/pentest/— manual/pentestorchestrator. Hermetic by default (static + unit, no running stack);/pentest liveopts into fenced live exploitation against local throwaway targets only (hard-refuses cloud/prod/IMDS on real hosts). Propose-only by default;/pentest fixapplies remediations..claude/agents/—security-tester(executor) andsecurity-verifier(adversarial refuter with no write tools).The discipline
security-verifierreproduces it in fresh context — the tool restriction is the mechanism that keeps the campaign free of speculative findings.pg_auth.rs,pg_steward.rs,config_check.rsunits,read.rs/webhook.rsco-located units,stage.rsplan-vectors,freeform_sql.rs-style posterity gates, frontend vitest/Playwright). The durable deliverable is the test, not the PoC.entity-frameworkskill.How to use
/pentest(full hermetic sweep) ·/pentest <category>·/pentest live·/pentest fix. Thesecurityskill auto-applies when reviewing a handler/endpoint.Note: the first findings run has not been performed — this PR ships the tooling.
🤖 Generated with Claude Code