Back to skill

Security audit

Apicheck

Security checks for vulnerabilities and agentic risk

Overview

The API helper is mostly low-risk, but the package includes an under-disclosed, purpose-mismatched workflow script that writes persistent local history.

Review this before installing because the visible API assistant behavior is mostly documentation-oriented, but the package also contains an unrelated apicheck workflow script that can write command arguments to a persistent local history file. Avoid passing secrets or tokens to its commands, and prefer installation only after the publisher removes or documents the extra workflow script and its local logging.

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/script.sh:5
Finding

Persistent Plaintext Logging of Unsanitized Command-Line Arguments

Content
View full analysis
> "$DATA_DIR/history.log"; } ``` ```bash cmd_init() { echo " Project initialized in $(pwd)" _log "init" "${1:-}" } cmd_check() { echo " Running lint + type check + tests..." _log "check" "${1:-}" } cmd_build() { echo " Building..." _log "build" "${1:-}" } cmd_test() { echo " Running test suite..." _log "test" "${1:-}" } cmd_deploy() { echo " Deploy: build -> test -> stage -> prod" _log "deploy" "${1:-}" } cmd_config() { echo " Config: $DATA_DIR/config.json" _log "config" "${1:-}" } cmd_status() { echo " Status: checking project health..." _log "status" "${1:-}" } cmd_template() { echo " Template for: $1" _log "template" "${1:-}" } cmd_docs() { echo " Generating docs..." _log "docs" "${1:-}" } cmd_clean() { echo " Cleaned build artifacts" _log "clean" "${1:-}" } ``` ### Technical Analysis The script creates a persistent data directory and writes the first argument supplied to each operational command directly to `history.log`. The argument is not redacted, validated, length-limited, or escaped before it is stored. If a caller supplies an API token, password, internal URL containing credentials, customer data, or another secret as the first command argument, that value will be retained in plaintext. The script does not set a restrictive `umask` or explicitly assign `0700` permissions to the directory and `0600` permissions to the log. Effective access therefore depends on the invoking environment's existing umask and filesystem controls. The direct use of `echo` ...[truncated 2065 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (22)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description centers on API-focused assistance: request construction, curl generation, mock data, API docs/help, and HTTP status/header reference. The supplied code does not implement any of those functions. Instead, it is a generic developer workflow shell tool that prints placeholder messages for project lifecycle commands and records activity in a local data directory. This is a materially different primary purpose and includes undeclared capabilities such as project automation commands and filesystem logging/persistence.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script's actual behavior is a generic developer workflow CLI with commands like init, build, test, deploy, and clean, which materially differs from the manifest describing an API request/curl/mock/documentation helper. This mismatch is dangerous because users or automated systems may grant the skill trust, permissions, or execution in contexts intended for low-risk API assistance, while it exposes unrelated operational workflow actions and creates room for deceptive repackaging or abuse.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
60% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · tips.md (reported line 97)May include surrounding context.

application/octet-stream # 二进制

text

## curl 常用参数
```bash
-X METHOD        # 指定HTTP方法
-H "header"      # 添加请求头

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
60% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · tips.md (reported line 97)May include surrounding context.

application/octet-stream # 二进制

text

