Skip to content

AS3 flags current-skill SKILL.md self-references as Agent Snooping #500

Closed

Description

@chrisknvidia

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 json

Current 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.md does 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

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

  1. changed the title [-]AS3 flags declarative skill references as Agent Snooping[/-] [+]AS3 flags current-skill SKILL.md self-references as Agent Snooping[/+] on Sep 9, 2026
  2. chrisknvidia commented on Sep 9, 2026

    @chrisknvidia
    CollaboratorAuthor

    Implementation is in progress in draft PR #506.

  3. rng1995 commented on Sep 16, 2026

    @rng1995
    Collaborator

    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.

  4. rng1995 commented on Sep 16, 2026

    @rng1995
    Collaborator

    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.

  5. rng1995 commented on Sep 21, 2026

    @rng1995
    Collaborator

    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.

  6. rng1995 commented on Sep 21, 2026

    @rng1995
    Collaborator

    #580 is also merged. Closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions