T09 · Insecure Skill Coding Practices
- Location
SKILL.md:603- Finding
Permanent Bearer Tokens May Be Transmitted in URL Query Strings
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 603–614
Vulnerability Type: Bearer-token exposure through unsafe authentication transport
Risk Level: MediumVulnerable Code Snippet
markdown ## 🔑 认证方式 支持三种 Token 传递方式(任选其一): 1. **HTTP 请求头**:`Authorization: Bearer {token}` 2. **请求体字段**:`"token": "YOUR_TOKEN"` 3. **URL 参数**:`?token=YOUR_TOKEN` | Token 类型 | 有效期 | 说明 | |-----------|--------|------| | JWT Token | 30 天 | `POST /api/auth/token` 获取 | | API Token | **永久** | `POST /api/ai/token` 获取,可在 settings 管理 |Technical Analysis
The Skill explicitly permits an authentication token to be supplied through a URL query parameter. URLs are commonly retained or propagated by HTTP access logs, reverse proxies, application telemetry, monitoring products, browser history, copied links, support diagnostics, and error reports. Depending on referrer policy and navigation behavior, a credential-bearing URL may also be disclosed through the
Refererheader.A bearer token grants authority based solely on possession. Consequently, any party that obtains a logged or propagated query string may replay its token without knowing the account password. The risk is increased by the documented availability of permanent API tokens, because a leaked permanent token remains useful until manually revoked.
Passing a token in a request body is also less robust than using the standard authorization header because bodies can be captured by application debugging and request logging. The
Authorizationheader over HTTPS should be the only documented transport.Attack Path
- An agent follows the Skill and calls a FireSeed API endpoint using
?token=PERMANENT_API_TOKEN. - The complete request URL is recorded by a server, reverse proxy, monitoring service, browser history, diagnostic system, or other intermediary.
- An attacker or unauthorized operator obtains access to the recorded URL or receives it through accidental sharing or referrer propa ...[truncated 928 chars]
- An agent follows the Skill and calls a FireSeed API endpoint using
- Remediation
View remediation
Remediation Suggestions
- Remove URL query-string authentication from the Skill documentation and reject
tokenquery parameters on the server. - Remove request-body token authentication unless a strict compatibility requirement exists.
- Require the standard
Authorization: Bearer <token>header over HTTPS for all authenticated API calls. - Configure application servers, proxies, tracing systems, and monitoring products to redact authorization data and any legacy
tokenparameters. - Replace permanent tokens with short-lived, narrowly scoped credentials where possible.
- Provide explicit token revocation and rotation procedures and automatically revoke credentials suspected of exposure.
- Avoid placing credentials in generated output, error messages, command histories, analytics, or diagnostic reports.
- Review historical logs for query-string tokens, securely purge exposed values where feasible, and rotate any credentials discovered.
- Apply least-privilege scopes so publishing tokens cannot perform unrelated account-administration operations.
- Add automated tests that reject authenticated requests containing credentials in URLs.
- Remove URL query-string authentication from the Skill documentation and reject
