T09 · Insecure Skill Coding Practices
- Location
SKILL.md:45- Finding
Persistent API Credential Storage Without Security Requirements
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 45–53
Vulnerability Type: Insecure handling and persistence of authentication credentials
Risk Level: MediumVulnerable Code Snippet:
markdown ## Registration Before calling any transfer tool, the agent must be registered once: 1. Call `antalpha-register` to obtain an `agent_id` and `api_key`. 2. Persist the returned `agent_id` (and `api_key`). 3. Pass `agent_id` on every subsequent `transfer-request`, `transfer-status`, and `transfer-cancel` call. If a tool returns an authentication failure, the `agent_id` is missing or invalid — re-register and retry.Technical Analysis
The Skill explicitly instructs the agent to persist an externally issued
api_key, but does not specify a secure storage mechanism or any controls governing the credential lifecycle. There are no requirements for encryption at rest, restrictive file permissions, secret-store use, log redaction, per-user isolation, expiration, rotation, revocation, or deletion.Because this is an instruction-only Skill, the actual persistence method is delegated to the host agent or runtime. An implementation may therefore store the key in plaintext files, general-purpose memory, conversation history, logs, backups, or another location accessible across users or sessions. Persisting the API key also exceeds the minimum requirement suggested by the documented downstream calls, which explicitly require only
agent_id.The README describes the Skill as non-custodial but does not disclose this mandatory registration and credential-persistence behavior. Although the API key is not a wallet private key, it is still an authentication secret associated with a financial-transfer service and must be protected accordingly.
Attack Path
- A user invokes the Skill for a cryptocurrency transfer.
- The agent calls the external
antalpha-registertool and receives anagent_idand `api_k ...[truncated 1312 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not persist the API key unless cross-session persistence is strictly necessary. Prefer short-lived, session-bound credentials.
- If persistence is required, mandate an operating-system or runtime-managed secret store rather than plaintext files, conversation history, logs, environment snapshots, or general agent memory.
- Require encryption at rest and in transit, restrictive access controls, per-user and per-agent isolation, and least-privilege credential scopes.
- Define credential expiration, rotation, revocation, and secure deletion procedures.
- Explicitly prohibit displaying or logging the API key, including in tool traces, debug output, error messages, telemetry, and backups.
- Clarify whether downstream tools require the API key. If only
agent_idis needed, avoid retaining the API key after registration. - Document the registration and credential-storage behavior in
README.mdso operators can make an informed security decision. - Require backend authorization checks and fresh user confirmation for all state-changing transfer operations, even when a valid agent credential is presented.
