Back to skill

Security audit

Market Scout

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed market-research workflow with purpose-aligned web search and optional user-saved context, and I found no hidden credential access, destructive behavior, or automatic install-time execution.

Install this if you want a Chinese-first market research and validation assistant that will use web search when available. Avoid placing secrets or confidential business plans in saved context files, and only run the developer ZIP verification tool on trusted packages.

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
tools/verify_source_sync.py:47
Finding
Unbounded ZIP Decompression Enables Memory Exhaustion## Vulnerability Details **File Location**: `tools/verify_source_sync.py`, lines 47-54 **Vulnerability Type**: Unbounded archive decompression and resource exhaustion **Risk Level**: Medium ### Vulnerable Code ```python def package_files(pkg): out = {} with zipfile.ZipFile(pkg) as zf: for n in zf.namelist(): if not n.startswith(ZIP_PREFIX): continue rel = n[len(ZIP_PREFIX):] if rel.endswith('/'): continue out[rel] = zf.read(n) return out ``` ### Technical Analysis The release-verification utility accepts a caller-selected ZIP archive and reads every matching entry completely into memory using `ZipFile.read()`. All decompressed entries are retained simultaneously in the `out` dictionary. The implementation does not enforce limits on: - The number of archive entries - Individual uncompressed file size - Total uncompressed archive size - Compression ratio - Process memory consumption - Duplicate or ambiguously normalized entry names A small, highly compressed ZIP bomb can therefore expand to a very large amount of data during verification. Because all expanded content remains resident in memory, a malicious archive can exhaust available memory and terminate the Python process or destabilize the host. The `market-scout/` prefix check does not mitigate this issue because an attacker can place oversized entries under that prefix. This is a denial-of-service flaw rather than a code-execution vulnerability. The reviewed implementation reads archive members without extracting them to the filesystem, so no ZIP path-traversal write was established from this code. ### Attack Path 1. An attacker creates a ZIP archive containing one or more highly compressed files beneath the expected `market-scout/` prefix. 2. The attacker supplies the archive to a maintainer or CI workflow as a purported Market Scout rele ...[truncated 1121 chars]
Remediation
## Remediation Suggestions Harden archive processing before reading any member: 1. Inspect each `ZipInfo` record before decompression. 2. Enforce a conservative maximum entry count. 3. Reject entries whose declared uncompressed size exceeds a per-file limit. 4. Track and limit cumulative uncompressed size across the archive. 5. Reject suspicious compression ratios, including entries with very small compressed sizes and extremely large uncompressed sizes. 6. Reject encrypted entries and unsupported compression methods. 7. Detect duplicate normalized paths to prevent one entry from silently replacing another in the dictionary. 8. Stream each member in bounded chunks and compute a digest instead of retaining all decompressed files in memory. 9. Run package verification in a resource-limited CI container with memory, CPU, and execution-time limits. 10. Treat ZIP metadata as untrusted and abort safely when any size or structural limit is exceeded. A hardened implementation should validate metadata and stream hashes, for example: ```python import hashlib import zipfile MAX_ENTRIES = 500 MAX_FILE_SIZE = 20 * 1024 * 1024 MAX_TOTAL_SIZE = 200 * 1024 * 1024 MAX_RATIO = 100 CHUNK_SIZE = 64 * 1024 def package_files(pkg): out = {} total_size = 0 with zipfile.ZipFile(pkg) as zf: infos = zf.infolist() if len(infos) > MAX_ENTRIES: raise ValueError("Archive contains too many entries") for info in infos: name = info.filename if not name.startswith(ZIP_PREFIX): continue rel = name[len(ZIP_PREFIX):] if not rel or rel.endswith("/"): continue if rel in out: raise ValueError("Duplicate archive path: " + rel) if info.flag_bits & 0x1: raise ValueError("Encrypted entries are not allowed") if info.file_size > M ...[truncated 1154 chars]
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (95)

Credential Access

High
Category
Privilege Escalation
Content
*.log

# Environment variables
.env
.env.local
.env.*.local
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
*.log

# Environment variables
.env
.env.local
.env.*.local
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
*.log

# Environment variables
.env
.env.local
.env.*.local
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
*.log

# Environment variables
.env
.env.local
.env.*.local
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# Environment variables
.env
.env.local
.env.*.local

# Test / coverage
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# Environment variables
.env
.env.local
.env.*.local

# Test / coverage
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# Environment variables
.env
.env.local
.env.*.local

# Test / coverage
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# Environment variables
.env
.env.local
.env.*.local

# Test / coverage
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Concealed Executable Artifact

