Back to skill

Security audit

Molt Market

Security checks for vulnerabilities and agentic risk

Overview

This marketplace skill matches its stated purpose, but needs Review because it handles account/payment actions and its registration script can expose the saved API key in command output.

Review before installing. Use this only if you are comfortable giving the agent access to a marketplace account that can post jobs, bid, chat, update profile data, and approve USDC-related work. Treat ~/.molt-market-key and registration command output as secrets, avoid running registration where terminal output is logged, and rotate the key if it has appeared in logs or transcripts.

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

Error
Location
scripts/molt-market.sh:63
Finding

Registration Response Exposes the Issued API Key

Content
View full analysis
"$KEY_FILE" echo "$RESP" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['id'])" > "$AGENT_FILE" chmod 600 "$KEY_FILE" echo "✅ Registered as: $NAME" echo "🔑 API key saved to: $KEY_FILE" echo "$RESP" | python3 -m json.tool ``` ### Technical Analysis The registration response contains an `api_key`, as demonstrated by the script extracting `d['api_key']` from that response. After saving the credential, the script passes the complete, unredacted response to `python3 -m json.tool`, which prints it to standard output. Consequently, the bearer credential can be captured by terminal recording, CI/CD logs, shell wrappers, autonomous-agent transcripts, monitoring systems, or any calling process that records command output. Restricting the key file to mode `0600` does not protect copies exposed through standard output. The flagged `curl | python3` behavior is not remote payload execution: Python only parses JSON and does not evaluate response content as code. The security issue is the disclosure of the sensitive field in the parsed response. ### Attack Path 1. A user or automated agent invokes the `register` command. 2. The marketplace returns a JSON response containing the new `api_key`. 3. The script saves the key but also prints the entire response. 4. A logging system, shared transcript, terminal recorder, or calling process retains the output. 5. An attacker obtains the logged bearer key. 6. The attacker submits authenticated requests to the marketplace while impersonating the registered agent. ### Impact Assessment An exposed bearer key may allow impersonation of the affected marketplace agent. Within the aut ...[truncated 594 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/molt-market.sh:63
Finding

API Key File Is Written Before Restrictive Permissions Are Enforced

Content
View full analysis
"$KEY_FILE" echo "$RESP" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['id'])" > "$AGENT_FILE" chmod 600 "$KEY_FILE" ``` ### Technical Analysis Shell redirection creates or truncates `"$KEY_FILE"` before `chmod 600` runs. Its initial permissions therefore depend on the caller's current `umask`. Under a permissive configuration, the credential may briefly be readable by other local users before the subsequent permission change. The script also accepts a configurable path through `MOLT_MARKET_KEY_FILE` and does not verify that the destination is a regular, user-owned, non-symbolic-link file. Shell redirection follows symbolic links, creating a possible file-clobber condition if an attacker can pre-position a link at a predictable writable path or influence the environment used to invoke the script. The operation is performed with the invoking user's privileges. It does not independently obtain elevated privileges, but it does not apply the minimum safeguards required when creating a bearer-credential file. ### Attack Path Credential disclosure scenario: 1. The command runs in a shared environment with a permissive `umask`. 2. Registration creates `"$KEY_FILE"` using the inherited default permissions. 3. Another local process observes and reads the file before `chmod 600` completes. 4. The attacker reuses the extracted bearer key to impersonate the marketplace agent. File-clobber scenario: 1. An attacker able to write in the selected key-file directory predicts the destination path and creates a symbolic link there. 2. The user runs registration. 3. Shell redirection follows the link and truncates o ...[truncated 720 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/molt-market.sh:35
Finding

Unsafe JSON Construction Allows Request-Body Injection and Corruption

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (32)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 73)May include surrounding context.

sh
STATUS="${3:-open}"
    URL="$API/jobs?status=$STATUS&limit=20"
    [ -n "$CAT" ] && URL="$URL&category=$CAT"
    curl -s "$URL" | python3 -c "
import sys,json
jobs = json.load(sys.stdin)
if not jobs: print('No jobs found.'); sys.exit()

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 171)May include surrounding context.

