T09 · Insecure Skill Coding Practices
- Location
SKILL.md:23- Finding
Hardcoded Bearer Credential Transmitted over Plaintext HTTP
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 23–25, 76–78, and 226
Vulnerability Type: Hardcoded credential and insecure transport
Risk Level: HighVulnerable Code
Lines 23–25:
markdown **端点**: `POST http://36.151.144.35:3001/api/v1/search` **认证**: `Bearer sk_test_a6f84bf78896f10b2d28aebd7857744c`Lines 76–78:
markdown **端点**: `POST http://36.151.144.35:3001/api/v1/news` **认证**: `Bearer sk_test_a6f84bf78896f10b2d28aebd7857744c`Line 226:
markdown 5. 所有请求必须在 Header 中包含 `Authorization: Bearer sk_test_a6f84bf78896f10b2d28aebd7857744c`Technical Analysis
The Skill embeds a static bearer credential directly in a project file and explicitly instructs the Agent to send it to a remote service. Anyone with access to the package, repository, logs, generated prompts, or documentation can retrieve and attempt to reuse the credential.
Both documented API endpoints use unencrypted
http://URLs at a bare IP address. HTTP provides neither transport encryption nor authenticated server identity. Consequently, the bearer token, user search queries, and API responses are exposed to passive network monitoring and active man-in-the-middle modification.Because bearer authentication grants access based solely on possession of the token, an attacker who obtains it does not need any additional proof of identity. The audit did not validate whether the exposed token remains active, but the Skill presents it as mandatory authentication, so it must be treated as compromised and rotated.
Attack Path
- A user invokes the Skill to perform a search or news query.
- The Agent follows
SKILL.mdand sends an HTTP POST request to36.151.144.35:3001. - The request includes the static token in the
Authorizationheader and may include sensitive user search terms in the JSON body. - An attacker with visibility or control over the network path captures the unencrypted ...[truncated 1334 chars]
- Remediation
View remediation
Remediation Suggestions
- Immediately revoke and rotate the exposed bearer credential. Treat it as compromised even if it is labeled as a test token.
- Remove all credentials from
SKILL.mdand from any repository history, generated packages, examples, logs, and cached artifacts. - Supply credentials at runtime through an approved secret manager or protected environment variable. Do not print the value or expose it to model-visible context unless strictly required.
- Replace both
http://endpoints withhttps://endpoints using a valid certificate and mandatory certificate verification. - Prefer a stable domain name with authenticated TLS identity instead of a bare IP address. Do not allow fallback to plaintext HTTP.
- Issue separate, short-lived credentials per installation or user rather than distributing a shared static token.
- Restrict the credential to only the required search operations, enforce rate and spending limits, and monitor for replay or abnormal usage.
- Inform users that their queries are transmitted to an external service and avoid sending secrets, personal information, or other sensitive content without explicit authorization.
- Validate the response schema and treat all returned titles, URLs, snippets, and crawled content as untrusted external input.
- Add automated secret scanning and policy checks that reject hardcoded API keys and non-TLS service endpoints before release.
