Repository navigation
Conversation
Entire-Checkpoint: a7d871dfe538
…#980) Entire-Checkpoint: b88d4b15dee0
…g ENOENT Entire-Checkpoint: 3a13e689f28f
… evidence The file asserts on the text of SECURITY.md, THREAT-MODEL.md and README.md; there is no production function to call, by design. Without the pragma the advisory detector reads the whole file as 100% tautological and scripts/qa/tautology-detector-cli.test.ts (which runs the CLI against the branch's own changed test files) exits 1, failing npm test. Entire-Checkpoint: 204e10f911e3
…e; the injection eval is evidence, not containment Second-pass QA (AC_MET_BUT_NOT_A_PLUS) notes: the ASI01 row listed the human merge gate inside the deterministic bound, contradicting the Residual risks section; the manually dispatched eval was classed deterministic alongside runtime hook refusals. Both cells corrected; the citation gate still passes (35/35). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_0147heJNRw8wBBujPGMqxDpR Entire-Checkpoint: a606392f4b70
…rust-public-threat-model-with-owasp-agent
…anded on main AC-4's gate caught exactly the drift it exists for: merging main brought the seventeenth distinct HOOK_BLOCKED refusal (#1032, PR #1034) and the computed count no longer matched the typed slot. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_0147heJNRw8wBBujPGMqxDpR Entire-Checkpoint: 5070c7c3df27
admarble
deleted the
feature/980-docs-ci-trust-public-threat-model-with-owasp-agent
branch
September 10, 2026 22:45
admarble
added a commit
that referenced
this pull request
Oct 16, 2026
… <!-- on render QA round 2: the (?!<!--) guard dropped markers whose values hold an HTML comment, including PR #1035's AC-4 marker. Temper on the marker opener instead, and escape <!-- in rendered values so they round-trip. Corpus of 150 PR bodies vs main: 8 gain markers, 0 lose. Entire-Checkpoint: efad8e95472e
admarble
added a commit
that referenced
this pull request
Oct 16, 2026
…1465) * fix(#1305): mutation marker round-trips braces and --> Entire-Checkpoint: 3ead1a2cdfed * fix(#1305): escape only --> on render and keep multi-line markers parsing QA (AC_NOT_MET): escaping every > rewrote each rendered marker's failedTest separators and broke the #1297 state-summary test; the single-line regex dropped markers whose JSON spans lines, which the issue's Non-Goal keeps parsing. Escape only the > of a --> inside a value, and match lazily to the first } --> without crossing another <!--. Entire-Checkpoint: 3da69c1f546e * fix(#1305): stop only at the next SEQUANT_MUTATION marker, and escape <!-- on render QA round 2: the (?!<!--) guard dropped markers whose values hold an HTML comment, including PR #1035's AC-4 marker. Temper on the marker opener instead, and escape <!-- in rendered values so they round-trip. Corpus of 150 PR bodies vs main: 8 gain markers, 0 lose. Entire-Checkpoint: efad8e95472e
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.
Summary
The P0 slice of #980: sequant's trust posture becomes a public, mechanically-verified surface.
SECURITY.md(new) — reporting channel, response windows a single maintainer can actually meet, supported-versions table, and an explicit scope boundary naming the owning layer for out-of-scope classes.docs/THREAT-MODEL.md(new) — the untrusted-input surfaces phase agents read, and a defenses table where every row names its enforcer (path,§skill anchor, settings key, or guard message) and classifies itselfdeterministic(holds even if the model is fully compromised) vsmodel-dependent, each with its residual risk. Plus the OWASP Agentic Top 10 (2026) mapping (ASI01–ASI10) and a## Residual riskssection that states what is not defended.src/lib/__tests__/security-docs.test.ts(new) — the CI gate. Every citation must resolve on disk; the guard count is recomputed fromtemplates/hooks/pre-tool.shrather than typed; immunity claims are banned outright.### SecurityCHANGELOG bullet.The discipline is #943's applied to security: every claim names its enforcing mechanism, and anything unenforced is stated as a residual risk rather than implied away.
What this gate does not prove
Nothing in CI can check that a
Classcell is correct. A control mislabelleddeterministicpasses every assertion in the gate and is a public misstatement — the failure PLAN D8 names. Re-deriving each Class from its enforcer is a review obligation (Derived AC-8), not a test. Two Classes were set deliberately against the issue's own wording and want scrutiny:model-dependent, not deterministic.gh api repos/:owner/:repo/branches/main/protection→ 404 "Branch not protected", and noHOOK_BLOCKEDguard coversgh pr merge. The issue motivation calls it "a hard human merge gate"; on the tree as it stands it is a convention. Enabling branch protection with a required review moves it todeterministicand changes one cell.HOOK_BLOCKEDguards"; 17 is the raw occurrence count (grep -c 'HOOK_BLOCKED:' templates/hooks/pre-tool.sh) and 16 is distinct. AC-4 exists so this can never drift again — the doc's<!-- guards:count -->slot is compared against a recomputation from source.AC verification
SECURITY.mdsections + README linkSECURITY.md; gate-t "AC-1"docs/THREAT-MODEL.md:65-85; gate-t "AC-2"docs/THREAT-MODEL.md:95-118; gate-t "AC-3"<!-- guards:count -->16; gate-t "AC-4"recomputes fromtemplates/hooks/pre-tool.sh-t "AC-5"grep -c "SECURITY.md" README.md→1;grep -c "THREAT-MODEL.md" README.md→1(both onREADME.md:393)npm run build✅,npm run lint✅,npm test— see belowmodel-dependenton measured evidence (no branch protection, no hook guard):LINE§anchor; zero bare:LINEreferencesbulletproof,unbreakable,eliminates prompt injection,100% safeMutation verification
Mutation-verified: AC-1 — deleted the entire contact span (both lines between the security-contact markers) in SECURITY.md;
src/lib/__tests__/security-docs.test.ts > names a non-empty contact channel inside the reporting sectionfailed; restored.Mutation-verified: AC-2 — repointed the first defenses-table Enforcer path templates/hooks/pre-tool.sh at templates/hooks/no-such-hook.sh;
src/lib/__tests__/security-docs.test.ts > cites at least one on-disk path in every Enforcer cellfailed; restored.Mutation-verified: AC-3 — blanked the disposition cell of the ASI07 row in the owasp-delimited table;
src/lib/__tests__/security-docs.test.ts > gives every category a non-empty dispositionfailed; restored.Mutation-verified: AC-4 — changed the doc's guards:count slot from the computed 16 to 18;
slot"} -->src/lib/__tests__/security-docs.test.ts > matches the number in the doc's <!-- guards:count --> slotfailed; restored.Mutation-verified: AC-5 — inserted 'Sequant is injection-proof.' under ## Residual risks in docs/THREAT-MODEL.md;
src/lib/__tests__/security-docs.test.ts > docs/THREAT-MODEL.md makes no immunity claimfailed; restored.Test plan
npm run build— passesnpm run lint— passes (eslint,--max-warnings 0)npx vitest run src/lib/__tests__/security-docs.test.ts— 35 passed1and1npm test(full suite) —3 failed | 6233 passed | 1 expected fail | 4 skipped (6241), all 3 pre-existing (settled below)Known state: 3 pre-existing failures, settled against base
The first full-suite run on this branch showed 6 failures across 4 files. Three of them, all in
scripts/qa/tautology-detector-cli.test.ts, were caused by this branch and are fixed ind42083cc. That test runs the advisory tautology detector against the branch's own changed test files, and the new gate file — which asserts on document text and calls no production function, by design — read as 100% tautological and tripped the CLI's blocking exit. The file now carries a@tautology-skippragma stating the reason and citing the mutation evidence above, matching the existing precedent insrc/lib/workflow/non-chain-skip-guard.test.tsandsrc/lib/workflow/run-state.test.ts. Those 6 tests now pass.The remaining 3 are pre-existing and unrelated, settled per the house method — same worktree, base commit, same command:
d42083cc988559f2src/commands/__tests__/prompt-wait.test.ts › returns 0 and prints the reply when one arrives within the windowsrc/lib/workflow/batch-executor.test.ts › withActivityHook (#543) › returns the input config unchanged when onProgress is undefined__tests__/integration/relay-hook.integration.test.ts › AC-7 › does NOT render when SEQUANT_RELAY is unsetReproduced deterministically in isolation on both refs (
3 failed | 102 passedeach), so they are not ordering flakes.git checkout --detach origin/mainin this worktree, same three files, identical result. This branch touches two new documents, one README line, one CHANGELOG bullet and one new test file; none of the three failing suites import any of them.AC-7 reading: the suite is green with respect to this change — no failure on this branch is attributable to it, and the one failure it did introduce is fixed. It is not green in absolute terms. Worth filing the three separately rather than letting them ride under this PR.
Follow-ups this PR does not carry
Per the D5 split, this node is P0 only: the recurring injection eval is #1024, OpenSSF Scorecard is #1025, and npm provenance + the README "Security model" section are gated at #1026 / applied in #1028.
Two items need a maintainer action outside this PR:
gh api repos/:owner/:repo/private-vulnerability-reporting→{"enabled":false}).SECURITY.mdnames it as the primary channel, so the advisory link is live prose pointing at a switched-off feature until it is enabled in repo settings. AC-1's gate only checks the contact line is non-empty — it cannot check the channel answers.mainis off. Turning it on with a required review promotes the merge gate frommodel-dependenttodeterministic.Closes #980
Second-pass QA (AC_MET_BUT_NOT_A_PLUS) — what changed and what is left to the owner
deterministic; it is evidence on manual dispatch, not runtime containment. Nowmodel-dependentwith the residual risk stated.SECURITY.mdnames GitHub private vulnerability reporting as the primary channel and it is disabled on the repository (gh api repos/sequant-io/sequant/private-vulnerability-reporting→enabled: false). Enable it in Settings → Code security, or rungh api -X PUT repos/sequant-io/sequant/private-vulnerability-reporting. Left untouched on purpose: a repo setting is the owner's call.package.jsonwould couple every minor release to aSECURITY.mdedit; worth deciding with the/releaseskill in view (release+docs(trust): provenance decision applied; Security-model section in README and marketplace copy, banned-phrase gated (#980 P2) #1028 territory), not here.deterministicin exactly one cell.