Back to skill

Security audit

AI Profit Engine

Security checks for vulnerabilities and agentic risk

Overview

This opportunity scanner has a plausible purpose, but it embeds a third-party bearer token and runs an unpackaged workspace script, so it needs Review before installation.

Do not install this as-is unless you first remove and rotate the embedded Moltbook token, package or remove the Polymarket monitor script, resolve script paths relative to the installed skill, and add clear opt-in controls for external services, credentials, logging, and any hourly scheduling.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/scan.sh:49
Finding

Hard-Coded Moltbook Bearer Credential

Content
View full analysis
/dev/null) ``` ### Technical Analysis The script embeds a Moltbook bearer token directly in source code. Any person or system with access to the Skill package, source repository, build artifact, backup, or execution logs that reproduce the command can recover and reuse this credential. This implementation also contradicts the documented configuration in `SKILL.md`, which states that the `MOLTBOOK_API_KEY` environment variable should provide the credential. Bearer tokens generally grant access based solely on possession, so no additional authentication factor may be required. The credential is transmitted only to the declared Moltbook HTTPS endpoint in the reviewed code. No evidence was found that the script deliberately sends it to an unrelated service. Nevertheless, embedding it in a distributable artifact constitutes direct credential disclosure. ### Attack Path 1. An attacker obtains a copy of the Skill package or reads `scripts/scan.sh`. 2. The attacker extracts the bearer token from line 50. 3. The attacker submits requests to Moltbook with the copied `Authorization: Bearer` header. 4. Moltbook treats those requests as originating from the credential owner until the token is revoked, expires, or is otherwise restricted. ### Impact Assessment An attacker may impersonate the associated Moltbook account or API client within the permissions assigned to the exposed token. Potential impact includes unauthorized access to protected feed data, API quota consumption, account-level request attribution, and abuse of any additional API operations permitted by the token. Th ...[truncated 258 chars]
Remediation
View remediation
&2 exit 1 fi MOLTBOOK=$(curl --fail --silent --show-error \ "https://www.moltbook.com/api/v1/submolts/predictionmarkets/feed?sort=new&limit=5" \ -H "Authorization: Bearer ${MOLTBOOK_API_KEY}") ``` 3. Supply the secret through an approved secret manager or a protected runtime environment rather than committing it to source control. 4. Restrict the replacement token to the minimum read-only API scope required for feed scanning. 5. Review repository history, distributed artifacts, logs, and backups for copies of the exposed credential. 6. Add automated secret scanning to development and release pipelines. 7. Avoid shell tracing such as `set -x` around authenticated requests because it may disclose authorization headers. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/scan.sh:5
Finding

Execution of an Unpackaged Script from an External Workspace

Content
View full analysis
> "$LOG" bash scripts/polymarket_wallet_monitor.sh >> "$LOG" 2>&1 ``` ### Technical Analysis The script changes its working directory to `$HOME/.openclaw/workspace` instead of resolving resources relative to the installed Skill directory. It later invokes `scripts/polymarket_wallet_monitor.sh` using a relative path. The audited project does not contain `scripts/polymarket_wallet_monitor.sh`. Consequently, the executed file—if one exists—is taken from the external workspace and is not part of the reviewed package. The effective behavior of the Skill therefore depends on mutable, unreviewed local content. If another user, process, compromised Skill, or prior workflow can create or modify `$HOME/.openclaw/workspace/scripts/polymarket_wallet_monitor.sh`, it can cause arbitrary shell commands to run when this scanner is invoked. This violates least-privilege and package-integrity expectations because opportunity scanning does not require executing an unspecified workspace script. This is not confirmed remote payload retrieval: the reviewed script does not download code and pipe it into a shell. Exploitation requires prior write access to the relevant local workspace path. ### Attack Path 1. An attacker or compromised local process obtains write access to `$HOME/.openclaw/workspace/scripts/` or the existing monitor file. 2. The attacker creates or replaces `polymarket_wallet_monitor.sh` with malicious shell commands. 3. A user or automated job runs the Skill's `scripts/scan.sh`. 4. The scanner changes into `$HOME/.openclaw/workspace`. 5. Line 67 launches the attacker-controlled file with Bash. 6. The payload executes with the opera ...[truncated 838 chars]
Remediation
View remediation
&2 exit 1 fi bash "$MONITOR" >> "$LOG" 2>&1 ``` 3. Remove the global `cd "$HOME/.openclaw/workspace"` dependency. Derive log and resource paths explicitly from trusted configuration or the Skill directory. 4. Verify that packaged scripts are regular files with trusted ownership and are not writable by unauthorized users. 5. Where feasible, validate the monitor script against a release-time checksum or signed manifest before execution. 6. Fail closed when the required script is absent instead of falling back to similarly named workspace content. 7. Run the scanner under a dedicated, unprivileged account with only the filesystem and network access needed for read-only opportunity scanning. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared behavior does not match the observed capabilities: the skill reportedly performs wallet monitoring, omits a listed platform, and uses a hardcoded authenticated credential not disclosed in the description. This mismatch is dangerous because users and agents may grant trust based on the stated purpose while the skill performs undisclosed authenticated or surveillance-like actions against third-party services.

