Skip to content

chore(clawpatch): add threat-model specs for review surfaces - #2859

Merged
max-sixty merged 6 commits into
mainfrom
clawpatch
May 21, 2026
Merged

max-sixty merged 6 commits into
mainfrom
clawpatch

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Clawpatch feature specs — one JSON file per review surface, describing the threat model and the files/entrypoints each automated review run should audit. The repo already carries five such specs under .config/clawpatch/features/; this adds eight more and refines one.

New surfaces: approvals storage, hook logs, network boundary, performance, prune, shell integration, signal handling, template expansion.

feat_custom_switch_resolve.json gets a small refinement. feat_custom_network_boundary.json is rewritten to be activity-based — matching the Network Access policy reword in #2850: the audit keys on whether an egress sits in a fast command or a synchronous hot path, not on a fixed accessor blocklist.

Config-only — no code change. The clawpatch run state (findings/, runs/, reports/, patches/) stays gitignored.

This was written by Claude Code on behalf of Maximilian Roos

max-sixty and others added 6 commits May 19, 2026 23:04
Hand-authored clawpatch feature specs covering uncovered
security, data-safety, and performance surfaces; also expand
switch_resolve to own the per-provider forge files.

- hook_logs: .git/wt/logs path sanitization
- shell_integration: generated wrapper code + rc-file edits
- prune: wt step prune data safety + .git/config race
- template_expansion: MiniJinja injection surface
- network_boundary: local-first network-access audit
- signal_handling: Ctrl-C aborts every child-process loop
- approvals_storage: approvals.toml trust-store integrity
- performance: TTFP + parallel status collection
- switch_resolve: +github/gitlab/gitea/azure provider files

Co-Authored-By: Claude <[email protected]>
Align feat_custom_network_boundary with the activity-based Network
Access policy (#2850): the audit keys on whether an egress sits in a
fast command or a synchronous hot path, not on a fixed accessor
blocklist. Refresh the statusline owned-file reason (its CI-status
egress is sanctioned because Claude Code consumes the output
asynchronously) and the CLAUDE.md context reason.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@max-sixty
max-sixty merged commit 94dece4 into main May 21, 2026
35 checks passed
@max-sixty
max-sixty deleted the clawpatch branch May 21, 2026 16:45
max-sixty added a commit that referenced this pull request May 23, 2026
Adds eight clawpatch feature specs and refines feat_custom_network_boundary to be activity-based (matching the Network Access reword in #2850). Config-only — no code change.
max-sixty pushed a commit that referenced this pull request Aug 15, 2026
… that enforces it (#3823)

Nightly survey finding. The signal-handling clawpatch spec lists
`src/commands/command_approval.rs` as a context file with the reason
"FailureStrategy::Warn must not swallow signal-derived errors" — but
that file contains no reference to `FailureStrategy`, signals, or
interrupts. `grep -n "signal\|Interrupt\|FailureStrategy"
src/commands/command_approval.rs` returns nothing, and `git log -S
FailureStrategy -- src/commands/command_approval.rs` is empty, so the
entry has been wrong since the spec was added in #2859 rather than
having drifted.

`FailureStrategy` is declared and consumed entirely in
`src/commands/command_executor.rs`, which the spec already lists as an
owned file. So this drops the misfiled context entry and folds its claim
— the one detail the owned-file reason didn't carry, that the interrupt
check runs *before* any `FailureStrategy` branch — into that entry,
matching how CLAUDE.md → Signal Handling states it. Nothing is lost from
the spec; it just points at the file that implements the invariant.

I checked the rest of the specs the same way: every `path` in
`entrypoints` / `ownedFiles` / `contextFiles` / `tests` across all 14
`.config/clawpatch/features/*.json` resolves, every
`entrypoints[].symbol` appears in its named file, and this was the only
reason string naming a symbol its file doesn't contain.

No regression test — the change is metadata prose in a file no test
reads, and the mismatch isn't expressible as an assertion without
inventing a schema check for `reason` strings, which would be a larger
and more speculative change than the fix.

Co-authored-by: worktrunk-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants