Back to skill

Security audit

Stock Pe Pb Analyzer

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent stock valuation analyzer that uses public BaoStock data, with minor installation and file-export hygiene issues but no evidence of deception or harmful behavior.

Install in an isolated Python environment, pin or review dependencies before running pip install, and use the tool for public A-share valuation lookups only. If using the Python module export function, provide a safe local output filename and do not pass filenames from untrusted input.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
README.md:27
Finding

Unpinned Third-Party Dependencies Allow Supply-Chain Substitution

Content
View full analysis
Remediation
View remediation
pandas== numpy== ``` 2. Generate a lockfile that also fixes all transitive dependency versions. 3. Record and enforce cryptographic hashes for every permitted artifact: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Use an explicitly configured, trusted package index or an internally controlled package mirror. 5. Review dependency provenance, release history, and known vulnerabilities before updating the lockfile. 6. Automate dependency scanning and controlled update review in CI. 7. Install into an isolated virtual environment as an unprivileged user; do not use administrator-level pip installation. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (9)

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 · README.md (reported line 140)May include surrounding context.

或将此仓库克隆到 OpenClaw 的 skills 目录:

bash
mkdir -p ~/.config/agents/skills/
cd ~/.config/agents/skills/
git clone https://github.com/caoyachao/stock-pe-pb-analyzer-skill.git stock-pe-pb-analyzer

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The invocation phrase "分析贵州茅台估值水位" is broad and does not document what actions the agent may take, what data sources it will contact, or any limits on scope. In an agent setting, underspecified trigger phrases can cause over-broad execution, unexpected network access, or misuse in contexts beyond the intended single-stock valuation lookup.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file’s natural-language instructions and usage guidance are exclusively in Chinese, which effectively forces a specific language for users. Under the policy rule, locale or language constraints should either be optional for the user or clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This Python file contains natural-language descriptions, prompts, usage text, and output messages exclusively in Chinese. Under the language/locale policy, forcing a specific language without user opt-in is a policy concern unless the constraint is explicitly documented as region-specific or optional.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

A skill presented as read-only analysis includes functionality to write output files to the local filesystem. Even though the method is not invoked in main(), exposing unnecessary write capability expands the attack surface and could be abused by a calling agent or future code path to create files in unintended locations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The filename parameter is accepted and passed directly to pandas/open for writing, with no path restriction or sanitization. If an external caller can influence this argument, the skill could overwrite or create arbitrary files accessible to the process, which is unjustified for a PE/PB analysis tool.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The skill documentation and example invocation are presented only in Chinese, which effectively imposes a language preference without stating that the skill is China/Chinese-language specific or offering an alternative language. Under the policy, forcing a specific language without opt-in can be a natural-language policy concern.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest and module documentation consistently describe the tool as a PE/PB historical percentile analyzer, but the BaoStock query explicitly fetches additional valuation fields psTTM and pcfNcfTTM. Although those extra fields are not surfaced in the final report, the actual code behavior collects more financial data than the stated scope.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.