Back to skill

Security audit

虾皮市场宽度热力图

Security checks for vulnerabilities and agentic risk

Overview

The skill appears purpose-built for A-share heatmap analysis, but it tells the agent to inspect a stored API token in a way that could expose the credential.

Review before installing. Do not run commands that print your API token in shared terminals or logs; prefer a status-only auth check or run the intended data command and handle auth errors. Treat generated sector views as market commentary, not personalized investment advice.

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

API Token Exposure Through Configuration Inspection

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 27-31; duplicated in references/cli-commands.md, lines 43-47
Vulnerability Type: Credential exposure through command output
Risk Level: Medium

Vulnerable Code

In SKILL.md, lines 27-31:

markdown
**Step 0.1: Check Token Configuration Status**

```bash
daxiapi config get token
text

The same behavior is documented in `references/cli-commands.md`, lines 43-47:

```markdown
### View Token Configuration

```bash
daxiapi config get token
text

### Technical Analysis

The Skill directs the Agent to run a command that retrieves the configured API token when the workflow only needs to determine whether authentication is available. If the CLI prints the token value, the secret enters Agent-visible command output and may subsequently be retained in terminal logs, execution traces, model context, or conversation history.

This violates least-exposure principles for credentials. Authentication status should be checked without reading or displaying the underlying secret. Although the reviewed files contain no evidence that the token is transmitted to an unauthorized party, exposing it through command output creates a reusable credential-disclosure path.

### Attack Path

1. A user invokes the sector heatmap analysis Skill.
2. The Agent follows Step 0.1 and executes `daxiapi config get token`.
3. If the CLI returns the configured token without redaction, its value appears in Agent-visible output.
4. The output may be retained in command logs, traces, conversation records, or model context.
5. An attacker or unauthorized operator with access to those records extracts the token.
6. The attacker reuses it against services available through the `daxiapi` credential.

Exploitation therefore requires both an unredacted CLI response and access to the resulting output or retained records.

### Impact Assessment

A successfully exposed 
...[truncated 518 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace token retrieval with a status-only command that never returns the secret, such as:

    bash
    daxiapi config has token
    
  2. If no status-only command exists, verify authentication by running the required API operation directly:

    bash
    daxiapi sector heatmap
    

    Handle authentication failures by status or error code without printing the stored token.

  3. Modify the CLI so config get token returns only a presence indicator or a masked value, such as ****abcd.

  4. Prevent secrets from being included in Agent prompts, command transcripts, telemetry, diagnostic output, and persistent conversation records.

  5. Update both SKILL.md and references/cli-commands.md so they do not instruct users or Agents to display credentials.

  6. Rotate any token that may previously have appeared in execution logs or conversation history, and restrict replacement tokens to the minimum required API permissions and usage limits.

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

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest description and the entire skill content are written as mandatory Chinese-language instructions for analysis and reporting, with no indication that the user may choose another language. Under the policy, forcing a specific language or locale without opt-in is a natural-language policy violation unless the restriction is explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file documents commands to set and retrieve an authentication token, but it does not include any warning about handling the token as sensitive data. Showing config get token and config set token YOUR_TOKEN without disclosure may lead users to expose credentials in shell history, shared terminals, or logs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file includes explicit investment-style action guidance such as '可考虑入场', '不追高', and '建议离场或观望' without any accompanying disclaimer that the content is informational only and not financial advice. In a skill specifically designed to analyze A-share sector heatmaps and identify leading or rotating sectors, these statements can directly influence user trading decisions and increase regulatory, trust, and user-harm risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

All user-facing content in the file is presented exclusively in Chinese, with no indication that language selection is optional or constrained by a documented regional requirement. Under the policy, a fixed language without user opt-in can be a locale-policy issue.

Content

No source excerpt is available for this finding.