T09 · Insecure Skill Coding Practices
- Location
scripts/install.sh:42- Finding
Arbitrary Command Execution Through Shell Command Injection
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This memory skill is mostly purpose-aligned, but its installer creates a persistent extension with a command-injection flaw and builds unpinned remote code, so it needs careful review before installation.
Install only after reviewing or fixing the generated extension to avoid shell execution from tool inputs, and prefer a pinned, verified upstream source or signed release. Treat the swarm feature as sending presence or phase state to the configured NATS server, and avoid enabling destructive memory deletion without backup or confirmation expectations.
scripts/install.sh:42Arbitrary Command Execution Through Shell Command Injection
scripts/install.sh:22Mutable Remote Source Is Retrieved, Built, and Installed Without Integrity Verification
The generated TypeScript extension constructs shell command strings with untrusted tool inputs and passes them to execSync, enabling command injection through multiple parameters that are not safely quoted or validated, such as category, memory_id, relation_type, display_name, and numeric fields. Because the extension exposes file operations, memory deletion, and arbitrary CLI invocation paths in an agent tool context, a malicious prompt or crafted input could execute arbitrary commands as the user, making this substantially more dangerous than a normal local utility.
Suspicious Unicode normalization or mixed-script content
The skill clearly instructs users to run shell installation scripts and use environment-driven network endpoints, yet it declares no explicit tool scope or permissions boundary. This weakens least-privilege controls and can cause an agent platform or user to underestimate the skill's ability to execute shell actions and interact with external services.
The skill advertises swarm synchronization through a default external NATS server (nats://swarm.ninja-portal.com:4222) and states that phase gossip and presence are published remotely, but it does not prominently warn that agent metadata and potentially derived memory/state information may leave the local environment. In a memory skill, this context increases sensitivity because users may assume persistence is local while swarm features introduce external transmission by default.
This shell script performs network access and persistent file writes by cloning a remote repository, building it, and copying artifacts into ~/.local/bin and ~/.openclaw. Although it prints progress messages, those messages do not clearly disclose the safety impact or ask for confirmation before modifying the user's environment.
The documented kannaka_forget capability enables deletion of stored memory, but the skill documentation does not explicitly warn that the action may be permanent or describe whether recovery/versioning exists. In a persistent memory system, unclear destructive semantics can lead to accidental data loss by users or agents invoking the tool without confirmation safeguards.
Detected: suspicious.dangerous_exec