Back to skill

Security audit

A Stock Analysis 1.0.0

Security checks for vulnerabilities and agentic risk

Overview

This A-share stock analysis skill is coherent and disclosed, with local portfolio storage and Sina market-data requests that fit its stated purpose.

Before installing, be comfortable with storing portfolio holdings locally in a JSON file and with stock symbols being sent to Sina for quote analysis. On shared machines, restrict permissions on ~/.clawdbot/skills/a-stock-analysis/portfolio.json and consider backing it up before using update or remove commands.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/portfolio.py:24
Finding

Portfolio Data Is Written Without Explicitly Restrictive File Permissions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/portfolio.py:149
Finding

Unvalidated Portfolio Values Cause Division-by-Zero Denial of Service

Content
View full analysis
Remediation
View remediation
None: if not math.isfinite(cost) or cost <= 0: raise ValueError("Cost must be a finite number greater than zero") if quantity <= 0: raise ValueError("Quantity must be a positive integer") ``` Validation should occur before saving command-line values and again after loading persisted JSON because the file can be modified independently of the command-line interface. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (5)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly documents commands to add, update, and remove holdings and later reveals that data is stored in ~/.clawdbot/skills/a-stock-analysis/portfolio.json, but it does not clearly warn users up front that invoking these commands will modify persistent local state. In an agent setting, hidden filesystem writes are security-relevant because they can surprise users, alter financial records, or overwrite expected data without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The analyze command iterates over the user's holdings and calls an external stock-analysis function for each stock code, which likely discloses portfolio constituents to a third-party data source or service. Even if only stock codes are transmitted, holdings data is sensitive financial information, and the script provides no explicit notice, consent prompt, or offline mode before sending it.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

文件中的名称说明、使用说明、输出示例和分析结论均默认以中文呈现,未说明这是可选语言,也未提供用户可选择其他语言或地区设置的方式。根据规则,强制特定语言而无用户选择属于自然语言层面的政策问题。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code file contains natural-language descriptions, usage text, and help-facing documentation entirely in Chinese. Under the language/locale policy category, forcing a specific language without user opt-in or an explicit justification can be a policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

User-facing descriptions, help text, and printed output in this file are entirely in Chinese, and there is no indication that users can select another language or that the language restriction is an intentional, documented locale constraint. That creates a natural-language policy issue under the language/locale rule.

Content

No source excerpt is available for this finding.