Back to skill

Security audit

Amm

Security checks for vulnerabilities and agentic risk

Overview

This skill is advertised as an AMM/blockchain analysis tool, but the inspected artifact is actually a local stateful entry/config manager with under-disclosed file writes and an unsafe config update path.

Review before installing. This does not show hidden network exfiltration or system-level persistence, but it is not the AMM analysis tool it claims to be. If used, treat it as a local file-writing datastore, avoid passing untrusted config values or AMM_DIR settings, and expect it to create, modify, delete, and export local 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/script.sh:139
Finding

Command Injection Through Unescaped Configuration Values

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" ``` ### Technical Analysis The configuration key and value originate directly from command-line arguments and are interpolated into a sed program without escaping or validation: ```bash sed -i "s|^${key}=.*|${key}=${val}|" "$cfg" ``` Shell quoting prevents a direct shell metacharacter injection at the initial command-parsing stage, but it does not prevent injection into the syntax interpreted by sed. An attacker can supply sed delimiters, regular-expression operators, additional sed commands, or GNU sed's `e` command. The `e` command executes an external command through a shell. A crafted value can terminate the intended substitution and append a new sed command that invokes arbitrary operating-system commands. The key is also used as an unescaped regular expression in both `grep` and `sed`, which can cause unintended matching or modification of unrelated configuration records. ### Attack Path 1. The attacker invokes the configuration command with a normal key and value so that the key exists in `config.txt`: ```bash scripts/script.sh config example initial ``` 2. The attacker invokes the command again with a value containing the sed delimiter and injected sed syntax. 3. The script detects that the key already exists and enters the updat ...[truncated 1031 chars]
Remediation
View remediation
&2 return 1 fi ``` 2. Do not construct executable sed programs from untrusted data. Rewrite the configuration file using a method that treats keys and values strictly as data, such as a small Python helper using exact string comparisons. 3. If a text-processing utility must be used, pass values through data variables rather than placing them directly in program source. Ensure the implementation performs literal comparisons and cannot evaluate supplied content. 4. Write updates to a securely created temporary file in the same directory, verify success, apply restrictive permissions, and atomically rename the file into place. 5. Add regression tests containing sed delimiters, backslashes, newlines, regular-expression syntax, and command-like payloads. Verify that these inputs are either safely stored as literal text or explicitly rejected. 6. Consider restricting configuration values to documented formats and maximum lengths instead of accepting arbitrary strings. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:6
Finding

Unsafe User-Controlled Data Directory and Symlink-Following File Operations

Content
View full analysis
> "$DATA_DIR/data.jsonl" } ``` Additional affected operations include: ```bash sed -i "${num}d" "$DATA_DIR/data.jsonl" ``` and: ```bash local cfg="$DATA_DIR/config.txt" ... echo "${key}=${val}" >> "$cfg" ``` ### Technical Analysis The `AMM_DIR` environment variable completely controls the directory used for application data. The script does not canonicalize the selected path, verify directory ownership or permissions, restrict it to an expected base directory, or reject symbolic links. The append operations for `data.jsonl` and `config.txt` follow symbolic links. Consequently, if an attacker can control `AMM_DIR` or prepare entries inside a writable selected directory, the script may append attacker-selected content to another file accessible to the invoking account. Read-oriented commands such as `list`, `search`, `stats`, and `export` also trust a file named `data.jsonl` under this directory. A symbolic link with that name can therefore cause the script to read, search, count, display, or export an unintended file. Some update operations may replace or otherwise alter directory entries depending on the platform-specific behavior of the invoked utility. The directory is created without first setting a restrictive `umask`, so the confidentiality of newly created data depends on the caller's ambient permission settings. ### Attack Path One applicable exploitation path is: 1. An attacker gains control over the `AMM_DIR` environment variable supplie ...[truncated 1731 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill metadata and description claim AMM/protocol analysis, but the documented behavior is a generic local CRUD and export tool with persistent storage and configuration writes. This mismatch is dangerous because it can cause an agent or user to invoke the skill under false assumptions, leading to unintended file writes, data persistence, deletion, or export operations outside the expected AMM-analysis scope.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation repeatedly frames the skill as being for AMM understanding and protocol security, while the actual documented commands are generic record-management actions with no AMM-specific semantics. This inconsistency can mislead automated tool selection and human reviewers, making accidental execution of unrelated, stateful operations more likely.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The manifest presents a blockchain/AMM analysis skill, but the command set implements unrelated entry management operations such as add, remove, export, and config. In an agent setting, this semantic deception increases the risk of unauthorized or unexpected local state changes because a caller may select the skill for analytical tasks and instead trigger filesystem-modifying behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The inline documentation explicitly claims the script analyzes AMM operations, but no such logic exists in the code. Even without direct code execution risk, deceptive documentation can mislead operators and autonomous systems into invoking the tool in sensitive workflows under false assumptions, which increases the chance of unsafe trust decisions and hidden persistence through local data writes.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill is presented as an AMM analysis utility, but the implementation is actually a generic local note/config datastore with add/list/search/remove/export behavior. This mismatch is dangerous because users or higher-level agents may grant trust, permissions, or execution based on the declared security-analysis purpose while the code performs unrelated local file operations, creating a deceptive capability gap and enabling covert data collection or persistence.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The help text markets the command as an AMM analysis tool, while the exposed commands are generic data-management operations that write, search, remove, and export local content. In an agent-skill context this is more dangerous because help output is often used for tool selection and trust establishment; misleading descriptions can cause a system to invoke a filesystem-writing utility where a read-only analytical tool was expected.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation text is broad enough to encourage invocation whenever AMM mechanisms, protocol security, or on-chain concepts are mentioned, even though the documented functionality does not support those tasks. Overbroad routing criteria are dangerous in agent ecosystems because they increase the chance that the wrong skill is selected and granted an opportunity to perform unintended local operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation lists state-changing commands such as add, remove, export, and config without warning about persistence, overwrite risk, deletion, or where data is written. In practice, the absence of warnings lowers user and agent caution, increasing the likelihood of unintended data loss, silent local storage, or exporting potentially sensitive content to disk.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.