Back to skill

Security audit

Polymarket Screener

Security checks for vulnerabilities and agentic risk

Overview

The package includes a real Polymarket screener, but it also ships an unrelated content-writing command that logs user input locally and is not explained by the skill description.

Review this skill carefully before installing. The Polymarket script itself uses a public API and local watchlist/cache files, but the package also contains a mismatched content-writing assistant that can retain your prompts or topics in a local history file. Install only after the publisher removes or clearly documents the unrelated script, fixes the command/documentation mismatch, and explains local data retention controls.

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
scripts/script.sh:5
Finding

Undisclosed Persistent Plaintext Logging of User Input

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh, lines 5–6 and 35–85
Vulnerability Type: Plaintext storage of potentially sensitive user-supplied content
Risk Level: Medium

Vulnerable Code

bash
DATA_DIR="${POLYMARKET_SCREENER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/polymarket-screener}"
DB="$DATA_DIR/data.log"
mkdir -p "$DATA_DIR"
bash
_log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; }

cmd_draft() {
    echo "  Draft: $1
      Target: ${2:-800} words"
    _log "draft" "${1:-}"
}

cmd_headline() {
    echo "  1. How to $1
      2. $1: Complete Guide
      3. Why $1 Matters"
    _log "headline" "${1:-}"
}

cmd_outline() {
    echo "  1. Intro | 2. Problem | 3. Solution | 4. Examples | 5. CTA"
    _log "outline" "${1:-}"
}

cmd_seo() {
    echo "  Keywords: $1 | Title tag | Meta desc | H1-H3 | Internal links"
    _log "seo" "${1:-}"
}

cmd_schedule() {
    echo "  Mon: Research | Tue: Write | Wed: Edit | Thu: Publish | Fri: Promote"
    _log "schedule" "${1:-}"
}

cmd_hooks() {
    echo "  Question | Statistic | Story | Bold claim | Controversy"
    _log "hooks" "${1:-}"
}

cmd_cta() {
    echo "  Subscribe | Share | Comment | Try it | Learn more"
    _log "cta" "${1:-}"
}

cmd_repurpose() {
    echo "  Blog -> Thread -> Video -> Carousel -> Newsletter"
    _log "repurpose" "${1:-}"
}

cmd_metrics() {
    echo "  Views | Clicks | Shares | Time on page | Conversions"
    _log "metrics" "${1:-}"
}

cmd_ideas() {
    echo "  How-to | Listicle | Case study | Interview | Comparison"
    _log "ideas" "${1:-}"
}

Technical Analysis

The script silently records command names and user-supplied arguments in the persistent plaintext file $DATA_DIR/history.log. Inputs to commands such as draft, headline, outline, and seo may contain confidential subjects, unpublished content, cam ...[truncated 1782 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove scripts/script.sh from the package because its content-assistant behavior is unrelated to the declared Polymarket Skill.

  2. If command history is genuinely required, disable it by default and require explicit user opt-in.

  3. Clearly disclose what is logged, where it is stored, why it is retained, and how users can disable or delete it.

  4. Store only non-sensitive metadata; do not record raw command arguments.

  5. Create the data directory and history file with restrictive permissions, for example:

    bash
    umask 077
    mkdir -p -- "$DATA_DIR"
    touch -- "$DATA_DIR/history.log"
    chmod 600 -- "$DATA_DIR/history.log"
    
  6. Implement configurable retention limits and a command that securely clears stored history.

  7. Validate that user-controlled environment variables cannot redirect logs to an unsafe or unexpectedly shared location.

Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill is for Polymarket prediction market screening and probability tracking. The code does not access Polymarket data, markets, prices, probabilities, or any betting-analysis functionality. Its help text explicitly identifies it as a 'Content creation and optimization assistant,' and all commands are writing/marketing oriented (draft, headline, seo, hooks, cta, etc.). It also logs command usage to a local history file, which is undeclared. This is a clear material mismatch in primary purpose and capabilities.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script’s actual behavior is unrelated to the declared Polymarket screening purpose and instead implements a content/SEO assistant. This kind of capability mismatch is dangerous because it can mislead users, reviewers, or higher-level agents into invoking the skill in inappropriate contexts, enabling deceptive behavior and masking unauthorized functionality.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The inline description and help output explicitly present the tool as a content creation and optimization assistant, directly contradicting the published skill identity. Such contradictions are a strong red flag for deceptive packaging, which can hide unapproved functionality and undermine user trust and security review processes.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill advertises capabilities that imply network, file read, and file write behavior, but it does not declare any explicit tool scope or permissions boundaries. This is dangerous because users and hosting platforms cannot clearly constrain what the skill is allowed to access, increasing the chance of over-privileged execution or unintended data exposure if the underlying implementation writes reports or reads local files.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The invocation guidance is broad enough that an agent may trigger this skill in loosely related contexts such as drafting analyses or outlining trends, not just concrete market-screening tasks. That ambiguity can cause the skill to activate unexpectedly and perform network access or file output in situations where the user did not intend those actions, especially given the report-generation and tracking features.

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 · scripts/polymarket.sh (reported line 10)May include surrounding context.

sh
shift 2>/dev/null || true

DATA_DIR="${HOME}/.polymarket-screener"
mkdir -p "$DATA_DIR"

case "$COMMAND" in
  markets)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The logging helper writes user-supplied arguments into a persistent history file without any visible disclosure, consent, retention policy, or sanitization. This can expose sensitive prompts, market research, or other private user data to local disclosure, especially on shared systems or environments with backups and telemetry.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.