Back to skill

Security audit

itick-stock-quote

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent stock-market quote helper, but its documentation exposes a credential-like API token in example commands despite saying tokens should be managed through the environment.

Review before installing. The skill's intended API use is understandable, but the published documentation includes a token-looking secret. The publisher should revoke or rotate that token if it was ever valid and replace the examples with $ITICK_API_TOKEN. Users should rely only on ClawHub-managed environment secrets and should not copy literal token examples into chats, terminals, repositories, or logs.

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:382
Finding

Hard-Coded API Token Exposed in Documentation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 382–389
Vulnerability Type: Hard-coded secret / plaintext credential exposure
Risk Level: Medium

Vulnerable Code

bash
# Query the real-time quote for the Hong Kong stock Southern Double Long Hang Seng TECH
curl -X GET "https://api.itick.org/stock/quote?region=HK&code=7226" \
  -H "accept: application/json" \
  -H "token: d267a8c7d18a4ba4b19c81225a2ffd3eae0e9ca3bd1a4bd9b969dfee99ee7acd"

# Query the real-time quote for Kweichow Moutai on the Shanghai Stock Exchange
curl -X GET "https://api.itick.org/stock/quote?region=SH&code=600519" \
  -H "accept: application/json" \
  -H "token: d267a8c7d18a4ba4b19c81225a2ffd3eae0e9ca3bd1a4bd9b969dfee99ee7acd"

Technical Analysis

SKILL.md embeds the same API token directly in two example commands. This exposes the credential to every person or system that can access the skill package, published artifact, cached copy, or repository history.

The exposure contradicts the secure mechanism documented elsewhere in the same file, where authentication is performed using the ITICK_API_TOKEN environment variable. Secrets must not be placed in source files or documentation because access to those resources is commonly broader and less controlled than access to a secret manager.

No proof that the token remains active was established during this static audit. Nevertheless, the value has the structure and placement of a real authentication credential and must be treated as compromised.

Attack Path

  1. An attacker obtains or views the published skill package.
  2. The attacker reads SKILL.md and extracts the token from line 384 or line 389.
  3. The attacker places the token in the token header of requests to https://api.itick.org.
  4. If the token remains active, the API attributes those requests to the token owner.
  5. The attacker consumes the associated quota or other API entitlements ...[truncated 736 chars]
Remediation
View remediation

Remediation Suggestions

  1. Revoke the exposed token immediately and issue a replacement. Do not assume that deleting the visible value is sufficient.

  2. Replace both literal token headers with environment-variable references:

    bash
    curl -X GET "https://api.itick.org/stock/quote?region=HK&code=7226" \
      -H "accept: application/json" \
      -H "token: $ITICK_API_TOKEN"
    
    curl -X GET "https://api.itick.org/stock/quote?region=SH&code=600519" \
      -H "accept: application/json" \
      -H "token: $ITICK_API_TOKEN"
    
  3. Remove the exposed value from repository history, release archives, package registries, caches, and other published artifacts where feasible.

  4. Review API access logs for unexpected use of the compromised token and investigate anomalous source addresses, request volumes, and endpoints.

  5. Store the replacement token only through the declared secret-management mechanism and prevent it from appearing in documentation, logs, examples, or error messages.

  6. Apply least-privilege scopes, expiration, quota limits, and billing alerts to replacement credentials when supported by the provider.

  7. Add automated secret scanning to pre-commit, CI, and package-publication workflows. Configure the pipeline to reject high-entropy credentials and known iTick token patterns.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (17)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
100% confidence
Finding

The example commands expose a credential-like token directly in the markdown, creating a realistic risk of secret disclosure and copy-paste propagation into terminals, shell history, screenshots, repositories, and support transcripts. Even if the token is a sample, the documentation provides no warning that it is nonfunctional, which trains insecure behavior and may expose a real credential.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The document explicitly tells users not to manually provide the API token, but later includes hard-coded token values in example requests. This inconsistency can cause accidental credential reuse, token leakage into logs or chats, and normalizes unsafe secret-handling practices for anyone copying the examples.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 21)May include surrounding context.

