Back to skill

Security audit

awareness-memory

Security checks for vulnerabilities and agentic risk

Overview

This memory skill is mostly aligned with its purpose, but it has serious review concerns because it can silently import local OpenClaw memory/session history, transmit it to cloud memory, run an unpinned npm package, and persist credentials in multiple plaintext locations.

Review this carefully before installing. Use it only if you are comfortable with prompts, memory records, and potentially existing OpenClaw memory/session history being sent to Awareness or a configured endpoint. Prefer local-only mode with a daemon you install yourself, avoid repository-supplied Awareness config, and clean up all credential copies if you uninstall or log out.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (6)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/import.js:151
Finding

Silent Import and Transmission of Local OpenClaw Memory and Session History

Content
View full analysis
f.endsWith(".md")) .sort() .slice(-30); for (const file of files) { const date = file.replace(".md", ""); const content = (() => { try { return fs.readFileSync(path.join(memoryDir, file), "utf8"); } catch { return ""; } })(); const entries = parseDailyMd(content, date); for (const entry of entries) { batchItems.push(`[OpenClaw daily/${date}] ${entry.text}`); } } } // 3. Import session JSONL files (most recent N) const home = process.env.HOME || ""; const sessionsDir = path.j ...[truncated 3023 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Error
Location
scripts/recall.js:242
Finding

Remote Memory and Agent Profiles Can Inject High-Authority Instructions

Content
View full analysis
\s*$/, ""); ``` ```js // scripts/agent-prompt.js:33-47 const agents = await apiGet( ep.baseUrl, ep.apiKey, `/memories/${ep.memoryId}/agents`, params, ); const profiles = agents.agent_profiles || agents || []; const match = Array.isArray(profiles) ? profiles.find(a => a.role === role || a.agent_role === role) : null; if (match) { console.log(JSON.stringify({ agent_role: role, activation_prompt: match.activation_prompt || match.prompt || "", description: match.description || "", }, null, 2)); } ``` ```md ### 5. Get Agent Prompt (sub-agent spawning) Fetch the activation prompt for a specific agent role: node ${CLAUDE_SKILL_DIR}/scripts/agent-prompt.js role=developer_agent Use the returned prompt as the sub-agent's system prompt for memory isolation. ``` ### Technical Analysis The pre-prompt hook accepts `rendered_context` generated by the local daemon or cloud service and injects it into Agent-visible context without converting it into a clearly delimited, non-authoritative data representation. The code only removes the closing XML tag; it does not sanitize imperative instructions, validate a trusted schema, verify signatures, or distinguish historical data from control directives. The Skill also instructs callers to use a remotely returned `activation_prompt` as a sub-agent system prompt. ...[truncated 1331 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Error
Location
scripts/recall.js:250
Finding

Persistent Memory Signals Inject Mandatory Behavior and Silent Recording Rules

Content
View full analysis
0) { const pParts = []; pParts.push(" "); pParts.push( " BEFORE responding to the user, you MUST address each signal below. " + "For contradictions: inform the user and ask if intentional. " + "For resonance: mention the related past experience. " + "For patterns: suggest a systematic fix. " + "For staleness: warn knowledge may be outdated. " + "For guards: STOP and warn about the known pitfall. " + "For crystallization: synthesize the similar cards into a skill and submit via awareness_record(insights={skills:[{name,summary,methods,trigger_conditions,tags,source_card_ids}]})." ); for (const s of perceptionSignals.slice(0, 5)) { pParts.push( ` ${esc(s.message || "")}`, ); } pParts.push(" "); base += "\n" + pParts.join("\n"); } ``` ```js // scripts/recall.js:269-276 base += ` Save significant work SILENTLY: node "${resolvedScript}" '' JSON: {"content":"what+why in detail","cards":[...],"skills":[...]} ``` ```md ### 3. Record to Memory (awareness_record) Save decisions, implementations, and learnings: Call AFTER every meaningful action. If you don't record it, it's lost. ``` ### Technical Analysis The recall hook converts persisted perception signals into mandatory instructions such as “MUST address,” “STOP,” and “submit via awareness_record.” It also tells the Agent to save significant work silently. These rules operate automatically before responses and create a persistent feedback loop: 1. Data or instructions are stored in memory. 2. The daemon returns perception si ...[truncated 1259 chars]
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/shared.js:145
Finding