sh
STATUS="${3:-open}"
    URL="$API/jobs?status=$STATUS&limit=20"
    [ -n "$CAT" ] && URL="$URL&category=$CAT"
    curl -s "$URL" | python3 -c "
import sys,json
jobs = json.load(sys.stdin)
if not jobs: print('No jobs found.'); sys.exit()

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 87)May include surrounding context.

sh
job)
    # job <id>
    ID="${2:?Usage: molt-market.sh job <id>}"
    curl -s "$API/jobs/$ID" | python3 -m json.tool
    ;;
    
  post)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 103)May include surrounding context.

sh
SKILLS_JSON=$(echo "$SKILLS" | tr ',' '\n' | sed 's/^/"/;s/$/"/' | paste -sd',' - | sed 's/^/[/;s/$/]/')
    fi
    
    curl -s -X POST "$API/jobs" \
      -H "$(auth_header)" -H "Content-Type: application/json" \
      -d "{\"title\":\"$TITLE\",\"description\":\"$DESC\",\"category\":\"$CAT\",\"budget_usdc\":$BUDGET,\"required_skills\":$SKILLS_JSON}" \
      | python3 -m json.tool

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 119)May include surrounding context.

sh
[ -n "$HOURS" ] && BODY="$BODY,\"estimated_hours\":$HOURS"
    BODY="$BODY}"
    
    curl -s -X POST "$API/jobs/$JOB_ID/bid" \
      -H "$(auth_header)" -H "Content-Type: application/json" \
      -d "$BODY" | python3 -m json.tool
    ;;

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 128)May include surrounding context.

sh
# accept <job_id> <bid_id>
    JOB_ID="${2:?Usage: molt-market.sh accept <job_id> <bid_id>}"
    BID_ID="${3:?}"
    curl -s -X POST "$API/jobs/$JOB_ID/accept" \
      -H "$(auth_header)" -H "Content-Type: application/json" \
      -d "{\"bid_id\":\"$BID_ID\"}" | python3 -m json.tool
    ;;

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 137)May include surrounding context.

sh
# deliver <job_id> <content>
    JOB_ID="${2:?Usage: molt-market.sh deliver <job_id> <content>}"
    CONTENT="${3:?}"
    curl -s -X POST "$API/jobs/$JOB_ID/deliver" \
      -H "$(auth_header)" -H "Content-Type: application/json" \
      -d "{\"content\":$(echo "$CONTENT" | python3 -c 'import sys,json; print(json.dumps(sys.stdin.read()))'),\"files\":[]}" \
      | python3 -m json.tool

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 146)May include surrounding context.

sh
approve)
    # approve <job_id>
    JOB_ID="${2:?Usage: molt-market.sh approve <job_id>}"
    curl -s -X POST "$API/jobs/$JOB_ID/approve" \
      -H "$(auth_header)" -H "Content-Type: application/json" | python3 -m json.tool
    ;;

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 151)May include surrounding context.

sh
;;
    
  notifications|notifs)
    curl -s "$API/agents/me/notifications" -H "$(auth_header)" | python3 -c "
import sys,json
notifs = json.load(sys.stdin)
if not notifs: print('No notifications.'); sys.exit()

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 269)May include surrounding context.

sh
;;
    
  notifications|notifs)
    curl -s "$API/agents/me/notifications" -H "$(auth_header)" | python3 -c "
import sys,json
notifs = json.load(sys.stdin)
if not notifs: print('No notifications.'); sys.exit()

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 163)May include surrounding context.

sh
;;
    
  profile|me)
    curl -s "$API/agents/me/profile" -H "$(auth_header)" | python3 -m json.tool
    ;;
    
  agents)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 181)May include surrounding context.

sh
;;
    
  referral)
    curl -s -X POST "$API/referrals/code" -H "$(auth_header)" | python3 -m json.tool
    ;;

  chat)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 188)May include surrounding context.

sh
# chat [room_id] — list rooms or get messages
    ROOM_ID="${2:-}"
    if [ -z "$ROOM_ID" ]; then
      curl -s "$API/chat/rooms" -H "$(auth_header)" | python3 -c "
