T02 · Agent Memory Poisoning
- Location
lib/cost-tracker.js:87- Finding
Persistent Agent-Readable Log Injection Through Unsanitized Metadata
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is not overtly malicious, but it overstates its ability to enforce budget controls and keeps persistent cost logs that need careful review.
Review this skill before installing if you expect hard billing protection. Treat it as an advisory estimator/logger unless you add an enforced wrapper around subagent spawning, avoid storing sensitive task details in cost-tracking.md, and do not rely on the documented .env budget cap to stop spending.
lib/cost-tracker.js:87Persistent Agent-Readable Log Injection Through Unsanitized Metadata
SKILL.md:93Documented Budget Cap Is Written to a Sensitive Configuration File but Never Enforced
lib/cost-tracker.js:52Approval Gate Is Advisory and Can Be Explicitly Bypassed
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
echo "DAILY_BUDGET=20.00" >> ~/.openclaw/workspace/.env
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
echo "DAILY_BUDGET=20.00" >> ~/.openclaw/workspace/.env
The declared purpose promises preventive controls before sessions_spawn, but the skill content mainly provides guidance, logging, and retrospective reporting rather than an enforceable gate. That mismatch is dangerous because users may rely on it as a hard cost-control mechanism when it does not actually prevent expensive actions, and it also introduces undeclared file reads/writes to tracking data.
Referenced artifact was not completely inspected
- `SKILL.md` — This file (agent instructions)
Referenced artifact was not completely inspected
- `bin/cost-summary.js` — CLI: daily/monthly spend summary
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
mkdir -p ~/.openclaw/workspace/notes
cat > ~/.openclaw/workspace/notes/cost-tracking.md << 'EOF'
The README says the skill activates automatically when the user asks to spawn a subagent or requests a cost estimate, but it does not define narrower trigger phrases, scope limits, or exclusions. These are common intents that could overlap with many normal interactions, making invocation boundaries unclear.
The documented bypass phrase 'proceed without cost check' is generic and unconstrained, which creates a weak override path for a safety-control skill. If an agent treats that phrase as sufficient authority, prompt injection, accidental phrasing, or indirect user content could disable the approval gate and undermine the budget-protection purpose of the skill.
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.
You: "Quick lookup: What's the capital of France?"
The example says the agent 'auto-approves' and 'spawns on Haiku,' which is an autonomous action affecting resource consumption without an explicit approval step. Even if the spend is small, repeated low-cost automatic spawns can accumulate cost and normalize bypassing user confirmation for actions that have billing impact.
You: "Quick lookup: What's the capital of France?"
Agent: [estimates $0.05, auto-approves, spawns on Haiku]
The skill instructs use of environment-backed configuration via .env and implies stateful behavior, but the manifest does not declare any tool scope or permissions for environment/file access. This creates a transparency and least-privilege problem: operators cannot accurately assess what resources the skill expects to touch, increasing the chance of unauthorized reads or writes during execution.
The skill requires logging all spawns to a workspace tracking file without clearly obtaining user consent for persistence of task details. Silent recording of prompts, task names, or model usage can expose sensitive operational or business information to anyone with access to the workspace notes.
The skill explicitly creates persistent workspace state under notes/cost-tracking.md, causing task metadata to accumulate across sessions. Persistent local records are not inherently malicious, but they can become a privacy and information disclosure risk if they store sensitive task names, budgets, or operational history without retention controls.
mkdir -p ~/.openclaw/workspace/notes
touch ~/.openclaw/workspace/notes/cost-tracking.md
The approval flow says low-cost operations may proceed and be logged silently, which normalizes unannounced file writes for routine activity. Even if the cost is low, the task content may still be sensitive, so hidden persistence increases privacy and data-handling risk.
Detected: suspicious.prompt_injection_instructions