Back to skill

Security audit

Sentiment Analysis

Security checks for vulnerabilities and agentic risk

Overview

This skill should be reviewed because it advertises real stock sentiment analysis but currently returns random simulated financial metrics.

Install only if you understand that the current implementation is a mock-style generator, not reliable stock sentiment analysis. Treat its outputs as test data, use an isolated environment for dependencies, and look for pinned dependencies plus explicit data-source disclosure before using it for real financial decisions.

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:35
Finding
Unpinned Third-Party Dependencies Permit Unsafe Package Resolution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:35-37`; `skill.json:7` **Vulnerability Type**: Unpinned and integrity-unverified third-party dependencies **Risk Level**: Medium ### Vulnerable Code `SKILL.md:35-37`: ```bash pip install akshare pandas numpy jieba snownlp ``` `skill.json:7`: ```json "dependencies": ["akshare", "pandas", "numpy", "jieba", "snownlp"], ``` ### Technical Analysis The project instructs users to install five third-party packages without fixed versions, cryptographic hashes, a lockfile, or an explicitly trusted package index. Consequently, package resolution is mutable: the same installation command can retrieve different artifacts at different times. Python packages can execute build-backend or installation logic during installation, and their code runs when imported or invoked. If a listed package, its publisher account, its distribution process, or the configured package index is compromised, installation may introduce attacker-controlled code without requiring a change to this repository. The manifest also lists packages that are not used by the current implementation, unnecessarily increasing the supply-chain attack surface. The audited script directly imports only `pandas` and `numpy`; the documented packages `akshare`, `jieba`, and `snownlp` are not imported by the present implementation. No evidence was found that any currently listed package is malicious. This finding concerns the unsafe and non-reproducible dependency resolution mechanism. ### Attack Path 1. An attacker compromises a listed package, a maintainer account, a package release pipeline, or a package index used by the installer. 2. The attacker publishes a malicious release under one of the dependency names. 3. A user follows the documented unpinned `pip install` command, or an agent installs dependencies from `skill.json`. 4. The resolver selects the attacker-controlled release because no approved version or artifact hash is enforced. 5. M ...[truncated 833 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove dependencies that the implementation does not require, especially `akshare`, `jieba`, and `snownlp` unless their associated functionality is implemented and reviewed. 2. Pin every direct dependency to a reviewed exact version, such as `package==X.Y.Z`. 3. Generate and commit a lockfile containing resolved transitive dependencies. 4. Enforce cryptographic hashes for downloaded artifacts, for example through a hash-locked requirements file and `pip install --require-hashes`. 5. Install only from an explicitly configured, trusted package index; disable unintended fallback indexes where practical. 6. Review dependency provenance, release history, maintainer changes, known vulnerabilities, and transitive dependencies before updating pins. 7. Perform dependency installation and execution in an isolated, least-privilege environment without unnecessary secrets or filesystem access. 8. Add automated dependency vulnerability and integrity scanning to the release process. 9. Keep `SKILL.md` and `skill.json` synchronized so that both declare the same reviewed and pinned dependency set. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
SQP-3 applies to natural-language policy violations in all file types. The document presents the skill instructions and usage entirely in Chinese, which can amount to forcing a specific language without user opt-in, and no explanation is provided that this is a region-specific or Chinese-only tool.

Intent-Code Divergence

Medium
Confidence
97% confidence
Finding
The module and function claim to perform stock-comment crawling and NLP-based sentiment analysis, but the implementation only generates random values. In a financial-analysis context, this is dangerous because downstream users or agents may treat the output as real market intelligence and make decisions based on fabricated data.

Natural-Language Policy Violations

Medium
Confidence
86% confidence
Finding
The module title, feature description, and function docstring are presented exclusively in Chinese. Per the policy, forcing a specific language without user opt-in or a documented regional justification is a natural-language policy issue.

Missing User Warnings

Low
Confidence
84% confidence
Finding
The skill describes analyzing stock-related social media sentiment but does not disclose that doing so may require collecting or transmitting data from external platforms. This creates a transparency and privacy risk because users may unknowingly process third-party content or platform data without understanding the data-handling implications.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
The description is entirely in Chinese ("情绪分析 - 股吧/雪球评论情感分析") with no indication that the skill supports other languages or that the Chinese-only scope is intentional and region-specific. Under the policy, language constraints should either offer user opt-in/choice or be clearly justified.

Static analysis

No suspicious patterns detected.