T09 · Insecure Skill Coding Practices
- Location
scripts/get-last-trade.sh:18- Finding
API Credential Exposed Through Command-Line URLs
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This market-data skill is purpose-aligned, but it runs unpinned remote MCP code and handles the API key in riskier-than-necessary ways.
Install only if you are comfortable giving this skill access to a Massive API key and running the Massive MCP server from GitHub at launch time. Prefer a version pinned to an immutable commit or verified package, remove ~/.zshrc sourcing, and avoid URL-query API keys before using it in a sensitive environment.
scripts/get-last-trade.sh:18API Credential Exposed Through Command-Line URLs
scripts/start-mcp-server.sh:4Unnecessary Execution of User Shell Startup Configuration
scripts/start-mcp-server.sh:14Runtime Retrieval and Execution of Code Referenced by a Mutable Git Tag
The skill description claims broad capabilities including official MCP server startup, endpoint discovery, generic API access, and SQL-style querying, but the analyzed content does not substantiate those features. This mismatch is security-relevant because overstated capabilities can cause operators or agents to trust the skill with sensitive data, execution privileges, or workflows it was not actually designed or reviewed to handle.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
scripts/get-agg-day.sh AAPL 2026-03-05
## Output rules
- Return concise numeric result first (e.g., last trade price), then timestamp/exchange metadata.
- If Massive is unavailable, state failure explicitly and ask whether to use a fallback source.
The skill advertises and invokes shell-based scripts but does not declare any explicit tool scope such as permissions or allowed-tools. That omission weakens sandboxing and review controls because an agent may execute local shell commands with broader access than users expect, especially in a skill that handles environment-based API credentials.
The script includes the API key directly in the request URL query string when calling the external Massive endpoint. Query-string credentials are commonly exposed through shell history, process listings, debugging output, proxy logs, and upstream server logs, so this creates unnecessary credential leakage risk even though the destination is the expected vendor API.
The script sources the user's ~/.zshrc before making a network request, which executes arbitrary shell code from a broad, unrelated startup file in the script's trust context. That expands the attack surface significantly: a malicious or unexpected .zshrc can run commands, alter PATH/functions, or tamper with the API key and curl behavior when the script is invoked.
The script sources the user's shell profile and reads MASSIVE_API_KEY, which is sensitive credential material. While it errors if the key is absent, there is no user-facing notice, comment, or documentation in this file explaining that the skill reads credentials from the environment.
The curl command sends the requested symbol and API key to api.massive.com, which is an outbound network operation involving user/system data. The file contains no prompt, warning, or explanatory comment disclosing that it will contact an external service.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
RESP=$(curl -sS "https://api.massive.com/v2/aggs/ticker/${SYMBOL}/prev?adjusted=true&apiKey=${KEY}")
python3 - <<'PY' "$RESP"
import json,sys
r=json.loads(sys.argv[1])
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
RESP=$(curl -sS "https://api.massive.com/v2/aggs/ticker/${SYMBOL}/prev?adjusted=true&apiKey=${KEY}")
python3 - <<'PY' "$RESP"
import json,sys
r=json.loads(sys.argv[1])
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
RESP=$(curl -sS "https://api.massive.com/v2/aggs/ticker/${SYMBOL}/prev?adjusted=true&apiKey=${KEY}")
python3 - <<'PY' "$RESP"
import json,sys
r=json.loads(sys.argv[1])
The API key is placed directly in the request URL, which increases exposure through shell history, process listings, debugging output, proxy logs, monitoring systems, and any tooling that records full URLs. Although the call uses HTTPS, URL query parameters are commonly logged more broadly than headers, so the secret may leak to local or intermediary observability layers.
The script sources the user's ~/.zshrc to obtain environment state, which executes arbitrary shell code from a broad, user-controlled startup file. In a skill context, this expands the trust boundary unnecessarily: running a simple quote lookup can trigger unrelated commands, aliases, prompts, network calls, or secrets-handling logic embedded in that file.