Back to skill

Security audit

Attestation

Security checks for vulnerabilities and agentic risk

Overview

The skill claims to analyze attestations, but its actual behavior is a local record store that can persist, delete, export, and reconfigure data with limited warnings.

Review this carefully before installing. It does not appear to fetch remote code, steal credentials, or install persistence outside its data directory, but it is mislabeled: use it only if you want a local note/config datastore under ~/.attestation, and avoid storing sensitive attestation or protocol data until the purpose, storage behavior, deletion/export controls, and input handling are fixed.

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

Warning
Location
scripts/script.sh:10
Finding

Stored terminal control-sequence injection and malformed JSONL record injection

Content
View full analysis
> "$DATA_DIR/data.jsonl" } ``` The stored value is subsequently extracted and printed without terminal-safe encoding: ```bash cmd_list() { echo "=== Attestation Entries ===" if [ -f "$DATA_DIR/data.jsonl" ]; then local count=$(wc -l < "$DATA_DIR/data.jsonl") echo "Total: $count" echo "---" tail -20 "$DATA_DIR/data.jsonl" | while IFS= read -r line; do local ts=$(echo "$line" | grep -o '"ts":"[^"]*' | cut -d'"' -f4) local cmd=$(echo "$line" | grep -o '"cmd":"[^"]*' | cut -d'"' -f4) local val=$(echo "$line" | grep -o '"val":"[^"]*' | cut -d'"' -f4) echo " [$ts] $cmd: $val" done else echo "No entries yet." fi } cmd_search() { local term="${1:?Usage: attestation search }" if [ -f "$DATA_DIR/data.jsonl" ]; then local matches=$(grep -ic "$term" "$DATA_DIR/data.jsonl" 2>/dev/null || echo 0) echo "Found: $matches matches" grep -i "$term" "$DATA_DIR/data.jsonl" 2>/dev/null | head -20 | while IFS= read -r line; do local val=$(echo "$line" | grep -o '"val":"[^"]*' | cut -d'"' -f4) local ts=$(echo "$line" | grep -o '"ts":"[^"]*' | cut -d'"' -f4) echo " [$ts] $val" done else echo "No data to search." fi } ``` ### Technical Analysis `_save_entry` constructs JSON by interpolating user-controlled text directly into a format string. Although shell argument quoting prevents ordinary shell command injection at this location, it does not perform JSON encod ...[truncated 1972 chars]
Remediation
View remediation
> "$DATA_DIR/data.jsonl" ``` - Parse stored records with `jq` instead of extracting fields with `grep` and `cut`. - Reject or visibly encode non-printable terminal control characters before displaying stored values. - Use `printf '%s\n'` instead of `echo` for predictable output, but note that `printf` alone does not neutralize embedded terminal escape sequences. - Validate existing JSONL records before processing them and report malformed records without rendering their raw content. - Consider limiting entry size and rejecting embedded line breaks if multiline values are not a documented requirement. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/script.sh:73
Finding

User input is interpreted as regular expressions and grep options