Automatic Execution of an Unpinned npm Package

Content
View full analysis
setTimeout(r, 500)); try { const retry = await fetch(`${config.localUrl}/healthz`, { method: "GET", signal: AbortSignal.timeout(1000), }); if (retry.ok) { return { mode: "local", localUrl: config.localUrl, baseUrl: config.baseUrl, apiKey: config.apiKey || "", memoryId: config.memoryId || "local", }; } } catch { /* keep polling */ } } } catch { /* npx/spawn not available */ } ``` ```js // mcp-stdio.cjs:84-103 async function ensureDaemon() { if (daemonReady) return true; if (await checkHealth()) { daemonReady = true; return true; } log('Daemon not running, starting...'); const child = spawn('npx', ['-y', '@awareness.market/local', 'start'], { detached: true, stdio: 'ignore', env: { ...process.env, FORCE_COLOR: '0' }, }); child.unref(); for (let i = 0; i < 30; i++) { await new Promise(r => setTimeout(r, 500)); if (await checkHealth()) { daemonReady = true; log('Daemon ready'); return true; } } return false; } ``` ### Technical Analysis When the local daemon is unavailable, both the shared endpoint resolver and the MCP bridge invoke: ```text npx -y @awareness.market/local start ``` ...[truncated 1257 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/poll-auth.js:63
Finding

API Credentials Are Duplicated into Plaintext Files with Inconsistent Permission Enforcement

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/shared.js:36
Finding

Project-Controlled API Endpoints Can Receive Bearer Credentials and Sensitive Prompt Data

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (71)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill repeatedly markets itself as local-first, no-account-needed memory, while the documentation describes default prompt transmission to an external API, browser/device authentication, credential storage, and agent-profile retrieval. Security-relevant behavior that is broader than the stated purpose defeats informed consent and can cause users to expose sensitive prompt content under false assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill repeatedly markets itself as local-first, no-account-needed memory, while the documentation describes default prompt transmission to an external API, browser/device authentication, credential storage, and agent-profile retrieval. Security-relevant behavior that is broader than the stated purpose defeats informed consent and can cause users to expose sensitive prompt content under false assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill repeatedly markets itself as local-first, no-account-needed memory, while the documentation describes default prompt transmission to an external API, browser/device authentication, credential storage, and agent-profile retrieval. Security-relevant behavior that is broader than the stated purpose defeats informed consent and can cause users to expose sensitive prompt content under false assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill repeatedly markets itself as local-first, no-account-needed memory, while the documentation describes default prompt transmission to an external API, browser/device authentication, credential storage, and agent-profile retrieval. Security-relevant behavior that is broader than the stated purpose defeats informed consent and can cause users to expose sensitive prompt content under false assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill repeatedly markets itself as local-first, no-account-needed memory, while the documentation describes default prompt transmission to an external API, browser/device authentication, credential storage, and agent-profile retrieval. Security-relevant behavior that is broader than the stated purpose defeats informed consent and can cause users to expose sensitive prompt content under false assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill repeatedly markets itself as local-first, no-account-needed memory, while the documentation describes default prompt transmission to an external API, browser/device authentication, credential storage, and agent-profile retrieval. Security-relevant behavior that is broader than the stated purpose defeats informed consent and can cause users to expose sensitive prompt content under false assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill repeatedly markets itself as local-first, no-account-needed memory, while the documentation describes default prompt transmission to an external API, browser/device authentication, credential storage, and agent-profile retrieval. Security-relevant behavior that is broader than the stated purpose defeats informed consent and can cause users to expose sensitive prompt content under false assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill repeatedly markets itself as local-first, no-account-needed memory, while the documentation describes default prompt transmission to an external API, browser/device authentication, credential storage, and agent-profile retrieval. Security-relevant behavior that is broader than the stated purpose defeats informed consent and can cause users to expose sensitive prompt content under false assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill repeatedly markets itself as local-first, no-account-needed memory, while the documentation describes default prompt transmission to an external API, browser/device authentication, credential storage, and agent-profile retrieval. Security-relevant behavior that is broader than the stated purpose defeats informed consent and can cause users to expose sensitive prompt content under false assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill repeatedly markets itself as local-first, no-account-needed memory, while the documentation describes default prompt transmission to an external API, browser/device authentication, credential storage, and agent-profile retrieval. Security-relevant behavior that is broader than the stated purpose defeats informed consent and can cause users to expose sensitive prompt content under false assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill repeatedly markets itself as local-first, no-account-needed memory, while the documentation describes default prompt transmission to an external API, browser/device authentication, credential storage, and agent-profile retrieval. Security-relevant behavior that is broader than the stated purpose defeats informed consent and can cause users to expose sensitive prompt content under false assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill repeatedly markets itself as local-first, no-account-needed memory, while the documentation describes default prompt transmission to an external API, browser/device authentication, credential storage, and agent-profile retrieval. Security-relevant behavior that is broader than the stated purpose defeats informed consent and can cause users to expose sensitive prompt content under false assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill repeatedly markets itself as local-first, no-account-needed memory, while the documentation describes default prompt transmission to an external API, browser/device authentication, credential storage, and agent-profile retrieval. Security-relevant behavior that is broader than the stated purpose defeats informed consent and can cause users to expose sensitive prompt content under false assumptions.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
86% confidence
Finding