1. 股票信息

bash
curl -X GET "https://api.itick.org/stock/info?type=stock&region=<region>&code=<code>" \
  -H "accept: application/json" \
  -H "token: $ITICK_API_TOKEN"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 53)May include surrounding context.

1. 股票信息

bash
curl -X GET "https://api.itick.org/stock/info?type=stock&region=<region>&code=<code>" \
  -H "accept: application/json" \
  -H "token: $ITICK_API_TOKEN"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 103)May include surrounding context.

1. 股票信息

bash
curl -X GET "https://api.itick.org/stock/info?type=stock&region=<region>&code=<code>" \
  -H "accept: application/json" \
  -H "token: $ITICK_API_TOKEN"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 143)May include surrounding context.

1. 股票信息

bash
curl -X GET "https://api.itick.org/stock/info?type=stock&region=<region>&code=<code>" \
  -H "accept: application/json" \
  -H "token: $ITICK_API_TOKEN"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 167)May include surrounding context.

1. 股票信息

bash
curl -X GET "https://api.itick.org/stock/info?type=stock&region=<region>&code=<code>" \
  -H "accept: application/json" \
  -H "token: $ITICK_API_TOKEN"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 198)May include surrounding context.

1. 股票信息

bash
curl -X GET "https://api.itick.org/stock/info?type=stock&region=<region>&code=<code>" \
  -H "accept: application/json" \
  -H "token: $ITICK_API_TOKEN"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 342)May include surrounding context.

1. 股票信息

bash
curl -X GET "https://api.itick.org/stock/info?type=stock&region=<region>&code=<code>" \
  -H "accept: application/json" \
  -H "token: $ITICK_API_TOKEN"

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · SKILL.md (reported line 369)May include surrounding context.

md
### 查询参数说明

