Back to skill

Security audit

glass2claw

Security checks for vulnerabilities and agentic risk

Overview

This Markdown-only skill is transparent about routing personal photos, but its sample specialist can post images and write database records based on a forgeable routing marker without its own approval check.

Review before installing. Use this only with private, allowlisted source and destination sessions, keep automatic routing off unless scoped to a named route, and give Discord/database credentials the minimum write permissions needed. Before deploying the sample specialist, add a local approval or signed-envelope check so direct or replayed `[Vision Router]` messages cannot post images or create database records.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SAMPLE_AGENT.md:9
Finding

Unauthenticated Routing Markers Can Trigger Cross-Session Posts and Persistent Database Writes

Content
View full analysis

Vulnerability Details

File Location: SAMPLE_AGENT.md:9-20, SAMPLE_AGENT.md:26-29, and SAMPLE_SOUL_WINE.md:9-23
Vulnerability Type: Missing authentication and authorization for routed agent messages
Risk Level: Medium

Vulnerable Code

SAMPLE_AGENT.md:9-20:

markdown
When you receive a message containing an image URL forwarded from WhatsApp (look for `[Ingress:WhatsApp]` prefix or a bare image URL), do the following:

1. **Do NOT** describe or analyze the image yourself
2. **Immediately** classify the image intent from the URL context or any accompanying text:
   - 🍷 **Wine** — bottle, label, glass, wine list
   - 🍵 **Tea** — tea tin, tea cake, tea leaves, packaging
   - 🚬 **Cigar** — cigar band, humidor, cigar box
   - 👤 **Contacts** — face, business card, name badge, event badge
   - 📄 **Other** — anything else; log it and ask for clarification
3. **Preview** the detected category and the exact allowlisted destination.
4. **Ask for confirmation** before cross-session forwarding or any persistent database/channel write, unless the user has explicitly enabled automatic routing for that named destination.
5. **Forward** using `sessions_send` only after the confirmation boundary is satisfied.

SAMPLE_AGENT.md:26-29:

markdown
sessions_send(
  sessionKey = "<your-wine-channel-session-key>",
  message = "[Vision Router] New image.\nType: Wine\nImage: <image_url>\n\nINSTRUCTION: Post the image to the channel, then analyze and log to your database."
)

SAMPLE_SOUL_WINE.md:9-23:

markdown
You are a wine specialist agent. Your job is to receive wine photos routed from the Vision Hub, post them to this channel, analyze the wine, and log a structured entry to the user's wine database.

## When You Receive a `[Vision Router]` Message

Execute these steps **in order, in a single turn**:

1. **Post the image** to this Discord channel using the `message` tool with `media: <image_url>`
2. **Analyze** the wi
...[truncated 4077 chars]
Remediation
View remediation

Remediation Suggestions

  1. Authenticate routing messages

    • Accept ingress only from immutable, explicitly allowlisted channel, participant, and session identifiers.
    • Do not use [Ingress:WhatsApp], [Vision Router], or any other user-controlled text as proof of origin.
    • Reject messages when trusted transport metadata is unavailable.
  2. Use integrity-protected routing envelopes

    • Have the hub create a signed envelope containing the source session, destination identifier, media identifier, operation type, approval state, timestamp, expiration, and unique nonce.
    • Validate the signature and every field at the specialist before performing any external action.
    • Bind the approval to the exact media item, destination, and requested write.
  3. Enforce authorization at the side-effect boundary

    • Require the specialist itself to verify authorization before posting media or writing to a database.
    • Do not rely solely on the upstream hub to obtain confirmation.
    • Reject direct specialist messages that lack verifiable routing metadata.
  4. Prevent replay

    • Give every routing request a unique identifier and short expiration.
    • Store consumed identifiers for the validity period and reject duplicate requests.
    • Require fresh confirmation if the request expires or its destination changes.
  5. Validate media references

    • Permit only required URL schemes, preferably HTTPS.
    • Allowlist trusted media hosts or use validated platform attachment identifiers instead of arbitrary URLs.
    • Reject loopback, private, link-local, and cloud metadata network destinations where URL retrieval is supported.
    • Apply size, content-type, redirect, and download-time limits.
  6. Apply least privilege

    • Limit each specialist to its specific destination channel and database collection.
    • Use credentials that can create only the required record types and cannot administer or export the entire database.
    • Keep automatic ...[truncated 349 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest advertises 'auto-routes your photo into the right database' and 'Hands-free life logging,' which directly conflicts with the stated requirement for explicit opt-in routing, allowlisted destinations, and confirmation before persistent writes or cross-session forwarding. In a photo-ingestion skill handling images from wearable cameras and WhatsApp, this language indicates a design or implementation posture that could enable silent collection, forwarding, or storage of sensitive images without meaningful user consent.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · README.md (reported line 30)May include surrounding context.

md
## Privacy boundaries

- Treat every image and extracted identifier as private input.
- Do not forward to another participant, session, database, or channel without consent.
- Keep persistence off by default and show the selected destination before a write.

## License

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The sample persona expands the skill from photo routing into downstream analysis and persistent database logging, which goes beyond the narrowly described manifest purpose. This creates scope creep: a user may consent to image forwarding but not to durable storage or secondary processing in external systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The persona instructs reposting user images into a Discord channel without an explicit privacy warning, even though photos may contain sensitive metadata or contextual information beyond the wine label. Re-sharing content to a messaging channel is a disclosure event, and the instruction normalizes automatic forwarding without ensuring the user understands the audience or permanence of the post.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The instruction to write to Notion, Airtable, or another configured database authorizes external side effects that are broader than approved photo routing. Because these writes are persistent and may affect third-party services, they materially increase privacy and integrity risk if performed without narrowly scoped consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Writing structured entries to a user's external wine database changes persistent data without any visible warning or confirmation in the persona instructions. This is dangerous because the routed image may contain incorrect or partial OCR-derived details, causing unauthorized or inaccurate records to be created in systems the user may not expect to be modified automatically.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.