T09 · Insecure Skill Coding Practices
- Location
scripts/trucontext-openclaw.sh:49- Finding
Arbitrary Python Code Injection Through Interpolated File-System Paths
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This persistent-memory skill is mostly coherent, but its wrapper has concrete security flaws that could execute local code or access the wrong agent memory context.
Review before installing. Use this only if you are comfortable with TruContext storing agent memory across sessions, and avoid running the wrapper from untrusted or oddly named directories. Prefer a pinned, verified install of the TruContext tools, and ask the publisher to fix the path handling, remove the first-agent fallback, and add clearer consent/deletion controls before using it for sensitive projects.
scripts/trucontext-openclaw.sh:49Arbitrary Python Code Injection Through Interpolated File-System Paths
scripts/trucontext-openclaw.sh:56Cross-Agent Memory Access Through Prefix Matching and Insecure Fallback
scripts/trucontext-openclaw.sh:158JSON Property Injection Through Unescaped Entity Names
SKILL.md:4Unpinned npm Installation and Runtime Package Execution
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## What this skill reads
- **`~/.trucontext/openclaw-state.json`** — agent config written by `trucontext-openclaw install`. Contains your root node ID, user root node ID, recipe, and workspace path. No secrets.
- **TruContext CLI auth** (`~/.trucontext/credentials.json`) — the `trucontext` CLI manages its own auth tokens. This skill calls the CLI; it does not read or store credentials directly. To authenticate, run: `npx trucontext login`.
## Verbs
This skill is explicitly designed for cross-session persistent memory, including remembering significant details, creating nodes, and recalling prior context. Persistent storage is not inherently malicious, but it does create privacy and retention risk because normal agent interactions may be durably recorded and later resurfaced, especially given the broad triggers and startup recall behavior.
---
name: trucontext-openclaw
description: "TruContext persistent memory for OpenClaw agents. Use when you need to remember something significant across sessions, recall prior context, query the knowledge graph, check what TC is curious about, or declare entity nodes. Triggers on: 'remember this', 'recall what we know about', 'check TC', 'what has TC flagged', 'create a node for', 'find the node for'."
homepage: https://trucontext.ai
metadata: {"openclaw": {"emoji": "🧠", "homepage": "https://trucontext.ai", "requires": {"bins": ["trucontext", "python3"]}, "install": [{"id": "npm-trucontext-openclaw", "kind": "node", "package": "trucontext-openclaw", "bins": ["trucontext-openclaw"], "label": "Install trucontext-openclaw (npm) — includes TC CLI setup"}]}}
---
The trigger phrases are broad and overlap with normal conversation, such as 'remember this' and 'recall what we know about'. In an agent setting, ambiguous activation can cause the skill to run unexpectedly and send sensitive conversational context into persistent storage or external queries without sufficiently intentional user consent.
The skill instructs users to run npx trucontext login, which fetches and executes the latest package version at runtime without pinning. That creates a supply-chain risk: if the upstream package is compromised or a breaking/malicious version is published, authentication-related commands could execute attacker-controlled code in the user's environment.
The script tells users to run npx trucontext login when authentication fails, which invokes an unpinned package from the registry at execution time. If the package is malicious, typosquatted, or the upstream account is compromised, this can lead to arbitrary code execution on the user's machine. In this skill's context, that is more dangerous because the script is meant to be used persistently by agents handling memory and context, making it likely to be trusted and run in developer environments.