Back to skill

Security audit

A Stock Analysis Litiao

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent A-share stock analysis and local portfolio tracker, with some privacy and deletion caveats users should understand.

Before using portfolio commands, understand that your stock codes, costs, quantities, and timestamps will be saved locally at ~/.clawdbot/skills/a-stock-analysis/portfolio.json. Use remove carefully because it updates that saved file immediately, and consider tightening file permissions if you share the machine with other local users.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/portfolio.py:45
Finding

Portfolio Data Stored Without Explicit Owner-Only Permissions

Content
View full analysis
Remediation
View remediation
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 (4)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly documents state-changing portfolio commands (add, update, remove) but does not warn users that these operations persistently modify local data in ~/.clawdbot/skills/a-stock-analysis/portfolio.json. In an agent context, missing disclosure and confirmation around local file modification can lead to unintended data changes or loss, especially if the commands are invoked automatically or on behalf of a user.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This Python file contains natural-language descriptions, CLI help text context, and output strings entirely in Chinese, beginning with the module docstring and continuing throughout the script. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script persists detailed portfolio holdings, including stock codes, quantities, costs, and timestamps, to a predictable file under the user's home directory without any notice, consent flow, or protection controls. In the context of a finance-related skill, this creates a privacy and confidentiality risk because sensitive investment data may be left on disk longer than the user expects and could be exposed to other local users, backups, or compromise of the host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The remove command deletes a holding from the persisted portfolio file immediately once invoked. While the function prints a message after deletion, it does not warn or confirm the destructive action beforehand, so users are not given a chance to prevent accidental data loss.

Content

No source excerpt is available for this finding.