T09 · Insecure Skill Coding Practices
- Location
SKILL.md:58- Finding
ECOS API Key Exposed Through Request URL Paths
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 58–59
Vulnerability Type: API credential exposure through URL paths
Risk Level: MediumVulnerable Code
text - StatisticTableList: `/StatisticTableList/{API_KEY}/json/{lang}/{start}/{end}/` - StatisticSearch: `/StatisticSearch/{API_KEY}/json/{lang}/{start}/{end}/{STAT_CODE}/{CYCLE}/{START}/{END}/`The Skill declares
BOK_API_KEYas a required secret on lines 11–13 and documents inserting it directly into request URL paths on lines 58–59.Technical Analysis
Credentials embedded in URLs can be exposed even when HTTPS protects the request during transport. Full URLs may be retained by client debug logs, exception traces, reverse proxies, monitoring products, network gateways, shell history, or copied diagnostic output. HTTPS does not prevent disclosure through these local and intermediary records.
The network interaction is consistent with the Skill's declared purpose and is directed to the documented Bank of Korea ECOS API. There is no evidence of transmission to an unrelated endpoint. However, carrying a secret in a URL creates unnecessary exposure wherever URL metadata is recorded. Because the project contains only
SKILL.mdand no executable client implementation, the audit could not verify whether request URLs are redacted or whether HTTP debug logging is disabled.Attack Path
- A user configures the required
BOK_API_KEYenvironment variable. - The client constructs an ECOS request by interpolating the key into one of the documented URL paths.
- A client logger, proxy, monitoring system, exception handler, or diagnostic capture records the complete URL.
- An unauthorized party with access to that record extracts the API key.
- The party reuses the key against the ECOS API until the credential is revoked, rotated, or otherwise invalidated.
Impact Assessment
Successful exploitation exposes the user's ECOS API cred ...[truncated 494 chars]
- A user configures the required
- Remediation
View remediation
Remediation Suggestions
- Use an HTTP authorization header or another non-URL authentication mechanism if the ECOS API supports one.
- If ECOS mandates path-based authentication, ensure the implementation never logs complete request URLs containing the key.
- Add structured URL redaction that replaces the credential path segment with a fixed value such as
[REDACTED]before producing logs, exceptions, telemetry, or diagnostics. - Disable verbose HTTP client logging in normal operation and document that users must not publish raw request traces.
- Prevent observability systems and reverse proxies under the operator's control from retaining sensitive URL paths.
- Avoid printing generated request URLs or placing them in shell commands where they could enter shell history.
- Document credential rotation and revocation procedures for suspected exposure.
- Include the actual CLI implementation in the package so reviewers can verify HTTPS enforcement, endpoint restrictions, redirect handling, and secret-redaction controls.
