Back to skill

Security audit

Stock Data Monorepo

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its stock-data purpose, but it needs Review because some helper paths can run mutable external tools and spawn under-scoped agents from user-controlled input.

Install only if you are comfortable with a stock-data skill that browses public financial sites, writes local report files, and invokes OpenClaw helpers. Prefer pinning package versions, removing the npx runtime fallback, running with a minimal environment that excludes secrets, validating stock codes before subagent calls, and avoiding the documented destructive cleanup/reset commands unless you have checked the target directory and repository state.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T01 · Skill Instruction Hijacking

Warning
Location
stock-theme-events/scripts/get_stock_themes.py:31
Finding

Unvalidated User Input Is Embedded in an AI Subagent Task

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
cn-stock-volume/scripts/browser_fetch.py:42
Finding

Unpinned Third-Party Package Execution Through an npx Fallback

Content
View full analysis
Remediation
View remediation
', ...] ``` 3. Use npm lockfiles and integrity metadata, and install from a trusted registry before runtime rather than downloading executable code during a stock-data query. 4. Verify the expected executable path and version before invocation. Fail closed if the binary is missing or does not match the approved version. 5. Avoid forwarding the complete parent environment to third-party commands. Construct a minimal environment containing only required variables such as a controlled `PATH`, locale, and temporary directory. 6. Pin direct and transitive Python dependencies in a lock file with cryptographic hashes. 7. Install Python dependencies in an isolated virtual environment using hash verification, such as `pip install --require-hashes`. 8. Add automated dependency vulnerability and provenance checks to the release process. 9. Document the approved npm and Python package sources and prohibit untrusted registry overrides during installation and execution. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (85)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Undeclared browser automation against external sites plus reading local cached data to construct additional outputs is security-relevant because it expands both data ingress and local data exposure beyond the stated skill purpose. In a skill intended as a reusable dependency, hidden enrichment from local caches or unofficial scraping can lead to unexpected data disclosure, brittle trust boundaries, and unsafe downstream assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Undeclared browser automation against external sites plus reading local cached data to construct additional outputs is security-relevant because it expands both data ingress and local data exposure beyond the stated skill purpose. In a skill intended as a reusable dependency, hidden enrichment from local caches or unofficial scraping can lead to unexpected data disclosure, brittle trust boundaries, and unsafe downstream assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Undeclared browser automation against external sites plus reading local cached data to construct additional outputs is security-relevant because it expands both data ingress and local data exposure beyond the stated skill purpose. In a skill intended as a reusable dependency, hidden enrichment from local caches or unofficial scraping can lead to unexpected data disclosure, brittle trust boundaries, and unsafe downstream assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

Undeclared browser automation against external sites plus reading local cached data to construct additional outputs is security-relevant because it expands both data ingress and local data exposure beyond the stated skill purpose. In a skill intended as a reusable dependency, hidden enrichment from local caches or unofficial scraping can lead to unexpected data disclosure, brittle trust boundaries, and unsafe downstream assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Undeclared browser automation against external sites plus reading local cached data to construct additional outputs is security-relevant because it expands both data ingress and local data exposure beyond the stated skill purpose. In a skill intended as a reusable dependency, hidden enrichment from local caches or unofficial scraping can lead to unexpected data disclosure, brittle trust boundaries, and unsafe downstream assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Undeclared browser automation against external sites plus reading local cached data to construct additional outputs is security-relevant because it expands both data ingress and local data exposure beyond the stated skill purpose. In a skill intended as a reusable dependency, hidden enrichment from local caches or unofficial scraping can lead to unexpected data disclosure, brittle trust boundaries, and unsafe downstream assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Undeclared browser automation against external sites plus reading local cached data to construct additional outputs is security-relevant because it expands both data ingress and local data exposure beyond the stated skill purpose. In a skill intended as a reusable dependency, hidden enrichment from local caches or unofficial scraping can lead to unexpected data disclosure, brittle trust boundaries, and unsafe downstream assumptions.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