| 参数     | 说明                                                                                                                             |
| ------ | ------------------------------------------------------------------------------------------------------------------------------ |
| region | 市场代码,支持HK(港股)、SH(上证)、SZ(深证)、US(美股)、SG(新加坡)、JP(日本)、TW(中国台湾)、IN(印度)、TH(泰国)、DE(德国、MX(墨西哥)、MY(马来西亚)、TR(土耳其)、ES(西班牙)、NL(荷兰)、GB(英国)等 |
| type   | 类型(upcoming 即将上市、recent 近期上市的股票)                                                                                               |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · SKILL.md (reported line 372)May include surrounding context.

md
| 参数     | 说明                                                                                                                             |
| ------ | ------------------------------------------------------------------------------------------------------------------------------ |
| region | 市场代码,支持HK(港股)、SH(上证)、SZ(深证)、US(美股)、SG(新加坡)、JP(日本)、TW(中国台湾)、IN(印度)、TH(泰国)、DE(德国、MX(墨西哥)、MY(马来西亚)、TR(土耳其)、ES(西班牙)、NL(荷兰)、GB(英国)等 |
| type   | 类型(upcoming 即将上市、recent 近期上市的股票)                                                                                               |
| code   | 产品代码                                                                                                                           |
| ktype  | 周期 1分钟、2五分钟、3十五分钟、4三十分钟、5一小时、8一天、9一周、10一月                                                                                      |
| et     | 查询截止时间戳 如(1751328000000)为空时默认为当前时间戳                                                                                            |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · SKILL.md (reported line 373)May include surrounding context.

md
| ------ | ------------------------------------------------------------------------------------------------------------------------------ |
| region | 市场代码,支持HK(港股)、SH(上证)、SZ(深证)、US(美股)、SG(新加坡)、JP(日本)、TW(中国台湾)、IN(印度)、TH(泰国)、DE(德国、MX(墨西哥)、MY(马来西亚)、TR(土耳其)、ES(西班牙)、NL(荷兰)、GB(英国)等 |
| type   | 类型(upcoming 即将上市、recent 近期上市的股票)                                                                                               |
| code   | 产品代码                                                                                                                           |
| ktype  | 周期 1分钟、2五分钟、3十五分钟、4三十分钟、5一小时、8一天、9一周、10一月                                                                                      |
| et     | 查询截止时间戳 如(1751328000000)为空时默认为当前时间戳                                                                                            |
| limit  | 查询条数                                                                                                                           |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · SKILL.md (reported line 376)May include surrounding context.

md
| ------ | ------------------------------------------------------------------------------------------------------------------------------ |
| region | 市场代码,支持HK(港股)、SH(上证)、SZ(深证)、US(美股)、SG(新加坡)、JP(日本)、TW(中国台湾)、IN(印度)、TH(泰国)、DE(德国、MX(墨西哥)、MY(马来西亚)、TR(土耳其)、ES(西班牙)、NL(荷兰)、GB(英国)等 |
| type   | 类型(upcoming 即将上市、recent 近期上市的股票)                                                                                               |
| code   | 产品代码                                                                                                                           |
| ktype  | 周期 1分钟、2五分钟、3十五分钟、4三十分钟、5一小时、8一天、9一周、10一月                                                                                      |
| et     | 查询截止时间戳 如(1751328000000)为空时默认为当前时间戳                                                                                            |
| limit  | 查询条数                                                                                                                           |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · SKILL.md (reported line 374)May include surrounding context.

md
| region | 市场代码,支持HK(港股)、SH(上证)、SZ(深证)、US(美股)、SG(新加坡)、JP(日本)、TW(中国台湾)、IN(印度)、TH(泰国)、DE(德国、MX(墨西哥)、MY(马来西亚)、TR(土耳其)、ES(西班牙)、NL(荷兰)、GB(英国)等 |
| type   | 类型(upcoming 即将上市、recent 近期上市的股票)                                                                                               |
| code   | 产品代码                                                                                                                           |
| ktype  | 周期 1分钟、2五分钟、3十五分钟、4三十分钟、5一小时、8一天、9一周、10一月                                                                                      |
| et     | 查询截止时间戳 如(1751328000000)为空时默认为当前时间戳                                                                                            |
| limit  | 查询条数                                                                                                                           |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · SKILL.md (reported line 375)May include surrounding context.

md
| type   | 类型(upcoming 即将上市、recent 近期上市的股票)                                                                                               |
| code   | 产品代码                                                                                                                           |
| ktype  | 周期 1分钟、2五分钟、3十五分钟、4三十分钟、5一小时、8一天、9一周、10一月                                                                                      |
| et     | 查询截止时间戳 如(1751328000000)为空时默认为当前时间戳                                                                                            |
| limit  | 查询条数                                                                                                                           |

## 示例

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

Although external transmission alone is usually expected here, this specific example sends a hard-coded token to the remote service, turning the request into a credential exposure scenario. Anyone copying the sample may disclose a real secret to shells, logs, version control, or third parties while transmitting authenticated requests.

Content

Scanner excerpt · SKILL.md (reported line 382)May include surrounding context.

bash
# 查询港股南方两倍做多恒生科技实时报价
curl -X GET "https://api.itick.org/stock/quote?region=HK&code=7226" \
  -H "accept: application/json" \
  -H "token: d267a8c7d18a4ba4b19c81225a2ffd3eae0e9ca3bd1a4bd9b969dfee99ee7acd"

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

This example repeats an authenticated external request using a hard-coded token, compounding the credential leakage risk and encouraging insecure copy-paste behavior. Because the skill already states tokens are auto-injected, including a literal secret is especially dangerous and contradictory.

Content

Scanner excerpt · SKILL.md (reported line 387)May include surrounding context.

-H "token: d267a8c7d18a4ba4b19c81225a2ffd3eae0e9ca3bd1a4bd9b969dfee99ee7acd"

查询沪A贵州茅台实时报价

curl -X GET "https://api.itick.org/stock/quote?region=SH&code=600519"
-H "accept: application/json"
-H "token: d267a8c7d18a4ba4b19c81225a2ffd3eae0e9ca3bd1a4bd9b969dfee99ee7acd"

text

Static analysis

No suspicious patterns detected.