Document or align skill-install vs Read/Grep severity gating
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 197
- Forks
- 51
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 94
Description
Why
The PostToolUse hooks in `src/lib/yara-hooks.ts` apply different severity gates to the same triaged match depending on which surface fired:
- Read/Grep: terminates only on `severity === 'critical' || action === 'block'`; medium/low matches warn-and-continue via `additionalContext`.
- Skill install: terminates on ANY post-triage match, with no severity check.
A medium-severity prompt-injection rule (e.g., `prompt_injection_chat_markup`) that warrants a warning on a project file becomes a full session abort on a skill download.
There's a code comment marking this as INTENTIONAL ASYMMETRY (skills are untrusted external code), but no test pins the contract and no doc explains the threat-model reasoning.
What needs to happen
Pick one:
Option A — Document and lock in. Add a test that pins the asymmetry: a medium-severity match on Read/Grep should NOT terminate; the same match on skill install should. Update ARCHITECTURE.md with the threat-model reasoning.
Option B — Align severity gates. Apply `severity === 'critical' || action === 'block'` to skill install too.
Option A is probably right — skills genuinely are higher-risk content. But the asymmetry should be a deliberate, tested decision.
Anchor
`src/lib/yara-hooks.ts` — the skill-install hook handler (search for "INTENTIONAL ASYMMETRY" comment).
🤖 Generated with Claude Code
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/lib/yara-hooks.ts at the skill-install handler and the “INTENTIONAL ASYMMETRY” comment, then compare its gate with the Read/Grep PostToolUse path. Choose whether to document and lock in the asymmetry or align the gates; update ARCHITECTURE.md and add the corresponding regression test so the selected behavior is explicit and tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100