T01 · Skill Instruction Hijacking
- Location
SKILL.md:430- Finding
Persistent Agent Instruction Hijacking Through Mandatory Heartbeat Rules
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a real cloud-memory agent toolkit, but it asks agents to persist and upload broad working context over insecure defaults and recurring rules, so users should review it carefully before use.
Install only if you intend to use AgentOS as a cloud memory and agent-operations system. Before enabling it, change all endpoints to HTTPS, use least-privilege and revocable API keys, avoid uploading raw conversation logs or secrets, do not add mandatory AGENTS.md or HEARTBEAT.md rules without explicit approval, and treat retrieved memories as untrusted data rather than instructions.
SKILL.md:430Persistent Agent Instruction Hijacking Through Mandatory Heartbeat Rules
agentos.sh:21Bearer Credentials and Broad Agent Context Transmitted Over Plaintext HTTP
examples/startup-routine.sh:17Untrusted Remote Memories Loaded as Identity, Goals, and Behavioral Guidance
scripts/mesh.sh:16Mesh Queue Uses Non-Atomic Files Without Enforced Private Permissions
scripts/mesh.sh:209Mesh Status Command Discloses a Large API-Key Prefix
Instructions found that direct the agent to transmit conversation context or user data to external services.
aos mesh send <agent-id> "Topic" "Message body"
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
|---------|-------------|
| `aos memory put <path> <json>` | Store memory |
| `aos memory get <path>` | Read memory |
| `aos memory delete <path>` | Delete memory |
| `aos memory list [prefix]` | List paths |
| `aos memory search <query>` | Semantic search |
| `aos memory history <path>` | Version history |
Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
## 4. Anti-Compaction Protocol
**Compaction is unpredictable. It WILL happen without warning. Prepare constantly.**
### Memory Save After Every Task
The setup instructs users to send API traffic to an external endpoint over plain HTTP, which exposes API keys and all transmitted memory/context data to interception or modification by any network adversary in path. Because the integration is specifically for agent memory sync and context recall, compromise of this channel can leak sensitive operational data and enable tampering with the agent's retrieved context.
The mandatory heartbeat protocol requires persistent capture of broad working memory, active session details, accomplishments, and conversation notes into local files and then remote storage. That design materially increases the chance of retaining sensitive user data, internal code details, credentials, or regulated information beyond necessity.
The guide explicitly instructs the agent to upload the contents of CONTEXT.md and daily notes to a remote AgentOS memory service. Because those files are defined earlier as containing current session state, accomplishments, tasks, and conversation notes, this creates a real risk of off-machine transmission of sensitive user data, secrets, or proprietary local context without any minimization or consent controls.
The memory guidance encourages storing broad categories such as decisions, learnings, solutions, configuration, and user preferences, including making them searchable and highly important. Without any privacy boundaries, this incentivizes long-term retention and indexing of potentially sensitive information, making later misuse or accidental disclosure more likely.
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.
# 2. Log the fix
aos memory put /solutions/verify-before-done '{
"problem": "Claiming done without verification",
"solution": "Always run test suite before marking complete",
"prevention": "Add verification step to task completion checklist"
}'
The documentation explicitly recommends storing per-person relationship context, preferences, communication style, and past interactions without any privacy, consent, minimization, or retention guidance. In an agent memory system, this can normalize collection of sensitive personal data and lead to privacy violations, unauthorized profiling, or noncompliant data handling.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
aos_mistake
"I claimed a deployment was complete without verifying the endpoint"
"Rushed to respond, didn't follow verification checklist"
"Always curl the endpoint after deploying before saying 'done'"
"high"
The best-practices section encourages storing anything important and using sync/export capabilities, but it does not warn against placing secrets, personal data, credentials, or regulated information into long-lived searchable memory. That increases the risk of oversharing, broad replication, accidental retrieval, and exposure through search, dumps, webhooks, or multi-agent sharing.
The core principle strongly encourages writing anything important to files and frames aggressive persistence as mandatory. That kind of indiscriminate retention language is dangerous because it normalizes storing all context, including sensitive user or operational information, without classification or consent boundaries.
The daily logging and checkpoint examples explicitly capture raw task names, results, pending work, and notes. In realistic agent workflows, those free-text fields often contain customer data, credentials, incident details, or proprietary implementation context, so the pattern creates a predictable leakage and over-retention channel.
The guidance tells agents to persist task results, notes, and working context after every task and during checkpoints, but it provides no limits on what may be written. In practice, those fields can easily contain secrets, personal data, internal URLs, tokens, or customer/project information, creating a durable confidentiality risk if logs are later read, searched, synced, or exposed.
Automatically listing and displaying accumulated memory at session start amplifies the harm of prior over-collection by making sensitive data easy to re-expose. This is especially risky in shared terminals, recorded sessions, or environments where command output is captured by tooling.
The session-start routine automatically reloads and prints working memory, task history, pending work, and recent learnings. If earlier steps stored sensitive material, this routine will resurface it broadly and repeatedly, increasing accidental disclosure to users, operators, logs, or downstream tools.
The memory categorization guidance encourages storing identity, preferences, team structure, access information, and user profiles in persistent memory, but it does not provide collection limits, consent requirements, or restrictions on sensitive content. In an agent skill, such broad persistence guidance can normalize unnecessary profiling and long-term retention of personal data.
The webhook section explicitly shows how to forward AgentOS memory events, including memory values and metadata, to an external URL but does not warn that this may disclose sensitive workspace or user data. In a skill meant for autonomous agents, examples often become default behavior, so omission of consent, minimization, and redaction guidance materially increases privacy and data-exfiltration risk.
The curl example configures an outbound webhook integration to an external server, which is a direct external transmission channel. While integrations are legitimate, the skill does not pair this with sufficient disclosure or safeguards, so an agent following the example could send internal memory change events to third-party infrastructure without adequate review.
# Register a webhook (via dashboard or API)
curl -X POST "$AGENTOS_BASE_URL/v1/webhooks" \
-H "Authorization: Bearer $AGENTOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
The mandatory heartbeat backup protocol instructs agents to sync CONTEXT.md and daily notes to the cloud on every heartbeat, without warning that these files may contain private conversation content, source code, internal project details, or secrets. Because the instruction is framed as a hard rule and recurring automation, it creates a high likelihood of continuous over-collection and external transmission of sensitive data.
This section directs the agent to persist important conversation notes, active tasks, daily notes, and current session context on every heartbeat. That creates systematic retention of potentially sensitive user-provided information beyond the immediate session, increasing privacy exposure, breach impact, and the chance of storing data the user did not expect to be retained.
The helper sends arbitrary payload data and the Authorization bearer token to an external endpoint, and the configured default uses unencrypted HTTP. In this skill context, the transmitted data includes long-term memory, working context, reflections, and mesh communications, so compromise of the channel could expose or alter highly sensitive agent information.
local endpoint="$1"
local data="$2"
curl -s -X POST \
--max-time "$AGENTOS_TIMEOUT" \
-H "Authorization: Bearer $AGENTOS_API_KEY" \
-H "Content-Type: application/json" \
This SDK transmits agent memory and a bearer API key to a remote service, and the default base URL is plain HTTP to a hard-coded IP address. That allows interception or tampering of sensitive data and credentials in transit, which is especially dangerous because the script is designed to store context, reflections, tasks, and other potentially sensitive agent state.
The delete helper tombstones a memory path through a remote API call, but it has no confirmation prompt and no explicit cautionary warning beyond the brief function comment. For a destructive operation, users are not clearly alerted to the impact before invoking it.
The documentation for aos_mesh_pending says it will list pending messages, and aos_mesh_process says it will process pending messages, but both functions operate solely on MESH_PENDING_FILE in the local filesystem. There is no code here that retrieves pending messages from the remote mesh API, so the comments imply a broader mesh-backed capability than the implementation actually provides.
Detected: suspicious.install_untrusted_source