Back to skill

Security audit

Instruction Anchor Guard

Security checks for vulnerabilities and agentic risk

Overview

The skill has a legitimate instruction-preservation purpose, but it automatically persists user-derived instructions and reloads them into future planning without enough validation or user control.

Install only if you are comfortable with the agent saving selected user constraints into workspace memory files and using them to influence later turns. Prefer explicit opt-in for anchor creation, inspect or clear the ledger regularly, and keep the ledger in trusted workspaces only.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:29
Finding

Persistent Instruction Poisoning Through an Unvalidated Anchor Ledger

Content
View full analysis
- **source**: - **instruction**: - **verbatim**: - **priority**: P0 | P1 | P2 - **scope**: global | session | task: | channel: - **createdAt**: - **expiresAt**: - **status**: active | paused | expired | superseded - **signature**: - **supersedes**: ``` ## Workflow ### 1) Capture - Parse latest user message for candidate anchor statements - Keep only instruction/constraint content; remove examples/chatter - Assign default values: - priority: P1 (unless user says critical/highest -> P0) - scope: session (unless user explicitly asks global/task scope) - expiresAt: session end (unless user explicitly sets never/date) ### 2) Confirm for Broad Anchors - If scope is `global` or priority is `P0`, ask a one-line confirmation before persisting - Do not auto-promote P2/P1 to P0 without explicit user intent ### 3) Persist - Append anchor entry to ledger - If new anchor conflicts with old same-scope anchor, mark old one `superseded` - Never rewrite history silently; keep audit trail ### 4) Rehydrate (each turn and after compaction) - Load active anchors (status=active and not expired) - Build an in-memory `ANCHOR_SET` sorted by priority and recency - Inject `ANCHOR_SET` into planning phase before tool execution ``` ### Technical Analysis The skill directs the agent to extract user-controlled instructi ...[truncated 2980 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1)May include surrounding context.

md
---
name: instruction-anchor-guard
version: 1.1.0
description: Preserve user-critical instructions across long sessions and context compaction. Use when users mark constraints as important/must/always/never/highest-priority/rules, and enforce anchor checks before and after compaction to prevent plan drift.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger conditions are broad enough to activate on many normal conversations, especially any multi-turn task with more than 3 steps or common words like 'important' and 'must'. That can cause the skill to persist and prioritize instructions unexpectedly, increasing the chance of over-retention, workflow interference, or unintended policy-like behavior across unrelated tasks.

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 · SKILL.md (reported line 97)May include surrounding context.

md
ANCHORS_ACTIVE
| ID | P | Scope | Expires | Instruction |
|----|---|-------|---------|-------------|
| anchor-001 | P0 | global | never | Never perform destructive data deletion without confirmation |

PLAN_GUARD
- Current action: <action>

Static analysis

No suspicious patterns detected.