Back to skill

Security audit

Capital Flow Analysis

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a straightforward China-market stock capital-flow analysis helper with ordinary dependency and localization caveats.

Install this only in an environment where fetching third-party financial data through akshare is acceptable. Consider pinning dependency versions before production use, and verify the Chinese documentation and returned financial signals are appropriate for your workflow.

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
skill.json:7
Finding

Unpinned Third-Party Dependencies

Content
View full analysis

Vulnerability Details

File Location: skill.json, line 7
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

json
"dependencies": ["akshare", "pandas"],

Technical Analysis

The Skill declares akshare and pandas without exact version constraints or integrity hashes. Consequently, installations performed at different times may resolve to unreviewed releases with changed or compromised code.

Both packages are imported directly by capital_flow.py. Python executes package initialization code during import, meaning a compromised dependency release could run code in the Skill process before the intended analysis functions execute. The project also lacks a lockfile or other recorded integrity mechanism that would ensure reproducible, reviewed dependency resolution.

Attack Path

  1. An attacker compromises a future release of one of the declared packages or its package-distribution channel.
  2. The Skill is installed or rebuilt while its dependencies remain unconstrained.
  3. The package manager resolves and installs the attacker-controlled release.
  4. capital_flow.py imports the affected package.
  5. Malicious package initialization code executes with the permissions and environment access of the Agent process.

This path depends on compromise of a dependency or its distribution channel; the audited project does not itself contain an embedded malicious payload.

Impact Assessment

A compromised dependency could execute arbitrary Python code under the Agent process identity. Depending on the hosting environment, this could permit access to files, environment variables, network resources, or credentials available to that process. It could also manipulate returned financial-analysis results or disrupt Skill availability.

The maximum scope is limited by the operating-system permissions, network access, secrets, and sandbox boundaries granted to the Agent process.

Remediation
View remediation

Remediation Suggestions

  1. Pin each direct dependency to a reviewed exact version rather than accepting arbitrary future releases.
  2. Generate and commit a lockfile containing resolved transitive dependency versions.
  3. Require cryptographic hashes during installation, such as with a hash-locked requirements file.
  4. Install packages only from an approved package index over authenticated TLS; disable untrusted extra indexes.
  5. Scan direct and transitive dependencies for known vulnerabilities and review changes before upgrades.
  6. Remove the unused direct pandas import and dependency if it is not otherwise required, reducing the exposed supply-chain surface.
  7. Run the Skill with least privilege and restrict filesystem, credential, and network access to limit the impact of any dependency compromise.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill documentation is entirely in Chinese and does not indicate any user language selection, fallback, or consent mechanism. In a multilingual agent ecosystem, this can cause users or reviewers to misunderstand the skill’s purpose, data sources, or limitations, increasing the risk of misuse, misconfiguration, or failure to detect harmful behavior hidden in non-default-language content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module title, feature list, and function docstrings are written entirely in Chinese, indicating a fixed language/locale expectation with no user opt-in or alternative. Under the policy, locale 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
88% confidence
Finding

The description field is entirely in Chinese ("资金流向分析 - 主力/北向/龙虎榜") and provides no indication that users can opt into another language or that the skill is intentionally limited to a Chinese-speaking or region-specific audience. This creates a natural-language policy issue because the manifest appears to impose a specific language without explicit user choice or justification.

Content

No source excerpt is available for this finding.