T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:23
- Finding
- AtlasCloud API Token Persisted in General Agent Memory<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 23-28 **Vulnerability Type**: Sensitive credential persistence in general agent memory **Risk Level**: Medium ### Vulnerable Code ```markdown ## Token Setup Before generating images, you need the user's AtlasCloud API token. - Check memory for `atlascloud_token`. - If not found, ask the user: *"Please provide your AtlasCloud API token to get started."* - Save the token to memory as `atlascloud_token` so it is not needed again. ``` ### Technical Analysis The skill explicitly instructs the agent to save a reusable AtlasCloud bearer token in general agent memory. Authentication credentials should not be placed in persistent conversational memory because that storage may have a broader lifetime and access scope than the individual image-generation operation. This is insecure credential handling rather than agent memory poisoning: the value written to memory is a secret, not an attacker-controlled instruction intended to alter future agent behavior. The best matching classification is therefore `T09: Insecure Skill Coding Practices`. The vulnerability becomes exploitable if another session, skill, user, extension, diagnostic export, or compromised agent component can read the same memory namespace. No evidence in the audited files proves that such access is currently available, but the instruction unnecessarily creates a persistent secret whose exposure depends on the security boundaries of the hosting agent. ### Attack Path 1. The user asks the skill to generate an image. 2. The skill requests the user's AtlasCloud API token. 3. Following `SKILL.md`, the agent writes the token to memory under `atlascloud_token`. 4. The token remains available after the immediate generation operation. 5. A later component or session with access to the same memory reads or discloses the stored value. 6. The exposed bearer token is replayed against the AtlasCloud API until it expires or is revoked. Thi ...[truncated 591 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove the instruction to store `atlascloud_token` in general conversational or agent memory. - Keep the token only for the lifetime of the current image-generation operation. - Supply the credential through a dedicated secret manager, protected environment variable, operating-system credential store, or restricted file descriptor. - If persistent storage is essential, require explicit user consent and use encrypted, access-controlled secret storage isolated from ordinary memory and conversation history. - Apply least privilege and short expiration periods to AtlasCloud tokens. - Provide users with a documented token-revocation procedure. - Ensure logs, traces, memory exports, error reports, and generated state never contain the token. ]]>
