T09 · Insecure Skill Coding Practices
Note
- Location
- scripts/list_tags.py:34
- Finding
- Developer Token Prefix Disclosed Through Standard Output<![CDATA[ ## Vulnerability Details **File Location**: `scripts/list_tags.py:34` **Vulnerability Type**: Sensitive credential disclosure through logs **Risk Level**: Low ### Vulnerable Code ```python print(f"Token: {token[:30] if token else 'None'}...") ``` ### Technical Analysis The script prints the first 30 characters of the Evernote Developer Token to standard output. Developer Tokens contain structured authentication information, and even a partial value is sensitive. Standard output may be retained in terminal history, CI logs, agent transcripts, monitoring systems, or shared debugging records. Although this does not reveal the complete token, it unnecessarily exposes a substantial credential prefix and enables token identification, correlation across logs, and disclosure of structured token metadata. ### Attack Path 1. A user, automation system, or agent runs `scripts/list_tags.py`. 2. The script reads `EVERNOTE_TOKEN` from the workspace `.env` file. 3. The first 30 characters are printed to standard output. 4. An attacker with access to terminal output, CI logs, or agent transcripts obtains the token prefix. 5. The disclosed fragment can be used for credential correlation or combined with information exposed elsewhere. ### Impact Assessment The issue does not independently provide authenticated access because the entire token is not printed. However, it exposes sensitive authentication material to every system that captures process output. The scope includes the Evernote account associated with the token if the partial disclosure can be combined with another leak. ]]>
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove all output containing any portion of the token. - Replace the statement with a boolean status message, for example: ```python print(f"Token loaded: {'yes' if token else 'no'}") ``` - Ensure exceptions and debug logs never include request headers or configuration values. - Add automated secret-redaction tests covering console and error output. - Treat previously collected logs as sensitive and remove exposed token fragments where practical. ]]>