Content
View full analysis
}" if [ -f "$DATA_DIR/data.jsonl" ]; then local matches=$(grep -ic "$term" "$DATA_DIR/data.jsonl" 2>/dev/null || echo 0) echo "Found: $matches matches" grep -i "$term" "$DATA_DIR/data.jsonl" 2>/dev/null | head -20 | while IFS= read -r line; do ``` Configuration keys are handled similarly: ```bash elif [ -z "$val" ]; then grep "^${key}=" "$cfg" 2>/dev/null | cut -d= -f2- || echo "(not set)" else if [ -f "$cfg" ] && grep -q "^${key}=" "$cfg" 2>/dev/null; then ``` ### Technical Analysis The search term is passed to `grep` as a basic regular expression even though the documented command presents it as a generic search term. Metacharacters such as `.`, `*`, anchors, and bracket expressions therefore change the meaning of the search. Complex patterns may consume disproportionate resources on large data files or cause errors. The command also omits the `--` end-of-options marker. A term beginning with `-` can consequently be interpreted as a `grep` option instead of a pattern. This can alter output, trigger errors, or cause `grep` to process arguments differently than intended. Configuration keys are embedded directly into an anchored regular expression. Regex metacharacters in a key can match unrelated configuration records, causing incorrect lookup or selecting a different record for replacement. ### Attack Path 1. An attacker provides an option-like term, such as one beginning with `-`, or a term containing regular-expression syntax. 2. The user invokes `scripts/script.sh search `. 3. `grep` interprets the value as options or a regular expression rather than as literal text. 4. Search results become ...[truncated 843 chars]
Remediation
View remediation
&2 return 1 ;; esac ``` - Compare configuration keys as literal strings rather than constructing regular expressions from raw input. - Return a clear nonzero status for invalid patterns or keys instead of suppressing all errors with `2>/dev/null`. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:134
Finding

Configuration values can corrupt the sed rewrite expression and inject records

Content
View full analysis
)"; fi elif [ -z "$val" ]; then grep "^${key}=" "$cfg" 2>/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" else echo "${key}=${val}" >> "$cfg" fi echo "Set: $key=$val" fi } ``` ### Technical Analysis Both `key` and `val` are inserted directly into a `sed` substitution expression. Shell quoting prevents the shell from treating the input as separate commands, but it does not escape characters meaningful to `sed`. A key can contain regular-expression operators that broaden the matched line. A key or value containing the `|` delimiter can terminate part of the substitution and cause a syntax error or change the expression. In replacement text, `&` expands to the entire matched string and backslash sequences have special behavior. Newline characters can also create additional configuration records when the append branch uses `echo`. As a result, input intended to modify one configuration key can corrupt the configuration file, alter unintended lines, or create additional entries. ### Attack Path 1. An attacker supplies a crafted configuration key or value containing regex operators, `|`, `&`, backslashes, or line breaks. 2. The user invokes `scripts/script.sh config `. 3. If the key appears to exist, the script embeds the raw input into a `sed -i` p ...[truncated 905 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as an attestation-analysis capability, but the documented behavior is a generic local CRUD/export/config tool that persists arbitrary data and accesses the filesystem. This mismatch is dangerous because users or higher-level agents may invoke it expecting read-only blockchain/security analysis, while it can instead write, remove, and export local data, creating opportunity for unintended side effects and abuse.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest claims attestation analysis, but the body documents generic entry management with add/list/search/remove/export/config operations for unnamed records. In an agent ecosystem, this semantic deception can cause unsafe tool selection and over-trust, since planners may choose the skill for security analysis while it actually manipulates local state and files.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The header comment explicitly claims the script analyzes attestation operations, but the code performs unrelated local data storage. In an agent-skill setting, deceptive inline documentation increases the chance that reviewers, orchestrators, or users will trust and invoke the skill with sensitive material, enabling covert collection or misuse of that data.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill advertises attestation-analysis functionality but instead implements a generic local datastore with add/list/search/remove/export/config operations. This mismatch is dangerous because an agent or user may grant trust and provide sensitive attestation-related inputs under false pretenses, while the script persists arbitrary data locally and exposes it through search/export features unrelated to the stated purpose.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The CLI help text markets attestation-analysis capabilities that the available commands do not implement, instead presenting note-store and config-management actions. This deception is especially risky in a skill ecosystem because help text is often what operators and automated systems rely on to understand tool purpose, so misleading text can cause inappropriate invocation and unintended retention/export of sensitive inputs.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation repeatedly frames the skill as attestation-focused, but the command reference describes unrelated entry-management actions. This inconsistency increases the chance that users or autonomous agents will authorize or execute operations under false assumptions about scope, especially where remove/export/config imply destructive or persistent side effects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill documents destructive and file-writing operations such as remove and export without warning users about deletion, file creation, overwrite risk, or where data is written. In an agent context, lack of warning is risky because these commands may be invoked automatically, leading to silent data loss or unintended local file exposure.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.