Back to skill

Security audit

Sar Calculator

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed A-share SAR indicator calculator with expected market-data access and no evidence of hidden, persistent, or destructive behavior.

Install it in a dedicated virtual environment, consider pinning dependency versions, and treat the generated bullish or bearish scores as informational technical analysis rather than financial advice.

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.md:33
Finding

Unpinned Third-Party Dependencies

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 33-37
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Vulnerable code:

bash
## Installation command documented by the project
pip install baostock pandas

Technical Analysis

The documented installation command retrieves and installs the latest available versions of baostock and pandas without version constraints, cryptographic hashes, or a lock file. Consequently, the installed code may differ between executions, and dependency integrity is not reproducibly verified.

Python package installation can execute package-controlled build or installation logic. If a named package or one of its transitive dependencies is compromised in the package repository, a user following these instructions could execute attacker-controlled code with the privileges of the account running pip.

The application also imports numpy in sar_calculator.py, but the installation instructions do not declare it directly. Relying on it to arrive transitively further weakens dependency reproducibility and may cause incompatible or unexpected versions to be used.

Attack Path

  1. An attacker compromises a future release of baostock, pandas, or a transitive dependency available through the configured Python package index.
  2. The attacker adds malicious installation or runtime code to that release.
  3. A user follows the documented pip install baostock pandas instruction.
  4. Because no versions or hashes are pinned, pip resolves and downloads the affected release.
  5. Attacker-controlled code executes during installation or when the application imports and uses the compromised package.

Impact Assessment

Malicious dependency code would generally execute with the privileges of the user running pip or the SAR calculator. This could permit access to that user's files, environment variables, credentials, and network resources, as w ...[truncated 350 chars]

Remediation
View remediation

Remediation Suggestions

  1. Create a reviewed dependency file that pins exact versions of all direct dependencies, including baostock, pandas, and numpy.
  2. Generate a lock file containing all transitive dependencies so resolution is reproducible.
  3. Record cryptographic hashes for approved distributions and install with:
    bash
    python -m pip install --require-hashes -r requirements.txt
    
  4. Obtain packages only from a trusted, explicitly configured package index.
  5. Review and update pinned dependencies through a controlled process that includes vulnerability and provenance checks.
  6. Recommend installation inside a dedicated virtual environment and explicitly warn users not to run pip with root or administrator privileges.
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 (2)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The entire skill description and user-facing guidance are written only in Chinese, and the title and content indicate A-share analysis without any opt-in or language-selection option. Under the policy, forcing a specific language or locale without user choice can be a natural-language policy violation unless the constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This Python file contains its top-level description entirely in Chinese, and the same pattern continues throughout user-facing CLI help and output strings. Under the policy for natural-language violations, forcing a specific language without user opt-in is a reportable issue unless the locale constraint is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.