The skill stores an API key and memory ID in ~/.awareness/credentials.json and may also write them into shell profiles as environment variables. Credential persistence in user-accessible config locations is sensitive, and shell-profile export especially increases exposure to other processes, accidental disclosure, backups, and terminal history/debugging workflows.

Content

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

md
- **Before each prompt**: Your prompt text is sent to the configured Awareness API endpoint (default: `awareness.market`) to retrieve relevant past context via semantic search.
- **After each response**: A brief session checkpoint (tool name, no full conversation) is sent to record activity.
- **Credentials**: API key and memory ID are stored in `~/.awareness/credentials.json` (file permissions 0600). The setup script can optionally write environment variables to your shell profile.
- **Local mode**: If you run a local daemon (`localhost:37800`), all data stays on your machine — nothing is sent externally.
- **No secrets captured**: The skill never reads, stores, or transmits file contents, environment variables, or credentials from your system beyond its own API key.

Hidden Instructions

High
Category
Prompt Injection
Confidence
90% confidence
Finding

The embedded hidden comment blocks contain operational extraction instructions that influence how the agent summarizes and records user content into persistent memory. Hidden instruction channels are dangerous because they can silently alter agent behavior, expand collection scope, and bypass a user's expectation that only visible instructions govern retention and processing.

Content

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

md
OpenClaw, and the cloud backend.

**When to extract** (emit a card):
<!-- SHARED:extraction-when-to-extract BEGIN -->
- The user **made a decision** — chose X over Y, with a stated reason
- A **non-obvious bug was fixed** — symptom + root cause + fix + how to avoid recurring
- A **workflow / convention was established** — ordered steps, preconditions, gotchas

Hidden Instructions

High
Category
Prompt Injection
Confidence
90% confidence
Finding

The hidden scoring rules direct the model to self-assess novelty, durability, and specificity before persisting memory cards. Because these instructions are concealed in comments, they create an opaque policy layer that can materially affect what user content is retained and how aggressively the system records it.

Content

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

md
<!-- SHARED:extraction-when-not-to-extract END -->

