T09 · Insecure Skill Coding Practices
- Location
tool.sh:12- Finding
Hardcoded API Credential Transmitted Over Plaintext HTTP
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This medication lookup skill matches its stated purpose, but needs review because it ships a reusable internal API token and sends medication queries over plaintext HTTP.
Only install this in an environment authorized to use the internal medication API. Treat the embedded token as exposed, rotate it, prefer a runtime secret and HTTPS endpoint, and avoid submitting sensitive patient-specific medication information until the data handling and logging boundaries are documented.
tool.sh:12Hardcoded API Credential Transmitted Over Plaintext HTTP
tool.sh:10User Input Embedded Directly in API Query Expression and Form Body
The script silently uses a hardcoded authentication token in an outbound request, meaning users may invoke privileged access to an internal service without realizing a sensitive credential is being exercised. If the script is shared, inspected, or logged, the token can be extracted and abused to query the service outside the intended workflow.
The README explicitly states that drug-name queries are sent to an internal HTTP API and that the API token is embedded in the script, but it gives no user-facing notice about network transmission, privacy, or credential handling. Even though the queried data may seem low sensitivity, medication-related queries can reveal health-related interests or operationally sensitive internal usage patterns, and use of plain HTTP increases the risk of interception on internal networks.
The skill sends user-supplied medication queries to an internal HTTP service and explicitly states that an API token is built in, but it does not disclose the privacy, network-boundary, or credential-use implications to users. This creates a real data-handling and transparency issue: user inputs may be transmitted to an internal system over cleartext HTTP, and the hidden token model can mask backend access risks or misuse if the skill is repurposed.
The script embeds a bearer-like API token directly in the source, giving anyone with access to the file the ability to reuse that credential against the internal medication query service. Because this is an otherwise simple lookup utility, the hardcoded secret is unnecessary exposure and can enable unauthorized access, token leakage through code sharing, backups, logs, or repository history.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
PROP_NAMES="name"
# 调用 API
RESPONSE=$(curl -s -X 'POST' "${API_URL}" \
-H 'accept: application/json' \
-H "token: ${API_TOKEN}" \
-H 'Content-Type: application/x-www-form-urlencoded' \
All user-facing instructions and descriptions in the file are presented only in Chinese, with no note that the skill is Chinese-language only or any option for users to choose another language. This can conflict with language/locale policy expectations when a skill implicitly forces a specific language without opt-in or justification.
The natural-language instructions and usage details are presented only in Chinese, which can amount to a language policy violation if users are not given an explicit language or locale option. There is no indication that the skill is intentionally restricted to a Chinese-speaking or region-specific context.
The top comment describes the skill narrowly as querying a medication generic name, which implies a simple lookup. In practice, the script constructs a fuzzy search condition, sends it to a remote internal endpoint with an auth token, and prints the full formatted API response rather than specifically extracting or returning only the generic name.