Back to skill

Security audit

muapi-platform

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its MuAPI utility purpose, but its recommended setup can expose a MuAPI API key in command history and process arguments.

Before installing, prefer the interactive setup form, avoid typing the API key directly into a command, check where the muapi CLI stores credentials, and rotate any key previously entered through the documented command-line example.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
setup.sh:8
Finding
API Key Exposed Through Shell History and Process Arguments<![CDATA[ ## Vulnerability Details **File Location**: `setup.sh:8-9` and documented usage at `SKILL.md:23` **Vulnerability Type**: Sensitive credential exposure through command-line arguments **Risk Level**: Medium ### Vulnerable Code ```bash --add-key) if [ -n "${2:-}" ]; then MUAPI_API_KEY="$2" muapi auth configure --api-key "$2" else muapi auth configure fi ;; ``` The documented invocation also instructs users to place the credential directly on the command line: ```bash bash setup.sh --add-key "YOUR_MUAPI_KEY" ``` ### Technical Analysis The API key is accepted as a positional command-line argument and forwarded to the `muapi` executable through `--api-key "$2"`. Quoting prevents shell command injection, but it does not protect the confidentiality of the value. The key may be exposed through: - The user's shell-history file, because the documented command contains the key. - Process inspection while `muapi auth configure` is running, subject to the operating system's process-visibility controls. - Process monitoring, diagnostic collection, audit logging, or endpoint-management software that records command arguments. - CI/CD or terminal logs that capture the invoked command. Assigning the same value to `MUAPI_API_KEY` does not mitigate the issue because the key remains duplicated in the child process's argument vector. ### Attack Path 1. A user follows `SKILL.md` and runs `bash setup.sh --add-key "SECRET_KEY"`. 2. The command containing the key may be written to shell history or captured in terminal or automation logs. 3. The script starts `muapi auth configure --api-key "SECRET_KEY"`, temporarily exposing the key in the process argument list. 4. A local user or monitoring component with sufficient process visibility, or anyone who later gains access to the relevant history or logs, retrieves the key. 5. The attacker submits the recovered credential to MuAPI and performs operations permitted by the associated account. ...[truncated 513 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not accept API keys as command-line arguments in the recommended workflow. 2. Read the key interactively without terminal echo, for example with `read -r -s`, and clear the shell variable after use. 3. Pass the credential to `muapi` through standard input, a protected credential file, an operating-system secret store, or another supported mechanism that does not expose it in process arguments. 4. If `muapi` only supports `--api-key`, request or implement a stdin-based configuration option. Until then, clearly warn users about process and history exposure. 5. Update `SKILL.md` so its primary example invokes an interactive configuration flow, such as: ```bash bash setup.sh --add-key ``` 6. Ensure any credential file created by the downstream CLI has restrictive permissions, such as owner-only access. 7. Advise affected users to remove exposed commands from shell and automation logs and rotate any API key previously entered through the documented command. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (1)

Missing User Warnings

Medium
Confidence
85% confidence
Finding
The markdown instructs users to provide and store an API key and to test it, but it does not include any user-facing warning about credential sensitivity, storage location, or the privacy/security implications of exposing or persisting the key. Under the markdown criteria for missing user warnings, credential-related behavior should be disclosed when it could affect user data or privacy.

Static analysis

No suspicious patterns detected.