T09 · Insecure Skill Coding Practices
- Location
SKILL.md:222- Finding
Persistent Bearer Token Store Lacks Mandatory File Access Controls
- Content
View full analysis
", "email": "", "registered_at": "" }` If `AUTH_MD_TOKEN_STORE` env var is set, append to that JSON file. Otherwise, hold in session memory only. ``` ### Technical Analysis The Skill instructs the Agent to persist an active bearer credential and the user's email address in a JSON file selected through `AUTH_MD_TOKEN_STORE`. It does not require the file to be created with restrictive permissions, verify that the destination is owned by the current user, reject symbolic links, or use an atomic write procedure. Because the environment variable may specify an arbitrary path, the destination could be an existing file with permissive permissions or a symbolic link controlled by another local process or user. A bearer token can generally be used by anyone who obtains it, without additional proof of identity. Although the token is service-scoped, plaintext disclosure would permit access within all scopes granted to that token. The network transmission of the email, OTP, claim token, and bearer token is otherwise consistent with the declared signup and revocation workflow. The Skill also requires explicit user consent and endpoint-domain validation. The confirmed issue is limited to insecure local persistence rather than unauthorized network exfiltration. ### Attack Path 1. An attacker or compromised local process creates a destination file readable by another account, or creates a symbolic link to an attacker-accessible destination. 2. `AUTH_MD_TOKEN_STORE` is configured to reference that destination, or an existing token-store file has overly permissive permissions. 3. The user completes the auth.md registration flow. 4. The Agent writes the active service t ...[truncated 1055 chars]- Remediation
View remediation
