SkillSpector
SkillSpector copied to clipboard
EA2 scores "Never X without asking the user first" the same as "X without asking"; EA1 and OH3 fire on descriptive prose
Summary
Three prose patterns fire on sentences that restrict the agent or describe a data field:
- EA2 gives "Never create or comment on an issue without asking the user first" the same finding (MEDIUM 0.75) as "Push without asking." The negated sentence is a consent requirement. Negation handling from #652 / #658 doesn't reach this pattern.
- EA1 reads "Run any command with no argument and it asks which bill you mean" (about the plugin's own slash commands) as arbitrary command execution.
- OH3 reads "The
summaryfield has no length cap" (API documentation about a returned field) as an instruction to produce unbounded output.
In a published plugin I scanned, these gave 30 occurrences (EA2 19, OH3 10, EA1 1), and none were real.
Environment
- SkillSpector v2.13.7 (same version as
mainat636e4293) skillspector scan <dir> --no-llm --format json(static only)- Windows 11
Reproduction
ea/SKILL.md:
---
name: ea
description: Minimal reproducer.
---
# Rules
Never create or comment on an issue without asking the user first.
Push without asking.
Run any command with no argument and it asks which bill you mean.
The `summary` field has no length cap, so quote it rather than reflow it.
score 26 MEDIUM CAUTION
EA2 MEDIUM 0.75 SKILL.md:8 | 'without asking' <- prohibition
EA2 MEDIUM 0.75 SKILL.md:10 | 'without asking' <- the real thing, scored identically
EA1 MEDIUM 0.8 SKILL.md:12 | 'Run any command'
OH3 MEDIUM 0.75 SKILL.md:14 | 'no length cap'
"Do not delete files without asking the user." and "Never push without asking." also give EA2 MEDIUM 0.75.
Cause
- EA2 (
static_patterns_excessive_agency.py):(?:without|no)\s+(?:asking|confirmation|approval|consent|verification|checking)has no check for a precedingnever,do not,don'tormust notin the same clause. Under "never X without asking", asking is required. - EA1:
(?:execute|run)\s+(?:arbitrary|any)\s+(?:commands?|code|scripts?)matches "run any command" with no context. Here it means "any of this plugin's slash commands", followed by "with no argument". - OH3 (
static_patterns_output_handling.py):(?:no|without|disable)\s+(?:output\s+)?(?:length|size|token)\s+(?:limit|cap|maximum|restriction)matches a description of an input or result field ("the X field has no length cap") as if it were an instruction about the model's own output.
Expected
- EA2: a match inside a clause negated by
never,do not,don'tormust notshould not be reported (or should be down-ranked well below the un-negated form). - EA1 / OH3: require imperative framing aimed at the agent, e.g. "you may run any command" or "generate output with no length cap", rather than a descriptive or third-person subject.
I can take this one. EA2 scores a negated consent requirement the same as the un-negated form, and EA1 and OH3 fire on descriptive prose. I will reproduce on current main, scope the fix so negated clauses and descriptive subjects no longer emit findings while the real imperative forms still fire, add regression tests, and open a PR.