Back to skill

Security audit

Intent Engineering - Make Agents Optimize for What You Actually Want

Security checks for vulnerabilities and agentic risk

Overview

The skill is not malicious, but it should be reviewed because it changes future subagent prompts and can automatically load workspace JavaScript without strong safeguards.

Before installing, review the JavaScript loader and only use it in workspaces where memory files and lib/correction-tracker.js are trusted. Back up any existing INTENT.md and lib/agent-context-loader.js, and consider removing or gating the correction-tracker require() and treating memory snippets as untrusted reference text rather than instructions.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • 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 (2)

T01 · Skill Instruction Hijacking

Warning
Location
references/agent-context-loader-template.js:147
Finding

Unsanitized Episodic Memory Is Injected into Subagent Instructions

Content
View full analysis
f.endsWith('.md')) .map(f => ({ name: f, fullPath: path.join(episodicDir, f), mtime: (() => { try { return fs.statSync(path.join(episodicDir, f)).mtimeMs; } catch (_) { return 0; } })() })) .sort((a, b) => b.mtime - a.mtime); } catch (_) { return []; } for (const file of files) { if (results.length >= limit) break; const lines = safeReadLines(file.fullPath); const content = lines.join('\n'); if (matchesKeywords(content, keywords)) { const snippet = lines.find(l => l.trim().length > 0) || ''; results.push({ file: file.name, snippet: snippet.trim().slice(0, 100) }); } } return results; } ``` The selected memory content is later inserted directly into the subagent context: ```javascript if (episodic.length > 0 || routing.length > 0) { parts.push('\n## Relevant Context'); parts.push('> Refer to INTENT.md for optimization priorities.\n'); if (episodic.length > 0) { parts.push('**Recent episodic memory:**'); for (const e of episodic) parts.push(`- ${e.file}: ${e.snippet}`); } if (routing.length > 0) { parts.push('**Recent routing decisions:**'); for (const r of routing) parts.push(`- ${r.task_type} → ${r.target} (${r.timestamp})`); } } const block = parts.join('\n'); const context = block.length <= 700 ? block : block.slice(0, 697) + '...'; ``` ### Technical Analysis The loader searches Markdown fil ...[truncated 2240 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/agent-context-loader-template.js:40
Finding

Automatic Loading of a Workspace-Writable JavaScript Module Enables Code Execution

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (4)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `references/agent-context-loader-template.js` — Complete agent-context-loader.js implementation

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The loader automatically reads from workspace memory and routing logs and prepends that data to subagent task prompts. Because the injected context is selected by loose keyword matching and there is no consent, classification, or sanitization boundary, sensitive or adversarial content from prior workspace files can be propagated into new agent contexts, causing prompt injection, unnecessary data exposure, or cross-task information leakage.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill instructs users to copy files into the workspace root and lib directory, which modifies persistent workspace state, but it does not explicitly warn the user that installation will create or overwrite files. In a security-sensitive agent environment, unannounced file writes can lead to accidental clobbering of existing files or unexpected changes being applied without adequate review.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The docstring says the function optionally includes an active phase summary, alongside episodic memory and routing decisions. In the implementation, the function only loads intent summary, correction preamble, episodic entries, and routing decisions; there is no code that reads or appends any active phase summary.

Content

No source excerpt is available for this finding.