Back to skill

Security audit

Andon

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local Andon-style logbook, but it has unsafe command handling and under-disclosed persistent data mutation that should be reviewed before installation.

Review carefully before installing. This skill stores and mutates local data under ~/.andon by default, can delete entries, and has unsafe shell/serialization handling; do not use it with untrusted input or in workflows where another agent can supply arguments until the config, JSON, CSV, and deletion behaviors are fixed and documented.

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
scripts/script.sh:132
Finding

Arbitrary Command Execution Through Unsafe sed Expression Construction

Content
View full analysis
/dev/null | cut -d= -f2- || echo "(not set)" else if [ -f "$cfg" ] && grep -q "^${key}=" "$cfg" 2>/dev/null; then sed -i "s|^${key}=.*|${key}=${val}|" "$cfg" ``` ### Technical Analysis The `key` and `val` command-line arguments are interpolated directly into a GNU `sed` program. Neither value is escaped for use as a regular expression, replacement string, or `sed` command. An attacker can inject the `|` expression delimiter and GNU `sed`'s `e` substitution flag. The `e` flag executes the resulting pattern space through a shell after a successful substitution. A semicolon and comment can be used to terminate the injected expression and neutralize the delimiter appended by the script. For example, after creating an entry named `x`, a value resembling the following can turn the generated substitution into an executable `sed` expression: ```text ;touch /tmp/andon-pwned|e;# ``` The resulting expression is equivalent to: ```sed s|^x=.*|x=;touch /tmp/andon-pwned|e;#| ``` On GNU `sed`, the successful substitution causes `x=;touch /tmp/andon-pwned` to be interpreted by a shell. The unescaped `key` also permits regular-expression manipulation and can cause unintended configuration entries to be matched or replaced. ### Attack Path 1. The attacker can invoke the Skill or influence arguments supplied to its `config` command. 2. The attacker first creates a configuration entry: ```bash scripts/script.sh config x initial ``` 3. The attacker updates that entry with a crafted value containing a `sed` delimiter, the GNU `e` flag, and a comment: ```bash scripts/script.sh config x ';touch /tmp/andon-pwned|e;#' ``` 4. The existing-entry check succee ...[truncated 873 chars]
Remediation
View remediation
&2 exit 1 } ``` - Rewrite the configuration file using logic that compares keys literally rather than interpreting them as regular expressions. - Prefer a structured configuration format and serializer, such as JSON generated with `jq`. - If `sed` must be retained, separately escape all regular-expression metacharacters in the key and all replacement metacharacters, delimiters, backslashes, and newlines in the value. Do not rely on shell quoting alone. - Write updates to a securely created temporary file and atomically replace the original configuration file after successful validation. - Add regression tests containing `|`, `;`, `#`, `&`, backslashes, newlines, and GNU `sed` flags. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:91
Finding

Spreadsheet Formula Injection in CSV Exports