## curl 常用参数
```bash
-X METHOD        # 指定HTTP方法
-H "header"      # 添加请求头

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · tips.md (reported line 124)May include surrounding context.

md
GET    /api/v1/users/{id}     # 详情
PUT    /api/v1/users/{id}     # 全量更新
PATCH  /api/v1/users/{id}     # 部分更新
DELETE /api/v1/users/{id}     # 删除

# 子资源
GET    /api/v1/users/{id}/orders

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill invokes a shell script (bash scripts/api.sh <command>) and appears capable of shell and likely network activity, but it does not declare any permissions or allowed-tools scope. This creates an authorization gap where an agent may run code with broader capabilities than users or platform policy can easily inspect, increasing the risk of unintended command execution or external requests.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger keywords are very broad (api, http, curl, 请求, headers, etc.) and overlap with ordinary technical discussion, making accidental invocation likely. In a skill that can launch shell commands, overbroad triggering increases the chance that the agent executes the skill in contexts where the user only wanted explanation, not code generation or script execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This shell skill embeds all user-facing instructions and examples in Chinese, but nowhere indicates that the user may choose another language or that the skill is intentionally limited to a Chinese-speaking context. The policy requires flagging language or locale constraints when they are forced without user opt-in or clear justification.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/api.sh (reported line 34)May include surrounding context.

sh
━━━━━━━━━━

方法: POST
URL:  https://api.example.com/v1/users
Headers:
  Content-Type: application/json
  Authorization: Bearer xxx

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/api.sh (reported line 47)May include surrounding context.

sh
━━━━━━━━━━

方法: POST
URL:  https://api.example.com/v1/users
Headers:
  Content-Type: application/json
  Authorization: Bearer xxx

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/api.sh (reported line 55)May include surrounding context.

sh
━━━━━━━━━━

方法: POST
URL:  https://api.example.com/v1/users
Headers:
  Content-Type: application/json
  Authorization: Bearer xxx

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/api.sh (reported line 61)May include surrounding context.

sh
━━━━━━━━━━

方法: POST
URL:  https://api.example.com/v1/users
Headers:
  Content-Type: application/json
  Authorization: Bearer xxx

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/api.sh (reported line 91)May include surrounding context.

sh
━━━━━━━━━━

方法: POST
URL:  https://api.example.com/v1/users
Headers:
  Content-Type: application/json
  Authorization: Bearer xxx

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/api.sh (reported line 47)May include surrounding context.

sh
💻 代码示例:

curl:
  curl -X POST 'https://api.example.com/v1/users' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer xxx' \
    -d '{"name":"张三","email":"zhangsan@example.com"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/api.sh (reported line 54)May include surrounding context.

sh
Python (requests):
  import requests
  resp = requests.post(
      'https://api.example.com/v1/users',
      headers={'Authorization': 'Bearer xxx'},
      json={'name': '张三', 'email': 'zhangsan@example.com'}

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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 · scripts/api.sh (reported line 54)May include surrounding context.

sh
Python (requests):
  import requests
  resp = requests.post(
      'https://api.example.com/v1/users',
      headers={'Authorization': 'Bearer xxx'},
      json={'name': '张三', 'email': 'zhangsan@example.com'}

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/api.sh (reported line 61)May include surrounding context.

sh
)

JavaScript (fetch):
  fetch('https://api.example.com/v1/users', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/api.sh (reported line 106)May include surrounding context.

sh
curl -s -X POST ... | jq .

# 带状态码输出
curl -s -o /dev/null -w "%{http_code}" -X POST ...

# 保存响应到文件
curl -o response.json -X POST ...

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The inline comments and help output explicitly present the tool as a 'Developer workflow automation tool,' contradicting the manifest's API-helper description. This inconsistency increases the risk of social engineering and misclassification during review, because operators may rely on manifest metadata while the file itself advertises a different purpose and command set.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · tips.md (reported line 97)May include surrounding context.

application/octet-stream # 二进制

text

## curl 常用参数
```bash
-X METHOD        # 指定HTTP方法
-H "header"      # 添加请求头

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation recommends curl's -k option, which disables TLS certificate validation and enables man-in-the-middle interception or connection to spoofed endpoints. In an API testing skill, users may copy commands directly into real environments, so presenting this flag without a strong warning normalizes an unsafe practice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

Most user-facing instructions, command descriptions, and trigger guidance are presented in Chinese, while the file does not state that the skill is region-specific or offer the user a language/locale choice. This can amount to a locale-policy issue because it implicitly assumes a specific language for interaction without opt-in.

Content

No source excerpt is available for this finding.