Back to skill

Security audit

DEPRECATED - Bobo Context Cleanup

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent cleanup purpose, but its script contains real unsafe JSON-generation and archive-overwrite risks that can affect workspace files or execute code in crafted environments.

Install only after the script is fixed to safely serialize JSON data, remove suppressed JSON errors, declare node if JSON output remains supported, and prevent archive filename collisions. Until then, avoid --json and avoid running archive on workspaces containing untrusted or duplicate-named memory files.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
cleanup.sh:75
Finding

Arbitrary JavaScript Execution Through an Unescaped Workspace Path

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
cleanup.sh:106
Finding

Arbitrary JavaScript Execution Through Unescaped Memory Filenames

Content
View full analysis
/dev/null || true fi ``` ### Technical Analysis Paths collected from `$WORKSPACE/memory` are expanded directly into source code passed to `node -e`. The `${low_list[@]}` and `${medium_list[@]}` values are not serialized as JSON strings and are not escaped for JavaScript syntax. A crafted Markdown filename containing quotes, delimiters, or JavaScript expressions can alter the generated program. Because Node.js evaluates the generated string as source, a malicious filename can potentially execute arbitrary JavaScript. The array-generation expression is also structurally unreliable for ordinary paths, particularly when multiple filenames or filenames containing whitespace and special characters are present. Redirecting standard error to `/dev/null` and appending `|| true` suppresses syntax and runtime failures, making attacks and malformed output harder to detect. ### Attack Path 1. An attacker gains the ability to place or rename a Markdown file beneath the workspace's `memory` directory. 2. The filename is selected so that the file is classified as low-value or as an archive candidate and contains JavaScript syntax that escapes the intended generated expression. 3. The victim or agent invokes: ```bash ./cleanup.sh plan --json ``` 4. `collect_files` returns the attacker-controlled path. 5. The path is stored in `low_list` or `medium_list`. 6. The path is interpolated directly into the `node -e` source. 7. Node.js evaluates the injected statements, potentially including operating-system c ...[truncated 605 chars]
Remediation
View remediation
/dev/null || true`; JSON-generation failures should produce a nonzero exit status and a visible diagnostic. 5. Add tests for filenames containing spaces, quotes, backslashes, newlines, shell metacharacters, and JavaScript syntax. For example, the shell can emit NUL-delimited arrays to a fixed helper program, or the implementation can use `jq --args`/`jq --rawfile` to build arrays without evaluating path contents as code. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
cleanup.sh:167
Finding

Archive Filename Collisions Can Overwrite Existing Records

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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill body is written in Chinese and does not indicate that users may request another language or that the skill is intended only for a Chinese-speaking or region-specific context. This can violate language/locale policy because it implicitly constrains interaction language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This shell script emits user-facing status messages entirely in Chinese, including the main analysis report headings and labels. The file does not indicate that the skill is region-specific or provide any user opt-in for language selection, which is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.