Skip to content

general-audit: fold lessons #628#629

Merged
intendednull merged 1 commit into
mainfrom
claude/general-audit-lessons-2026-05-04
May 5, 2026
Merged

general-audit: fold lessons #628#629
intendednull merged 1 commit into
mainfrom
claude/general-audit-lessons-2026-05-04

Conversation

@intendednull
Copy link
Copy Markdown
Owner

Closes #628.

Folds the 2026-05-04 /general-audit lessons (issue #628) into .claude/skills/general-audit/SKILL.md. Mechanical application of each suggested edit from the lessons issue.

Edits applied

  • Pass 1 sub-pattern (d): validator scope creep. New section after (a)/(b)/(c). When a closed PR added a per-field validator/cap on one variant of an enum/map/struct, look for the same shape on all sibling variants. PR audit F16 [security]: Content::File size_bytes attacker-declared, filename/mime unbounded #583's Content::File-only caps surfaced 5 sibling findings this run (F11–F15: Content::Text/Reply/Edit/System/Reaction, SealedContent.ciphertext, all EventKind String fields).
  • Verification subagent has GitHub MCP access. Note added to the verification step: mcp__github__issue_read is available; don't return partially-verified for "could not verify issue closed via gh CLI." This run had to close one such finding (F06, TODO(#119) stale closed-issue ref) post-hoc in the orchestrator.
  • Don't dispatch dedup until ALL sweep agents land. Recompute the raw-findings count immediately before dispatching dedup; if it changed, append the new entries to the brief. This run's general agent landed two findings (F9 docker relay break, F10 stale README ports) AFTER the initial dedup brief had been prepared, requiring a manual second-pass dedup.
  • Authority-spec drift is an architecture concern, not security. Note added to Approach: events emitted outside apply_event (e.g. invite-mint as out-of-band side channel) belong in the architecture lane. The 2026-05-04 audit caught the invite-mint authority issue ONLY in the architecture-backfill agent — security-auth's framing assumed all authority is in apply_event.
  • Broader time budget for general + sibling-of-closed. 8 min instead of 6 min default; both consistently brush against the 6-min cap.
  • Final-summary rule for sweep agents. Report path + one-line strongest finding only; never echo finding bodies. Saves orchestrator context (subagent return summaries currently re-echo full finding texts).
  • Pre-fetch available severity-label set before filing child issues. Don't guess security/robustness labels exist; verify against recent audit issues' labels arrays. This run filed all child issues with audit only (and tech-debt where confirmed) because severity-label existence wasn't verified upfront.

Edits skipped

Auto-generated by /general-audit. Human review required before merge.


Generated by Claude Code

Applied:
- Pass 1 sub-pattern (d): validator scope creep — single-variant validators (PR #583's `Content::File`-only caps) almost always need to extend to all sibling variants. Caught 5 findings this run.
- Verification subagent has access to `mcp__github__issue_read` — closed-issue check should not return `partially-verified` when GH MCP can confirm.
- Don't dispatch dedup until ALL sweep agents land; recompute raw count just before dispatch. The 2026-05-04 run's `general` agent landed F9/F10 (relay docker break + stale port docs) AFTER initial dedup brief was prepared.
- Authority-spec drift = architecture concern, not security. The architecture lane owns events emitted outside `apply_event` (e.g. invite-mint side channels). Security-auth lane should look but architecture lane catches.
- Agent prompts: 8 min budget for broad-scope agents (`general`, `sibling-of-closed`); per-concern agents stay at 6 min.
- Agent final-summary rule: report path + one-line strongest finding only, never echo finding bodies. Saves orchestrator context.
- Pre-fetch available severity-label set before filing child issues. Don't guess `security`/`robustness` exist — verify against recent audit issues' `labels` field.

Skipped:
- "Reiterate master-body keep-dedup-metadata-minimal" — already codified at the existing "Master issue body" paragraph; second copy would just drift over time.

https://claude.ai/code/session_01H1t1f3KpZuQfXV3CmG1JhS
@intendednull intendednull merged commit c397929 into main May 5, 2026
7 of 8 checks passed
@intendednull intendednull deleted the claude/general-audit-lessons-2026-05-04 branch May 5, 2026 04:24
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.

general-audit lessons: 2026-05-04

2 participants