Repository navigation
AS3 flags current-skill SKILL.md self-references as Agent Snooping #500
Description
Summary
SkillSpector 2.11.1 reports AS3 / Skill Enumeration when a skill document merely names its own manifest path, for example:
Root skill: `skills/example-skill/SKILL.md`There is no filesystem read, enumeration, or access to another installed skill. A declarative self-reference is therefore classified as Agent Snooping and can fail downstream security gates.
Reproduction (v2.11.1)
Create example-skill/SKILL.md:
---
name: example-skill
description: Example skill.
---
# Team guidance
Root skill: `skills/example-skill/SKILL.md`Run:
skillspector scan ./example-skill --no-llm --format jsonCurrent result: an AS3 Skill Enumeration finding at MEDIUM severity and confidence 0.8 whose matched text is skills/example-skill/SKILL.md.
Expected result: no AS3 finding for this line because the path identifies the currently scanned skill, not a peer skill.
Root cause
The AS3 path pattern matches every token shaped like skills/<non-CURRENT-name>/SKILL.md, independent of whether <name> identifies the current skill:
r"skills?/(?:(?!CURRENT)[A-Z][A-Za-z0-9_-]+)/SKILL\.md"The analyzer applies the pattern with re.IGNORECASE. It does not compare the captured path segment with the scan-root basename or manifest name.
Expected behavior / acceptance criteria
- A current-skill reference such as
Root skill: skills/example-skill/SKILL.mddoes not emit AS3. - Current-skill identity works from both the scan-root basename and manifest
name, including temporary clone/extraction directory names. - References to a different skill remain AS3, including the existing
open("skills/other-skill/SKILL.md").read()positive control. - Explicit enumeration of installed skill directories remains AS3.
- AS1 and AS2 behavior remains unchanged.
- Add paired negative and malicious positive regression tests.
- Filtering occurs before inspection-ledger emission so completed ledger events do not retain stale emitted finding IDs.
- Verify the static analyzer and a real no-LLM CLI scan of the minimal fixture.
Suggested direction
Capture the skill-name segment in the path-only AS3 match, derive normalized current-skill identifiers from the scan root and manifest, and suppress only AS3 findings whose path segment identifies the current skill. Preserve peer-skill path detection and the existing explicit read/enumeration detections.
Related
- feat(analyzer): detect skills snooping on the agent ecosystem (other skills, MCP config, agent memory) #75 and feat(analyzer): add agent snooping detector (AS1/AS2/AS3) #96 introduced AS3 with the intended scope of
skills/*/SKILL.mdoutside the scanned skill. - [Feature] Expose the file surface a finding landed on (code / instructions / docs / tests / config) #326 is related report-surface work, but it does not fix this false positive.
AI assistance disclosure: Codex helped inspect the current source, reduce an observed CI finding to this public minimal reproduction, and draft the regression criteria. I reviewed the evidence and proposed scope.
Activity
[-]AS3 flags declarative skill references as Agent Snooping[/-][+]AS3 flags current-skill SKILL.md self-references as Agent Snooping[/+]chrisknvidia commentedon Sep 9, 2026
Implementation is in progress in draft PR #506.
rng1995 commentedon Sep 16, 2026
Resolved by #506, now merged to
main. AS3 suppresses only literal references to the currently scanned skill while preserving peer-skill references, transformed paths, explicit enumeration, AS1, and AS2 findings. Focused current-main validation passed, including the real no-LLM fixture. The fix is queued for the still-unpublished v2.12.0 release in #550.Closing as completed on
main.rng1995 commentedon Sep 16, 2026
Reopening after a stricter acceptance-criteria audit. Merged PR #506 fixes the local case where the scan-root basename and manifest name agree, but the current implementation deliberately fails closed when they differ and does not accept the manifest name as an independent current-skill identity. Therefore the issue requirement covering temporary clone/extraction directory names remains unmet. The merged work is still valuable, but this issue is only partially resolved until that remaining identity case is addressed or explicitly descoped.
fix(as3): corroborate manifest with selected source identity
rng1995 commentedon Sep 21, 2026
The remaining temporary-clone/extraction-directory case is now addressed by proposed PR #580. It accepts the manifest name and scan-root basename as independent current-skill identities while retaining peer-skill detection.
PR #506 is merged but only covers the earlier slice. #580 is still open, so this issue remains open pending its review/merge and verification of the remaining acceptance criteria.
fix(as3): preserve skill identity across input materialization (#580)
rng1995 commentedon Sep 21, 2026
#580 is also merged. Closing this issue