rm -rf cache/* is a high-risk destructive command because it deletes all contents under the current cache directory without confirmation. In documentation for an agent skill, users or automation may execute it verbatim; if run from the wrong directory or after path confusion, it can cause unintended data loss beyond the intended cache cleanup.

Content

Scanner excerpt · cn-stock-volume/EXAMPLES.md (reported line 195)May include surrounding context.

bash
# 清理所有缓存
rm -rf cache/*

# 清理特定日期的缓存
rm cache/2026-03-22.json

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
87% confidence
Finding

rm cache/2026-03-22.json is less dangerous than the recursive variant but still performs irreversible deletion and assumes the operator is in the correct directory. In an agent or copy-paste workflow, that assumption may fail, causing unintended file removal if a similarly named file exists elsewhere.

Content

Scanner excerpt · cn-stock-volume/EXAMPLES.md (reported line 198)May include surrounding context.

rm -rf cache/*

清理特定日期的缓存

rm cache/2026-03-22.json

text

---

Direct flow: os.environ.get (credential/environment) → subprocess.run (code execution)

High
Category
Data Flow
Confidence
86% confidence
Finding

The code forwards the full parent process environment into an external executable, which can expose secrets such as API keys, tokens, and proxy credentials to that child process and any of its dependencies. In a skill context that invokes third-party tooling, this increases the blast radius if the CLI, Node runtime, or any package in that chain is compromised or overly verbose in logging.

Content

Scanner excerpt · cn-stock-volume/scripts/browser_fetch.py (reported line 51)May include surrounding context.

python
for cmd in commands_to_try:
            try:
                result = subprocess.run(
                    cmd,
                    capture_output=True,
                    text=True,

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
95% confidence
Finding

This line explicitly clones the entire process environment and passes it to an external command, creating a clear secret-exposure path to subprocesses. Because the skill is a data-fetching utility that depends on external browser tooling, inherited credentials are not necessary for its core function and therefore represent unnecessary risk.

Content

Scanner excerpt · cn-stock-volume/scripts/browser_fetch.py (reported line 56)May include surrounding context.

python
capture_output=True,
                    text=True,
                    timeout=timeout_ms // 1000,
                    env={**os.environ, 'PATH': '/usr/local/bin:/usr/bin:/bin:' + os.environ.get('PATH', '')}
                )
                
                if result.returncode == 0:

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
93% confidence
Finding

Within the cn-stock-volume skill, this file's module description and code operate on three market indices (上证指数、深证成指、创业板指) rather than stock成交量 data. The final output also includes sentiment and volume sections with placeholder values, indicating behavior that does not match the subskill's stated volume-focused purpose.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
91% confidence
Finding

This is a concrete example of tool parameter abuse: git reset --hard is a destructive command and the skill content presents it as a routine step. In the context of an agent skill or operational documentation, such commands are risky because users or downstream automation may execute them verbatim, causing loss of local work or unintended repository state changes.

Content

Scanner excerpt · stock-theme-events/SYNC_REPORT.md (reported line 64)May include surrounding context.

bash
git checkout -b temp-branch
git reset --hard origin/main
# HEAD 现在是 92b6742 fix: 整理 cn-stock-volume 目录结构

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The install command uses npx clawhub@latest, which fetches and executes the most recent published package at runtime rather than a reviewed, fixed version. If the upstream package is compromised, typo-squatted, or a breaking release is published, users following the documentation could execute untrusted code on their machine.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

This command again relies on npx clawhub@latest, causing users to execute whatever version is current at install time. That creates a supply-chain risk window where a compromised or unexpected release could run arbitrary code during installation.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

Using npx with an unpinned @latest package delegates trust to the current state of the npm registry instead of the audited state at publish time. In a skill-installation context, this is especially risky because users are explicitly encouraged to copy-paste and execute the command.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The final install example repeats the same mutable dependency execution pattern. Because this is distribution documentation for install commands, the issue is operationally significant: end users may directly run these commands without additional validation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README is written entirely in Chinese, including usage instructions, cautions, and examples, with no indication that the skill is China-region-specific or that another language is available. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill declares required binaries/tools and explicitly instructs users to run Python scripts and use a browser, but it does not define any tool scope, permissions, or allowed-tools boundaries. In a skill framework, this increases the risk of over-broad execution because consumers cannot tell what network, shell, filesystem, or environment access is intended or should be restricted.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file presents all instructions, examples, and usage guidance only in Chinese, which can amount to forcing a specific language without user opt-in. The policy allows locale constraints when they are explicitly documented and justified, but this file does not state that the skill is China-specific or that Chinese output/instructions are required.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation includes destructive cache-deletion commands that remove files without any adjacent warning about irreversible data loss or scope validation. In an agent skill context, example commands are often copied verbatim, so normalizing rm -rf use increases the chance of accidental deletion if the working directory is wrong or paths are modified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file includes a command to clear previously supplemented data, which is a destructive operation affecting stored user data. The surrounding documentation does not provide any warning, confirmation note, or caution about deletion behavior, so users may invoke it without realizing it removes existing data.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · cn-stock-volume/scripts/browser_fetch.py (reported line 51)May include surrounding context.

python
for cmd in commands_to_try:
            try:
                result = subprocess.run(
                    cmd,
                    capture_output=True,
                    text=True,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · cn-stock-volume/scripts/browser_fetch.py (reported line 93)May include surrounding context.

python
if target_id:
            cmd.extend(['--target-id', target_id])
        
        result = subprocess.run(
            cmd,
            capture_output=True,
            text=True,

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module docstring explicitly says cache logic has been removed and each run will fetch the latest data. However, fetch_index_data later checks a local cache file and returns cached index data when present, which directly contradicts that documented intent.

Content

No source excerpt is available for this finding.