T09 · Insecure Skill Coding Practices
- Location
session-token.js:14- Finding
Plaintext Session Token Storage and Disclosure Through CLI Arguments and Output
- Content
View full analysis
``` ### Technical Analysis The bearer session token is stored unencrypted in `.session_token`. The call to `fs.writeFileSync()` does not specify a restrictive file mode, so the resulting permissions depend on the process umask and existing file permissions. On a shared or incorrectly configured system, another local user or process may be able to read the token. The token is additionally exposed through several channels: - The `save` command accepts it as a command-line argument, potentially exposing it through process inspection, command history, execution telemetry, or Agent transcripts. - The `save` command returns the complete token in its JSON output. - The `load` command prints the raw token. - The `check` command returns the raw token in its JSON output. A bearer token is sufficient to authenticate with ...[truncated 1625 chars]- Remediation
View remediation
