Back to skill

Security audit

Bank of Korea ECOS CLI

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed Bank of Korea ECOS API helper that needs an ECOS API key, with no hidden execution, persistence, or unrelated data access found.

Install only if you have or trust the actual CLI implementation, since this artifact only includes documentation. Treat BOK_API_KEY as a secret, avoid publishing raw request URLs or debug logs, and rotate the key if it may have been exposed.

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
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: Medium

Vulnerable 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_KEY as 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.md and no executable client implementation, the audit could not verify whether request URLs are redacted or whether HTTP debug logging is disabled.

Attack Path

  1. A user configures the required BOK_API_KEY environment variable.
  2. The client constructs an ECOS request by interpolating the key into one of the documented URL paths.
  3. A client logger, proxy, monitoring system, exception handler, or diagnostic capture records the complete URL.
  4. An unauthorized party with access to that record extracts the API key.
  5. 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]

Remediation
View remediation

Remediation Suggestions

  1. Use an HTTP authorization header or another non-URL authentication mechanism if the ECOS API supports one.
  2. If ECOS mandates path-based authentication, ensure the implementation never logs complete request URLs containing the key.
  3. Add structured URL redaction that replaces the credential path segment with a fixed value such as [REDACTED] before producing logs, exceptions, telemetry, or diagnostics.
  4. Disable verbose HTTP client logging in normal operation and document that users must not publish raw request traces.
  5. Prevent observability systems and reverse proxies under the operator's control from retaining sensitive URL paths.
  6. Avoid printing generated request URLs or placing them in shell commands where they could enter shell history.
  7. Document credential rotation and revocation procedures for suspected exposure.
  8. Include the actual CLI implementation in the package so reviewers can verify HTTPS enforcement, endpoint restrictions, redirect handling, and secret-redaction controls.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation states that BOK_LANG defaults to kr, which imposes a specific language choice unless the user overrides it. The policy allows language constraints only when the user is offered a choice or the default is clearly justified; here, the choice exists but opt-in is not required for the non-neutral default.

Content

No source excerpt is available for this finding.