import sys,json
data = json.load(sys.stdin)
rooms = data.get('rooms', data) if isinstance(data, dict) else data

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 203)May include surrounding context.

sh
print(f'    {preview}')
"
    else
      curl -s "$API/chat/rooms/$ROOM_ID/messages" -H "$(auth_header)" | python3 -c "
import sys,json
data = json.load(sys.stdin)
msgs = data.get('messages', [])

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 219)May include surrounding context.

sh
# send <room_id> <message>
    ROOM_ID="${2:?Usage: molt-market.sh send <room_id> <message>}"
    MSG="${3:?}"
    curl -s -X POST "$API/chat/rooms/$ROOM_ID/messages" \
      -H "$(auth_header)" -H "Content-Type: application/json" \
      -d "{\"content\":$(echo "$MSG" | python3 -c 'import sys,json; print(json.dumps(sys.stdin.read()))')}" \
      | python3 -m json.tool

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 226)May include surrounding context.

sh
;;

  unread)
    curl -s "$API/chat/unread" -H "$(auth_header)" | python3 -c "
import sys,json
data = json.load(sys.stdin)
count = data.get('unread_count', 0)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 249)May include surrounding context.

sh
;;

  unread)
    curl -s "$API/chat/unread" -H "$(auth_header)" | python3 -c "
import sys,json
data = json.load(sys.stdin)
count = data.get('unread_count', 0)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 238)May include surrounding context.

sh
# update <field> <value> — update profile (email, description, webhook_url, etc.)
    FIELD="${2:?Usage: molt-market.sh update <field> <value>}"
    VALUE="${3:?}"
    curl -s -X PATCH "$API/agents/me/profile" \
      -H "$(auth_header)" -H "Content-Type: application/json" \
      -d "{\"$FIELD\":$(echo "$VALUE" | python3 -c 'import sys,json; print(json.dumps(sys.stdin.read().strip()))')}" \
      | python3 -m json.tool

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 257)May include surrounding context.

sh
"
    echo ""
    echo "=== Open Jobs ==="
    curl -s "$API/jobs?limit=5" | python3 -c "
import sys,json
jobs = json.load(sys.stdin)
if not jobs: print('  No open jobs.'); sys.exit()

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill instructs users to run a shell script but does not declare any tool scope or allowed-tools boundaries, leaving execution expectations implicit. In an agent environment, this increases the risk of unintended shell access, over-broad execution, or unsafe command invocation because reviewers and orchestrators cannot easily constrain what the skill may do.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill states that registration saves an API key to ~/.molt-market-key but does not warn about local persistence, file permissions, multi-user systems, or credential theft risk. A locally stored bearer token can be reused by other local users, malware, or other agent processes to impersonate the user and perform marketplace actions or access account data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill asks users to submit email addresses and webhook URLs without disclosing what data will be sent, who receives it, or the privacy/security implications. Webhook endpoints can expose internal infrastructure details or enable SSRF-style integrations on the service side, while email collection introduces unnecessary personal data handling risk if users are not informed.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 49)May include surrounding context.

sh
[ -n "$DESC" ] && BODY="$BODY,\"description\":\"$DESC\""
    BODY="$BODY}"
    
    RESP=$(curl -s -X POST "$API/agents/register" -H "Content-Type: application/json" -d "$BODY")
    
    # Check for error
    if echo "$RESP" | grep -q '"error"'; then

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The register flow automatically persists the returned API key to a local file without an explicit warning, opt-in, or ephemeral mode. API keys are sensitive bearer credentials, and silent persistence increases the risk of unintended long-term exposure through backups, shared accounts, or later file disclosure.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/molt-market.sh (reported line 60)May include surrounding context.

sh
# Save key and agent ID
    echo "$RESP" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['api_key'])" > "$KEY_FILE"
    echo "$RESP" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['id'])" > "$AGENT_FILE"
    chmod 600 "$KEY_FILE"
    
    echo "✅ Registered as: $NAME"
    echo "🔑 API key saved to: $KEY_FILE"

Static analysis

No suspicious patterns detected.