Back to skill

Security audit

SageMaker

Security checks for vulnerabilities and agentic risk

Overview

This skill openly builds persistent agent memory, but its mandatory updates and broad future influence need review before installation.

Install only if you want this agent to maintain persistent memory that can affect later tasks. Review memory changes before promotion, keep memory scoped per project or user, and treat repository text, documents, web content, and tool output as untrusted evidence that should not become standing behavioral rules without approval.

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:34
Finding
Persistent Agent-State Influence Through Mandatory Memory Promotion<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 34–97 **Vulnerability Type**: Persistent contamination of agent memory and behavioral state **Risk Level**: Medium ### Vulnerable Code ```markdown ## Canonical Files - `memory/short_term/YYYY-MM-DD.md` (raw evidence) - `memory/mid_term/MEMORY.md` (near-term reusable conclusions) - `memory/long_term/MEMORY.md` (stable collaboration constraints) - `memory/knowledge.md` (transferable methods/policies) - `self-model.md` (current strengths/failures/growth themes/uncertainties) - `memory/check_memory.json` (daily/weekly gate state) ## Required Promotion Rules ### Update `self-model.md` only when: 1. recurring failure mode is re-validated 2. strength gains new evidence 3. active growth theme should switch ### Update `memory/knowledge.md` only when: 1. method is reusable across multiple scenarios 2. explicit evidence supports it 3. rule can be expressed as `if X then Y` ### Update `memory/long_term/MEMORY.md` only when: 1. improves long-term collaboration quality 2. is not short-term fluctuation ## Entry Quality Contract (mid/long) Every promoted item must include: - `reason` - `evidence` - `confidence` (`low|medium|high`) ## Task Coupling (Mandatory) For medium/high complexity tasks: 1. read `self-model.md` + `memory/knowledge.md` 2. write preflight checklist: - goal - success criteria - risks - uncertainty 3. include one post-task reflection item before execution starts ## Gate Model (`memory/check_memory.json`) Use dual gate state: ```json { "daily_need_update": 1, "daily_update_done": 0, "weekly_need_update": 1, "weekly_update_done": 0 } ``` Semantics: - `1/0` = pending - `0/1` = done - anything else = invalid; normalize to `1/0` ## Scheduling Pattern - Daily cycle: promote short->mid + prune short-term retention - Weekly cycle: promote mid->long - Heartbeat: recovery path only (when gate remains pending) Strict rule: success is valid only if gate flips to d ...[truncated 2932 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require explicit user approval before promoting any entry into `memory/knowledge.md`, `memory/long_term/MEMORY.md`, or `self-model.md`. 2. Store provenance with every entry, including the originating task, source type, source location, author or trust domain, creation time, and approval status. 3. Treat documents, retrieved content, repository text, and tool output as untrusted data. Never promote embedded instructions from those sources into behavioral policy. 4. Separate memory by user, project, and trust domain so content from one context cannot silently influence another. 5. Define an instruction hierarchy stating that persisted memory is advisory and can never override platform safety controls or current authorized user instructions. 6. Add review, expiry, revocation, and rollback mechanisms for every promoted entry. 7. Require corroboration from multiple independent trusted sources before promoting security-sensitive or behavior-changing conclusions. 8. Change the gate logic so successful completion of the user's primary task does not depend on a persistent memory write. Permit a safe “no update needed” state. 9. Validate memory files against a strict schema and prevent free-form content from being interpreted as executable commands or higher-priority instructions. 10. Maintain an append-only audit trail of promotions, approvals, edits, reads, and deletions so contamination can be investigated and reversed. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

Vague Triggers

Medium
Confidence
89% confidence
Finding
The skill description is very broad ('unified memory-and-growth operating system for agents' and 'any equipped agent can run the same self-calibration workflow') and does not define clear triggering boundaries, task types, or safety exclusions. In agent frameworks, overly broad invocation criteria can cause the skill to be applied in unintended contexts, leading to unnecessary file reads/writes, workflow hijacking, or propagation of behavior-governing changes into tasks that did not require this memory system.

Static analysis

No suspicious patterns detected.