Content

No source excerpt is available for this finding.

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/scan.sh (reported line 14)May include surrounding context.

sh
# 1. 扫描 ClawTasks 开放 Bounty
echo "=== ClawTasks 扫描 ===" >> "$LOG"
CLAWTASKS=$(curl -s "https://clawtasks.com/api/bounties?status=open" 2>/dev/null)
if [ -n "$CLAWTASKS" ] && [ "$CLAWTASKS" != "null" ]; then
    echo "$CLAWTASKS" | python3 -c "
import sys, json

External Script Fetching

High
Category
Supply Chain
Confidence
91% confidence
Finding

Although this is also an external fetch, here it is combined with a hardcoded bearer token, turning a simple network request into an authenticated third-party action. In the context of an autonomous profit-scanning skill, silent authenticated access materially increases risk because it may expose account-scoped data and normalize hidden credential use.

Content

Scanner excerpt · scripts/scan.sh (reported line 44)May include surrounding context.

sh
# 2. 扫描 Moltbook predictionmarkets 最新帖子
echo "=== Moltbook 扫描 ===" >> "$LOG"
MOLTBOOK=$(curl -s "https://www.moltbook.com/api/v1/submolts/predictionmarkets/feed?sort=new&limit=5" \
    -H "Authorization: Bearer moltbook_sk_9GZ_KKTbysXZo2K1NSLD1zgBDG2Ve5es" 2>/dev/null)
if [ -n "$MOLTBOOK" ]; then
    echo "$MOLTBOOK" | python3 -c "

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

A hardcoded bearer token gives whoever runs or reads the skill access to a credentialed Moltbook account or API scope. Embedding secrets directly in the script enables credential leakage through source distribution, logs, backups, or downstream reuse, and it is unjustified for a generic scanning skill that could operate with user-supplied or unauthenticated access.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script silently uses a hardcoded API credential in a network request without disclosure, so an agent may authenticate to a third-party service on behalf of an unknown account without user awareness. This creates unauthorized account use risk and hides that execution causes credentialed external activity rather than simple public scraping.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises a shell-based quick start (bash scripts/scan.sh) but declares no explicit tool scope or permissions, so an agent or reviewer cannot tell what command execution is intended or allowed. In a skill that continuously scans external platforms, hidden shell capability increases the risk of unexpected command execution, network access, or filesystem changes beyond the stated purpose.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The invocation description is broad enough to trigger on vague requests about making money or finding opportunities, which can cause the skill to run in contexts the user did not explicitly intend. Because this skill reaches multiple external services and executes shell commands, overbroad activation raises the chance of unnecessary third-party access, noisy automation, and unintended data exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The markdown notes an API key but does not clearly warn that the skill monitors multiple third-party platforms, sends requests externally, and may create privacy, compliance, or account-risk implications. In a 24/7 scanner context, lack of disclosure is more dangerous because agents may repeatedly access external services or process user-linked data without informed consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script's natural-language comments and runtime log/output strings are written in Chinese throughout, with no indication that language choice is configurable or limited to a justified locale-specific use case. This can violate language/locale policy where user-facing behavior should not force a specific language without opt-in.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The script parses third-party API responses and appends derived content such as post titles and author names to a persistent plain-text log. In an automated agent environment, this can accumulate sensitive or user-generated data without retention controls, exposing it to local users, backups, or later exfiltration.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script is presented as an opportunity scanner, but it also invokes a separate wallet-monitoring subscript for Polymarket. In an agent skill, hidden monitoring of a wallet expands scope from passive discovery to surveillance of financial activity, which is sensitive and can enable profiling or misuse if the subscript inspects private positions, balances, or trading behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.