High
Category
Supply Chain
Confidence
100% confidence
Finding
An executable nested in a document or hidden/disguised artifact can evade ordinary extension-based review while still being available to the skill at runtime.

Concealed Executable Artifact

High
Category
Supply Chain
Confidence
100% confidence
Finding
An executable nested in a document or hidden/disguised artifact can evade ordinary extension-based review while still being available to the skill at runtime.

Concealed Executable Artifact

High
Category
Supply Chain
Confidence
100% confidence
Finding
An executable nested in a document or hidden/disguised artifact can evade ordinary extension-based review while still being available to the skill at runtime.

Concealed Executable Artifact

High
Category
Supply Chain
Confidence
100% confidence
Finding
An executable nested in a document or hidden/disguised artifact can evade ordinary extension-based review while still being available to the skill at runtime.

Concealed Executable Artifact

High
Category
Supply Chain
Confidence
100% confidence
Finding
An executable nested in a document or hidden/disguised artifact can evade ordinary extension-based review while still being available to the skill at runtime.

Concealed Executable Artifact

High
Category
Supply Chain
Confidence
100% confidence
Finding
An executable nested in a document or hidden/disguised artifact can evade ordinary extension-based review while still being available to the skill at runtime.

Vague Triggers

High
Confidence
97% confidence
Finding
The phrase indicating the skill should 'directly trigger after installation' lacks any invocation boundary, confirmation step, or scope constraint. In context, this is more dangerous because the skill is the only specialist 'authorized to search', so ambiguous auto-triggering can initiate external actions and produce side effects without a deliberate user request.

Vague Triggers

High
Confidence
97% confidence
Finding
The phrase indicating the skill should 'directly trigger after installation' lacks any invocation boundary, confirmation step, or scope constraint. In context, this is more dangerous because the skill is the only specialist 'authorized to search', so ambiguous auto-triggering can initiate external actions and produce side effects without a deliberate user request.

Vague Triggers

High
Confidence
96% confidence
Finding
The skill advertises activation on broad natural-language phrases like “帮我把这个问题定义清楚”, “这个问题真实吗”, and even standalone install-time direct triggering, which can cause unintended invocation in ordinary conversation. That creates routing/invocation risk: the agent may enter this skill without clear user intent, consume unrelated context, or write to shared state (Context.problem / Context.decision) when the user did not mean to start this workflow.

Vague Triggers

High
Confidence
98% confidence
Finding
The phrase indicating the skill may trigger 'upon installation alone' creates an unsafe activation path with no user intent verification. In an agent environment, this can cause the skill to run automatically, consume context, modify shared state, or interfere with orchestration without an explicit request, which is a stronger control-flow risk than ordinary broad matching.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The line explicitly requires "Chinese as the primary language for method docs," which is a language policy stated in natural language. Under the policy rules, forcing a specific language without opt-in is a reportable locale/language violation.

Vague Triggers

Medium
Confidence
91% confidence
Finding
This README describes resuming the skill with the single-word prompt “继续” and says the orchestrator will continue from the next missing stage. Because “继续” is common everyday speech, it risks unintended invocation unless the surrounding context requirements are made explicit.

Vague Triggers

Medium
Confidence
93% confidence
Finding
In the usage table, “继续” is presented as sufficient to enter Mid-entry mode. As a standalone phrase, it overlaps heavily with normal conversation and does not define the boundary between ordinary chat continuation and explicit skill re-entry.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The skill advertises many broad natural-language trigger phrases such as generic requests about making money, finding markets, validating ideas, pricing, or getting customers. Because these phrases overlap with ordinary business conversations, the skill can be invoked unintentionally and take over workflows the user did not explicitly mean to route into this capability, creating prompt-scope confusion and increasing the chance of inappropriate tool use or misleading outputs.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The routing table includes vague examples like '帮我找市场', '找赚钱机会', and '有什么需求', which are common user utterances that lack scope constraints. In context, this is more dangerous because the skill is designed as a top-level orchestrator with broad routing authority; vague triggers therefore increase the risk of accidental activation, over-collection of context, and misrouting users into a large multi-stage workflow they did not request.

Natural-Language Policy Violations

Medium
Confidence
86% confidence
Finding
This file presents all user-facing guidance in Chinese and does not indicate that users may choose another language or that the locale limitation is intentional for a region-specific purpose. That can violate language/locale policy where user-facing skills should not force a single language without opt-in.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger examples include very broad, ordinary phrases such as asking for help finding a market or deciding whether an idea is worth doing. In platforms that activate skills by semantic matching, these generic utterances can cause unintended invocation, leading the skill to engage in contexts where the user did not specifically request it and potentially biasing outputs or exposing user context to the skill unnecessarily.

Static analysis

No suspicious patterns detected.