Back to skill

Security audit

Workflow

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly does what it claims, but it asks agents to reinstall an unverified local CLI and contains a shell argument bug that could run unintended commands.

Review carefully before installing. Only use this skill with a trusted, pinned muapi CLI, avoid automatic pip upgrades from mutable workspace paths, patch or avoid list-workflows.sh until --limit is validated, and require explicit confirmation before deleting workflows or downloading outputs to local directories.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/list-workflows.sh:5
Finding

Arbitrary Command Execution Through Arithmetic Injection in the Limit Argument

Content
View full analysis

Vulnerability Details

File Location: scripts/list-workflows.sh, lines 5-19
Vulnerability Type: Shell arithmetic injection
Risk Level: High

Vulnerable Code

bash
JSON_ONLY=false
LIMIT=20

while [[ $# -gt 0 ]]; do
    case $1 in
        --json) JSON_ONLY=true; shift ;;
        --limit) LIMIT="$2"; shift 2 ;;
        *) shift ;;
    esac
done

if [ "$JSON_ONLY" = true ]; then
    muapi workflow list --output-json
else
    muapi workflow list | head -n $((LIMIT + 5))
fi

Technical Analysis

The value supplied through --limit is stored without verifying that it is an integer. It is subsequently evaluated inside the Bash arithmetic expansion $((LIMIT + 5)).

Bash arithmetic expressions can recursively interpret variable contents as arithmetic syntax. Crafted expressions can reference array subscripts or other arithmetic constructs containing command substitutions. As a result, an attacker-controlled LIMIT value can cause shell commands to execute while the arithmetic expression is being evaluated.

Merely quoting the initial assignment does not make the later arithmetic evaluation safe. The input must be restricted to an expected numeric format before it enters an arithmetic context.

Attack Path

  1. An attacker gains influence over arguments passed to list-workflows.sh, such as through an automated agent request, wrapper command, or untrusted job parameter.
  2. The attacker supplies a malicious arithmetic expression as the value of --limit.
  3. Line 11 stores that expression verbatim in LIMIT.
  4. Line 19 evaluates the value through $((LIMIT + 5)).
  5. Embedded shell evaluation in the malicious arithmetic expression executes with the privileges of the account running the Skill.

Impact Assessment

Successful exploitation can provide arbitrary command execution under the Skill runner's operating-system account. The attacker could read or alter files acces ...[truncated 373 chars]

Remediation
View remediation

Remediation Suggestions

Require --limit to contain only decimal digits before using it in an arithmetic expression:

bash
if ! [[ "$LIMIT" =~ ^[0-9]+$ ]]; then
    echo "Error: --limit must be a non-negative integer" >&2
    exit 1
fi

if (( LIMIT > 1000 )); then
    echo "Error: --limit exceeds the permitted maximum" >&2
    exit 1
fi

muapi workflow list | head -n "$((10#$LIMIT + 5))"

The 10# prefix explicitly treats the validated value as base 10. Quoting the final head argument also prevents unintended word splitting.

Additional hardening should include:

  • Reject missing values before reading $2.
  • Reject unknown command-line options instead of silently ignoring them.
  • Add automated negative tests using arithmetic expressions, command substitutions, whitespace, signs, and oversized values.
  • Apply numeric validation to every script option that is expected to represent a number.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:14
Finding

Mandatory Installation of an Unpinned and Unverified Workspace Dependency

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 14-20
Vulnerability Type: Unsafe source dependency installation
Risk Level: Medium

Vulnerable Code

markdown
## Prerequisites

Always ensure the `muapi` CLI is up-to-date before running any commands. Reinstall from source at the start of every session:

```bash
pip install --upgrade /path/to/muapi-cli

Replace /path/to/muapi-cli with the actual path to the muapi-cli directory in the workspace (the directory containing pyproject.toml).

text

### Technical Analysis

The Skill directs the agent to reinstall a mutable source directory at the beginning of every session. The required dependency is outside the audited project and is not constrained to a reviewed version, repository commit, signed release, or cryptographic hash.

Installing a Python project from source may execute dependency resolution and packaging or build logic. If the referenced workspace directory has been replaced or modified, the installation process can execute attacker-controlled build behavior and install a malicious `muapi` executable. Repeating the installation every session increases exposure to later changes in that external directory.

Because the dependency content is not included in the audited project, its effective behavior cannot be established from the reviewed files.

### Attack Path

1. An attacker modifies, replaces, or causes the agent to select an untrusted directory that appears to contain the expected `muapi-cli` project and `pyproject.toml`.
2. The agent follows the mandatory prerequisite and invokes `pip install --upgrade` against that directory.
3. Pip processes attacker-controlled package metadata, dependencies, and potentially executable build hooks.
4. The malicious package is installed into the active Python environment.
5. Subsequent workflow operations invoke the substituted `muapi` CLI, allowing attacker-controlled behavior to appear as 
...[truncated 673 chars]
Remediation
View remediation

Remediation Suggestions

Replace the mutable source-installation requirement with a reproducible and verified dependency process:

  • Pin the CLI to an explicitly reviewed release or immutable repository commit.
  • Obtain the package only from a trusted, authenticated source.
  • Verify package hashes or signatures before installation.
  • Use a lock file with hashes for transitive dependencies.
  • Avoid reinstalling or upgrading the dependency automatically at the start of every session.
  • Install the CLI into an isolated virtual environment with minimum filesystem and credential access.
  • If a workspace source tree must be used, validate its canonical path, repository origin, exact commit, and clean working-tree state before installation.
  • Review the dependency's build configuration and disable unnecessary build isolation or network dependency resolution where operationally feasible.
  • Document the exact audited CLI version so changes require a new security review.
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
97% confidence
Finding

The declared description presents a full workflow-authoring/orchestration capability: building, running, and visualizing AI generation pipelines from natural-language descriptions. The actual code does not implement any of those functions. It only accepts a search query and forwards it to a CLI command for discovering workflows, with an optional result limit. That is a materially different primary purpose from authoring and executing workflows, so this is a description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description promises a workflow architect/orchestration capability for creating, executing, and visualizing AI generation pipelines. The supplied code does none of that. It only parses two command-line flags (--json and --limit) and invokes muapi workflow list, optionally formatting output as JSON or truncating lines with head. This is a materially different primary purpose: listing workflows rather than building or managing multi-step generation graphs. Therefore, the description does not accurately represent the actual behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The description says the AI architect converts a user's "plain-language description" into a runnable node graph, but it does not define clear trigger boundaries or exclusion conditions. In a markdown skill description, this broad phrasing can overlap with many ordinary user requests and may cause unintended invocation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill tells the agent to run pip install --upgrade /path/to/muapi-cli from an arbitrary workspace path at the start of every session. Installing a local package executes build/install code from that directory, which can lead to arbitrary code execution if the workspace content is untrusted or tampered with.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The documentation encourages --download ./outputs without clearly warning that execution may write files locally. In agent contexts, silent local writes can overwrite data, consume disk, or deposit untrusted generated content into the workspace without user awareness.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The CLI reference includes muapi workflow delete <id> with no caution about destructive effects or confirmation requirements. In an agent-assisted environment, this can lead to accidental or induced deletion of user workflows, causing irreversible loss of work.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.