Repository navigation
claudex harness: HARDEN tag for security-sensitive features - #54
Conversation
A brief marked HARDEN (or matching harden keywords outside its "Out of scope" section) now changes what the engine enforces, not only what it tells the agents: - brief.sh: parses an optional HARDEN on the first line; turns it on from whole-word harden.keywords; refuses HARDEN with TIER normal. - hardening/CHECKLIST.md: H1 to H10 (access per data type and caller, server-set ownership, sign-in timing and current-password checks, cookies, CSRF, input validation, rate limits, errors and logs, secrets, other routes to the same data). - Plan, build, fix, address and CI-fix prompts carry the checklist; the reviewer treats an unfinished item as an important finding. - Ship verdict fails on any test file edited after the build when HARDEN is on, whatever the reviewer ruled. - PRs get the harden label; forge.sh merge refuses harden PRs; the merge gate always rejects them, delegation or not. - scripts/selftest.sh (14 checks, fake gh) runs in CI. - Harness 0.2.0. Known gap: test edits from claudex-cifix before a re-ship are not caught. The hard merge block still needs branch protection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016efoiqPbKEzohdVDPcFcE4
yogex
left a comment
There was a problem hiding this comment.
Adversarial review of d1691b7. The main issue: the owner-only merge isn't enforced on the path the workflow uses (inline on ship.yaml:255). Two other inline findings can block a normal feature by mistake (the issue template) or let a weakened test through (test config files).
What holds: HARDEN on a normal-tier brief is refused, keywords match as whole words, the test-edit verdict is enforced in code, and the "Not covered" section is accurate. I re-ran selftest.sh (14 of 14 pass), and CI is green on this head.
How I tested: I fed crafted briefs to brief.sh with project/claudex.json, and read ship.yaml's node graph and review-pack.sh. I didn't run a live Archon workflow.
Overlap: branch ccr-99148463-yu76k7 (a27388f: working install.sh, spec folder recorded in state, address_rounds removed) also edits ship.yaml (the PR-body spec line), design.yaml (the brief node), CONTRACTS.md, VERSION and the three configs. Whichever merges second will need conflicts resolved.
Generated by Claude Code
If `gh pr view` errored, the label check found nothing and the merge went ahead. Read the labels first and refuse (exit 4) on error. Self-test adds the case (15 checks). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016efoiqPbKEzohdVDPcFcE4
- Owner-only merge enforced on the path the workflow uses: merge-gate is skipped when HARDEN is on, and the checkpoint records pr-open. - HARDEN with test edits no longer cancels the run: the edited files are listed in the PR body. A missing edits list fails the verdict. - Test config files (config test_config[]) count as test edits. - HARDEN is recorded in state/<feature>.json and read back, so every workflow keeps it; checkpoint.sh now updates the file in place. - Keyword matching skips HTML comments and only the first paragraph and list items of "Out of scope"; issue template hints moved into comments. - Broader keywords (plurals, auth, share, owner, role, admin, upload, account...); "shared" left out because it flags F2 and F3. - forge.sh no longer overwrites an existing harden label. - Self-test: 28 checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016efoiqPbKEzohdVDPcFcE4
Covers sharing features written as "shared with other users" without the bare word "shared", which would flag F2 and F3 as security work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016efois1hjx9JeuGhxWixrm
Live runs at cadc61e showed: CI-fix test edits missing from the PR, no reviewed head on the PR, no PR when HARDEN review fails, the checkpoint node failing after the skipped merge gate, and state-write and git-comparison failures passing silently. - Build records postbuild in state; ship lists test edits since it and refuses HARDEN without it. - review-pack fails on a missing base ref, unknown fix base, failed diff or empty diff, and records the reviewed head. - Verdict hands off ready, draft or stop. HARDEN without approval opens a draft PR with the findings. Push fails if anything but state/ changed after review. - checkpoint-harden records pr-open or pr-draft; the normal checkpoint only runs without HARDEN. - checkpoint.sh and brief.sh exit 1 on unreadable or unwritable state. - forge pr-create updates an existing PR and supports draft. - 14 new self-tests (43 total); all 14 fail on cadc61e. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016efois1hjx9JeuGhxWixrm
- Owner-only merge enforced on the path the workflow uses: merge-gate is skipped when HARDEN is on, and the checkpoint records pr-open. - HARDEN with test edits no longer cancels the run: the edited files are listed in the PR body. A missing edits list fails the verdict. - Test config files (config test_config[]) count as test edits. - HARDEN is recorded in state/<feature>.json and read back, so every workflow keeps it; checkpoint.sh now updates the file in place. - Keyword matching skips HTML comments and only the first paragraph and list items of "Out of scope"; issue template hints moved into comments. - Broader keywords (plurals, auth, share, owner, role, admin, upload, account...); "shared" left out because it flags F2 and F3. - forge.sh no longer overwrites an existing harden label. - Self-test: 28 checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016efoiqPbKEzohdVDPcFcE4
Covers sharing features written as "shared with other users" without the bare word "shared", which would flag F2 and F3 as security work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016efois1hjx9JeuGhxWixrm
- Change table gets a State column (2 Dec, master 86acb2b): change 9 done in #54, 3 half done on an unmerged branch, 8 partly, rest not started. Change 9 reworded to what #54 enforces. - New "Update, 2026-12-02: HARDEN verified": the five gaps the live checks found at cadc61e and their fixes, and the earlier overstatement of change 9. - Still open: why Phase 5 was blocked (install.sh) and that the fix is unmerged; HARDEN's GitHub-side block untested. - EVIDENCE C27 (HARDEN verification) and C28 (no branch protection). - Readout: State column, HARDEN and reuse lines on Path forward. - Removed shots/ at the repo root: unreferenced render-check images. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016efois1hjx9JeuGhxWixrm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016efoiqPbKEzohdVDPcFcE4
- Change table gets a State column (2 Dec, master 86acb2b): change 9 done in #54, 3 half done on an unmerged branch, 8 partly, rest not started. Change 9 reworded to what #54 enforces. - New "Update, 2026-12-02: HARDEN verified": the five gaps the live checks found at cadc61e and their fixes, and the earlier overstatement of change 9. - Still open: why Phase 5 was blocked (install.sh) and that the fix is unmerged; HARDEN's GitHub-side block untested. - EVIDENCE C27 (HARDEN verification) and C28 (no branch protection). - Readout: State column, HARDEN and reuse lines on Path forward. - Removed shots/ at the repo root: unreferenced render-check images. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016efois1hjx9JeuGhxWixrm
…s_rounds From branch ccr-99148463-yu76k7 (a27388f), merged onto master after PR #54. Version 0.3.0. - install.sh works in a folder that already has files, writes the starter files and a CI workflow, and renders the workflows (it linked .archon/workflows to a missing folder before, so nothing rendered). - spec.sh records each feature's spec folder in its state at design time; build, ship and the review pack read it instead of taking the newest folder. - address_rounds removed; render.sh refuses a config that sets it. - Conflicts with #54 resolved keeping #54's behaviour; the PR body's spec line uses spec.sh. Self-test gives its feature a spec folder. Bare Archon substitutions quoted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016efois1hjx9JeuGhxWixrm
Adds a
HARDENtag to the claudex harness, so security-sensitive features get extra checks that the agents can't skip. This is change 9 from the post-run review of the claudex simulation. Updated after review (d5e0130, fd88b28) and after live verification (1995699).What changes
HARDENat the end of the brief's first line, a whole-wordharden.keywordsmatch, or"harden": truealready instate/<F>.json. HTML comments and the first paragraph and list items of "Out of scope" aren't matched.HARDENwithTIER normalis refusedbrief.shrecords it instate/<F>.json, so design, build, ship and CI-fix all keep it.checkpoint.shnow updates that file in place instead of rewriting ittest_config[](Playwright and Vitest configs,package.json). WithHARDEN, the edited files are listed in the PR body; a missing list fails the verdictHARDEN,merge-gateis skipped andcheckpoint-hardenrecordspr-open, so the engine never merges it. PR labelledharden.forge.sh mergerefuses harden PRs, and any merge when it can't read labelscheckpoint.sh,brief.shandreview-pack.shexit 1, so the node fails before a review or handoffWhy: F4's open security items (timing on whitespace-only passwords, password change without the current password, CSRF) are all on the checklist, and its two post-build test edits were accepted by review alone.
Checks run
harness/scripts/selftest.sh: 43 passed, in CI. The 14 added for 1995699 all fail on cadc61e. Covers parsing, keywords (whole words, plurals, comments, out-of-scope rules), tier refusal, state carry-over, checkpoint keeping the flag, test-config edits listed byreview-pack.sh, and forge label and merge refusal with a fakegh(including a failinggh pr view).HARDEN, F1 to F3 don't. The issue template withTIER normaldoesn't.pr-openfor HARDEN whatever the decision. The PR node with a stub forge gives the label and lists the edits only with HARDEN.product-grep.sh: no product names inharness/.Live Archon runs on a disposable local repo (fixture config, no GitHub access): build → CI-fix that edits
package.json→ re-ship listed the edit against the post-build commit, named the reviewed head, skippedmerge-gate, recordedpr-openand completed. A weakened test was rejected by the reviewer and restored by the address round. A missing base ref stopped the run before review; a blocked state write failedpushwith nothing pushed. A normal-tier ship still merged through the gate. The draft PR path was run at node level with a scripted rejection, not by a live reviewer.Not covered
postbuild, so a HARDEN ship of one refuses to start until it is rebuilt.masterhas no branch protection today (checked read-only), and the automation identity is the owner's account, so the GitHub-side block is untested.ccr-99148463-yu76k7editsship.yaml,design.yaml,CONTRACTS.md,VERSIONand the configs too. Whichever merges second needs conflicts resolved.https://claude.ai/code/session_016efoiqPbKEzohdVDPcFcE4
Generated by Claude Code