Back to skill

Security audit

Devin_dingcheng

Security checks for vulnerabilities and agentic risk

Overview

This skill is a small, read-only device-status helper, but users should treat the API key and phone number as sensitive.

Before installing, confirm that cd6969.com is the correct API for your device account. Do not commit or share a filled-in script containing your API key, phone number, or IMEI; prefer environment variables or a private local config file with restricted permissions. Rotate any real credentials that were pasted into shared files 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
scripts/get_status.sh:5
Finding
Plaintext Credential Storage and Process Argument Exposure<![CDATA[ ## Vulnerability Details **File Location**: `scripts/get_status.sh`, lines 5-12 **Vulnerability Type**: Plaintext sensitive-data handling **Risk Level**: Medium ### Vulnerable Code ```bash KEY="你的KEY" TEL="你的手机号" IMEI="你的IMEI" URL="https://www.cd6969.com/admin.php?s=/Admin/ApiV2/getList.html" response=$(curl -s -X POST "$URL" \ -H "Content-Type: application/json" \ -d "{\"key\":\"$KEY\",\"tel\":\"$TEL\"}") ``` ### Technical Analysis The script is designed for users to replace the placeholder values with an API key, telephone number, and IMEI. This stores authentication and personal data directly in an executable source file. Such values may consequently be exposed through repository commits, source archives, backups, file sharing, or access by other users who can read the script. The API key and telephone number are also interpolated into the argument supplied to `curl` through `-d`. On systems where process arguments are visible to other users or monitoring services, the complete request body may be captured from the process list, process-accounting records, audit logs, or diagnostic tooling while `curl` is running. The request is sent over HTTPS to the service documented by the Skill, so no unauthorized destination or malicious exfiltration was identified. The vulnerability concerns local storage and handling of the credentials before transport. ### Attack Path 1. A user replaces the placeholders in `scripts/get_status.sh` with a valid API key, telephone number, and IMEI. 2. The sensitive values remain stored as plaintext in the script. 3. An attacker with read access to the project, a copied repository, a backup, or an archive obtains the configured values. 4. Alternatively, a local user or monitoring service observes the `curl` command while it runs and captures the API key and telephone number from its request-data argument. 5. The attacker submits requests to the same API using the disclosed credentials, subject to the authorization ...[truncated 657 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove credential placeholders that are intended to be replaced directly in the source file. 2. Read credentials from environment variables or a dedicated secret-management system, and terminate with an error when required values are absent. 3. If a configuration file is necessary, keep it outside the repository, add it to ignore rules, and restrict its permissions to the owning user, such as mode `0600`. 4. Avoid placing secrets directly in process arguments. Construct the JSON safely and pass it to `curl` through standard input: ```bash #!/usr/bin/env bash set -euo pipefail : "${CD_API_KEY:?CD_API_KEY is required}" : "${CD_TEL:?CD_TEL is required}" : "${CD_IMEI:?CD_IMEI is required}" URL="https://www.cd6969.com/admin.php?s=/Admin/ApiV2/getList.html" response=$( jq -n \ --arg key "$CD_API_KEY" \ --arg tel "$CD_TEL" \ '{key: $key, tel: $tel}' | curl --fail-with-body --silent --show-error \ -X POST "$URL" \ -H "Content-Type: application/json" \ --data-binary @- ) ``` 5. Document secure secret provisioning rather than instructing users to edit the executable script. 6. Rotate any real API credentials that have previously been committed, archived, shared, or exposed through process or audit logs. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill documents shell-based usage (`curl` and a local script) but does not declare any tool scope or execution permissions. This creates an authorization and review gap: an agent or user may invoke shell/network behavior that is not explicitly constrained, increasing the chance of unintended command execution or data exfiltration.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The documentation instructs users to POST a key and phone number to an external service without any warning about handling secrets, PII, logging exposure, retention, or third-party trust. Even though HTTPS is used, this can still leak credentials through shell history, terminal logs, copied examples, or misuse by downstream agents.

External Transmission

Medium
Category
Data Exfiltration
Content
## 快速查询

```bash
curl -s -X POST "https://www.cd6969.com/admin.php?s=/Admin/ApiV2/getList.html" \
  -H "Content-Type: application/json" \
  -d '{"key":"你的KEY","tel":"你的手机号"}'
```
Confidence
92% confidence
Finding
The skill instructs sending sensitive identifiers (`key`, `tel`) to an external domain, which is an external transmission of secrets and personal data. In this context the transmission appears functionally necessary to query device state, but it is still dangerous because it expands the trust boundary to a third-party service and may expose credentials or device metadata if mishandled.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The script directly uses credential-like values (KEY, TEL, IMEI) embedded in the script template, which encourages insecure secret handling and raises the risk of accidental disclosure through source control, backups, or local file exposure. In this IoT context, those values can enable unauthorized querying of device status or account-associated data if leaked.

External Transmission

Medium
Category
Data Exfiltration
Content
IMEI="你的IMEI"
URL="https://www.cd6969.com/admin.php?s=/Admin/ApiV2/getList.html"

response=$(curl -s -X POST "$URL" \
  -H "Content-Type: application/json" \
  -d "{\"key\":\"$KEY\",\"tel\":\"$TEL\"}")
Confidence
93% confidence
Finding
The script performs an external network transmission to a vendor-controlled API endpoint and includes sensitive values in the request body. In the context of an agent skill, outbound transmission of credentials and personal identifiers is security-relevant because users may not expect data exfiltration, and compromise or misuse of the remote service could expose account or device information.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The script sends a phone number and API key to a third-party remote endpoint, which is a genuine data exposure/privacy concern because these are sensitive identifiers and credentials. Although this transmission appears necessary for the advertised device-query functionality, the file provides no user-facing disclosure, no consent flow, and no guidance on handling or minimizing the data being sent.

Natural-Language Policy Violations

Low
Confidence
87% confidence
Finding
The file presents all user-facing instructions in a single language without offering an opt-in or documenting that the skill is intended only for a Chinese-speaking or region-specific audience. Under the stated policy, forcing a specific language without user choice can be a natural-language policy violation.

Natural-Language Policy Violations

Low
Confidence
86% confidence
Finding
The human-readable description and error text are presented solely in Chinese, with no opt-in language selection or note that the skill is intentionally region-specific. Under the policy, forcing a specific language without user choice can be a natural-language policy violation.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
The script emits a Chinese-only error message to the user, which enforces a single language experience. There is no indication that the skill is restricted to a Chinese locale or that users can opt into another language.

Static analysis

No suspicious patterns detected.