Back to skill

Security audit

Agent Reputation Tracker

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent local betting-reputation analyzer with an optional, disclosed Moltbook publishing feature, though users should treat the published betting metrics and temporary file handling as sensitive.

Install only if you are comfortable letting the skill read your local betting log. Do not publish to Moltbook unless you have reviewed the generated JSON and are willing to share aggregate betting volume, profit, ROI, platforms, and activity dates. Prefer replacing the documented /tmp/agent_profile.json workflow with a streamed upload or a unique restricted temporary file.

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
SKILL.md:216
Finding

Predictable Temporary File Exposes Betting Profile Data to Local Attacks

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 216–220
Vulnerability Type: Predictable and unsafe temporary-file handling
Risk Level: Medium

bash
python3 -c \"<above script>\" > /tmp/agent_profile.json
curl -s -X POST https://api.moltbook.com/v1/agents/profile \
  -H "Authorization: Bearer $MOLTBOOK_API_KEY" \
  -H "Content-Type: application/json" \
  -d @/tmp/agent_profile.json | jq .

Technical Analysis

The publishing instructions write sensitive betting-performance data to the fixed path /tmp/agent_profile.json. Shared temporary directories are commonly writable by multiple local users and processes. A predictable filename creates several security risks:

  • A local attacker may pre-create the path as a symbolic link, potentially redirecting the write to another file writable by the Agent.
  • The generated profile may be readable by other local users when the process has a permissive umask.
  • Another process may replace or modify the file after generation but before curl reads it, creating a time-of-check/time-of-use race.
  • The temporary file is not removed after publication, leaving financial-performance data on disk.

The profile includes betting volume, net profit, ROI, supported platforms, and activity dates. Although publishing these aggregates to Moltbook is an explicitly declared and user-triggered feature, retaining them in a predictable shared temporary file is unnecessary and exceeds the minimum local exposure required to perform the upload.

Attack Path

  1. An attacker with access to the same host monitors or anticipates use of the documented publishing command.
  2. The attacker creates /tmp/agent_profile.json in advance, potentially as a symbolic link to another file that the Agent can overwrite.
  3. The Agent runs the documented command and writes the generated betting profile through the attacker-controlled path.
  4. The attacker reads the generated ...[truncated 1192 chars]
Remediation
View remediation

Remediation Suggestions

Avoid creating a temporary file by streaming the validated JSON directly to curl:

bash
python3 -c \"<profile-generation-script>\" |
  curl --fail-with-body --silent --show-error \
    -X POST https://api.moltbook.com/v1/agents/profile \
    -H "Authorization: Bearer $MOLTBOOK_API_KEY" \
    -H "Content-Type: application/json" \
    --data-binary @-

If an intermediate file is required:

  1. Set umask 077 before creating it.
  2. Use mktemp to create a unique file atomically.
  3. Validate the generated JSON before transmission.
  4. Keep the file descriptor and pathname under the same process's control.
  5. Install a shell trap that removes the file on normal exit, interruption, or failure.
  6. Use curl --fail-with-body --silent --show-error so server and transport failures are not silently ignored.

Example:

bash
umask 077
profile_file="$(mktemp "${TMPDIR:-/tmp}/agent_profile.XXXXXX.json")" || exit 1
trap 'rm -f -- "$profile_file"' EXIT HUP INT TERM

python3 -c \"<profile-generation-script>\" > "$profile_file" || exit 1
python3 -m json.tool "$profile_file" > /dev/null || exit 1

curl --fail-with-body --silent --show-error \
  -X POST https://api.moltbook.com/v1/agents/profile \
  -H "Authorization: Bearer $MOLTBOOK_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @"$profile_file"

Publishing should remain conditional on an explicit user request, and the user should be informed that betting volume, profit, ROI, platforms, and activity dates will be transmitted to Moltbook.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (10)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

This section instructs posting locally derived betting performance data to an external API. Even if the payload is aggregated, it still exposes potentially sensitive financial history, platform usage, activity dates, and performance metrics to a third party, creating privacy and data-governance risk.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · SKILL.md (reported line 265)May include surrounding context.

"

text

## Output Rules

1. Always show win rate as a percentage with one decimal place
2. Always show ROI with a sign prefix (+/-)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill is presented primarily as a local reputation/statistics tracker, but it also includes functionality to publish derived betting performance data to a third-party service. That mismatch can mislead users about the data boundary and increase the chance that private financial or behavioral data is transmitted externally without fully informed consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The invocation description includes broad trigger phrases like stats, performance, reputation, and track record, which can match ordinary conversation and cause the skill to activate unexpectedly. In context, unexpected activation matters because the skill reads persistent local betting history and includes an optional external publishing path.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill declares access to an API credential even though its core purpose is local analytics on a SQLite database. Expanding credential scope beyond the minimum needed increases attack surface and creates a path for unintended external data sharing if the publish feature is triggered.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 37)May include surrounding context.

The skill expects a SQLite database at ~/.openclaw/data/bet_log.db with this schema:

sql
CREATE TABLE IF NOT EXISTS bets (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  timestamp TEXT NOT NULL,           -- ISO 8601 format
  platform TEXT NOT NULL,            -- e.g., 'draftkings', 'polymarket', 'kalshi'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The publication instructions send betting-history-derived profile data to a remote API, but the skill does not provide a prominent privacy warning at the point of transmission. Users may not understand that their local performance metrics, platform list, and activity timeline are leaving the device and being processed by a third party.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The hardcoded remote Moltbook endpoint confirms that the skill is designed to transmit local profile data outside the host environment. In a skill whose main purpose is local analytics, this materially changes the trust model and privacy exposure.

Content

Scanner excerpt · SKILL.md (reported line 217)May include surrounding context.

bash
# Save profile to file first, then push
python3 -c \"<above script>\" > /tmp/agent_profile.json
curl -s -X POST https://api.moltbook.com/v1/agents/profile \
  -H "Authorization: Bearer $MOLTBOOK_API_KEY" \
  -H "Content-Type: application/json" \
  -d @/tmp/agent_profile.json | jq .

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The hardcoded remote Moltbook endpoint confirms that the skill is designed to transmit local profile data outside the host environment. In a skill whose main purpose is local analytics, this materially changes the trust model and privacy exposure.

Content

Scanner excerpt · SKILL.md (reported line 217)May include surrounding context.

bash
# Save profile to file first, then push
python3 -c \"<above script>\" > /tmp/agent_profile.json
curl -s -X POST https://api.moltbook.com/v1/agents/profile \
  -H "Authorization: Bearer $MOLTBOOK_API_KEY" \
  -H "Content-Type: application/json" \
  -d @/tmp/agent_profile.json | jq .

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 277)May include surrounding context.

md
## Error Handling

- If bet_log.db doesn't exist, offer to create it with the schema and explain how to log bets
- If no resolved bets exist, report "No resolved bets found" and suggest logging some bets first
- If MOLTBOOK_API_KEY is not set and user requests publishing, explain how to get a key at https://moltbook.com
- If Moltbook API returns an error, display the error message and suggest checking the key

Static analysis

No suspicious patterns detected.