**Per-card required scores**:
<!-- SHARED:extraction-scoring BEGIN -->
Every card you emit MUST carry three LLM self-assessed scores (0.0-1.0):

- `novelty_score`: how new is this vs known facts & existing cards?

Hidden Instructions

High
Category
Prompt Injection
Confidence
89% confidence
Finding

The hidden skill-extraction block instructs the agent to derive reusable procedures and activation prompts from conversation content, potentially broadening retention from simple memory to operational profiles. This is sensitive because it can create durable behavioral artifacts from user interactions without obvious disclosure at the point of capture.

Content

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

md
<!-- SHARED:extraction-quality-gate END -->

**Skill extraction** (emit under `insights.skills[]`):
<!-- SHARED:skill-extraction BEGIN -->
A `skill` is a **reusable procedure the user will invoke again** (e.g. "publish
SDK to npm", "regenerate golden snapshots after schema change"). Skills go in
`insights.skills[]`, NOT `insights.knowledge_cards[]`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
1. **Session start**: Auto-recall hook loads context. If insufficient, run `init.js` manually.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. **Before work**: Search memory for relevant past context with `search.js`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
3. **After each change**: Record what you did and WHY with `record.js`.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

If the daemon is not running, the code silently executes npx -y @awareness.market/local start, which can fetch and run package code from the registry at runtime. That creates a supply-chain and arbitrary-code-execution risk, especially because it happens automatically in a local memory skill where users would not expect on-demand installation and execution of external software.

Content

No source excerpt is available for this finding.

Hidden Instructions

High
Category
Prompt Injection
Confidence
92% confidence
Finding

This code injects a large hidden instruction block into the XML context that tells the downstream agent to 'Save significant work SILENTLY' and specifies what to extract into persistent memory. Hidden side-channel instructions that trigger silent storage are dangerous because they can override user expectations and cause collection of sensitive decisions, preferences, bugs, and project facts without an explicit per-action confirmation. In a memory skill, this is especially risky because it operationalizes covert persistence as a default behavior.

Content

Scanner excerpt · scripts/harness-builder.mjs (reported line 315)May include surrounding context.

js
const recordRule = `  <record-rule>
    Save significant work SILENTLY: node "${esc(options.recordRuleScript)}" '<JSON>'
    JSON: {"content":"what+why in detail","cards":[...],"skills":[...]}
    <!-- SHARED:extraction-when-to-extract BEGIN -->
- The user **made a decision** — chose X over Y, with a stated reason
- A **non-obvious bug was fixed** — symptom + root cause + fix + how to avoid recurring
- A **workflow / convention was established** — ordered steps, preconditions, gotchas

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/harness-builder.mjs (reported line 341)May include surrounding context.

js
Returning \`"knowledge_cards": []\` is a **first-class answer** — prefer it over fabricating
a card from low-signal content.
<!-- SHARED:extraction-when-not-to-extract END -->
    <!-- SHARED:extraction-scoring BEGIN -->
Every card you emit MUST carry three LLM self-assessed scores (0.0-1.0):

- \`novelty_score\`: how new is this vs known facts & existing cards?

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/harness-builder.mjs (reported line 388)May include surrounding context.

js
Rejected cards return in \`response.cards_skipped[]\`. R6-R8 are
warnings, not blocks — use them to self-critique before submitting.
<!-- SHARED:extraction-quality-gate END -->
    <!-- SHARED:skill-extraction BEGIN -->
A \`skill\` is a **reusable procedure the user will invoke again** (e.g. "publish
SDK to npm", "regenerate golden snapshots after schema change"). Skills go in
\`insights.skills[]\`, NOT \`insights.knowledge_cards[]\`.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill advertises itself as local-first and no-account-needed, but when unconfigured it automatically initiates remote device authentication and emits a sign-in URL. That is a material mismatch between stated behavior and actual behavior, and it can steer user data and workflow toward a cloud service without prior informed consent.

Content

No source excerpt is available for this finding.