Content
View full analysis
"$out" while IFS= read -r line; do ts=$(echo "$line" | grep -o '"ts":"[^"]*' | cut -d'"' -f4) c2=$(echo "$line" | grep -o '"cmd":"[^"]*' | cut -d'"' -f4) vl=$(echo "$line" | grep -o '"val":"[^"]*' | cut -d'"' -f4) echo "$ts,$c2,$vl" >> "$out" done < "$DATA_DIR/data.jsonl" ``` The exported `vl` field originates from user-controlled entry data: ```bash local value="${1:?Usage: andon add }" shift || true _save_entry "add" "$value $*" ``` ### Technical Analysis The CSV exporter writes user-controlled values directly into cells without CSV quoting, escaping, or spreadsheet-formula neutralization. Spreadsheet applications may interpret cells beginning with characters such as `=`, `+`, `-`, or `@` as formulas. Consequently, an attacker-controlled Andon entry can become an active formula when a user opens the exported file in spreadsheet software. The implementation also fails to quote commas, double quotes, carriage returns, and newlines. These characters can create additional cells or records, corrupt the export structure, and misrepresent the stored data. ### Attack Path 1. An attacker submits or causes the Skill to store an entry whose value begins with a spreadsheet formula marker. 2. The entry is written to `data.jsonl`. 3. A user runs: ```bash scripts/script.sh export csv ``` 4. The value is copied into `andon-export.csv` without neutralization or CSV escaping. 5. The user opens the file in spreadsheet software. 6. Depending on the spreadsheet product and its security settings, the cell is evaluated as a formula. 7. The formula may initiate an external request, disclose data available to formula evaluation, manipulate the displayed report, or trigger legacy spreadsheet integration behavior. ...[truncated 518 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/script.sh:10
Finding

Malformed JSON and Record Injection Through Unescaped Entry Values

Content
View full analysis
> "$DATA_DIR/data.jsonl" } ``` The attacker-controlled value is passed into this function by the `add` command: ```bash cmd_add() { local value="${1:?Usage: andon add }" shift || true _save_entry "add" "$value $*" local count=$(wc -l < "$DATA_DIR/data.jsonl" 2>/dev/null || echo 0) echo "Added: $value (entry #$count)" } ``` ### Technical Analysis The script creates JSON by inserting values into a `printf` format without JSON encoding them. Double quotes, backslashes, control characters, and newlines in `val` therefore retain their structural meaning. A crafted value can terminate the intended JSON string, add attacker-controlled properties, or insert a newline followed by an additional apparent JSONL record. The downstream `list`, `search`, and `export` commands use regular expressions rather than a JSON parser, so malformed or injected records can be counted, displayed, searched, and exported as though they were legitimate entries. This is a stored data-integrity vulnerability. The injected content is not directly evaluated as shell code by the reviewed JSON-processing paths. ### Attack Path 1. An attacker invokes `add` with a value containing quotes, backslashes, or embedded newlines. 2. `_save_entry` inserts the value directly between JSON quotation marks. 3. The crafted characters break the original JSON object or create additional lines in `data.jsonl`. 4. `status` and `stats` count the injected lines as entries. 5. `list`, `search`, or `export` process the malformed content using line-oriented regular expressions. 6. Users may receive falsi ...[truncated 525 chars]
Remediation
View remediation
> "$DATA_DIR/data.jsonl" ``` - Parse records with a JSON parser rather than `grep` and `cut`. - Reject invalid existing JSONL records or quarantine them before processing. - Define whether multiline entry values are supported and enforce that policy consistently. - Add tests covering quotes, backslashes, tabs, carriage returns, newlines, Unicode, and JSON-like input. - Consider locking and atomic writes to prevent concurrent processes from interleaving records in the data file. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill presents itself as an Andon alert/status board, but the documented commands indicate a more generic local record-management tool with add/remove/export/config capabilities. This mismatch can cause users or higher-level agents to invoke it under false assumptions, leading to unintended file modification, deletion, or persistence in contexts where only status lookup was expected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The markdown advertises commands such as add, remove, export, and config without warning that they modify or delete local data. In an agent setting, missing safety cues increase the chance of non-interactive destructive execution, especially when the skill is selected based on a brief description rather than deep operator review.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes a skill for Andon alerts and production status checks, especially around JSON/CSV Andon tasks. However, the implemented commands are generic local data management operations over a JSONL file, including arbitrary entry addition, deletion, export, and config mutation, with no production-board, alerting, or task-integration behavior visible.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The remove command deletes a line from the persistent data file with sed -i and immediately reports success, but there is no confirmation prompt or warning before the destructive action. Because this operation permanently alters stored user data, the lack of disclosure increases the risk of accidental data loss.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The activation guidance is broad and vague ('use when json andon tasks, csv andon tasks, checking andon status'), which can cause the skill to trigger in loosely related scenarios. Ambiguous routing increases the risk that an agent invokes a local data-modifying tool when a read-only parser, reporting utility, or genuine Andon integration was intended.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The config feature enables persistent arbitrary key/value storage unrelated to the stated Andon purpose, which expands the skill's scope and creates an unnecessary persistence channel. In agent contexts, this can be abused to stash unexpected data, alter later behavior, or confuse users about what state the skill retains across runs.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.