T09 · Insecure Skill Coding Practices
- Location
SKILL.zh-CN.md:21- Finding
Persistent plaintext storage of the Dataify API token
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.zh-CN.md, lines 21–48; vulnerable commands at lines 28, 40, and 47
Vulnerability Type: Plaintext credential persistence
Risk Level: MediumVulnerable Code
powershell [Environment]::SetEnvironmentVariable("DATAIFY_API_TOKEN", "your_token_here", "User")bash echo 'export DATAIFY_API_TOKEN="your_token_here"' >> ~/.bashrc source ~/.bashrcbash echo 'export DATAIFY_API_TOKEN="your_token_here"' >> ~/.zshrc source ~/.zshrcTechnical Analysis
The localized instructions recommend permanently storing
DATAIFY_API_TOKENas a user environment variable or directly in plaintext shell initialization files. Persistent storage is not required for the Skill's declared search functionality because the token can be supplied through a session-scoped environment variable.On Linux and macOS, the token becomes readable plaintext in
.bashrcor.zshrc. Any process or local user with permission to read these files can recover it. The secret may also be retained in workstation backups, configuration synchronization systems, diagnostic archives, or accidentally shared dotfile repositories.On Windows, the user-scoped environment variable is persistent and may be retrievable by processes running in the same user context. It is not protected like a secret stored in an operating-system credential vault.
These instructions also conflict with the session-scoped-first account policy later in the same document and in
SKILL.md, which requires showing a session-scoped setup command first. The behavior is best classified as an insecure credential-handling practice rather than system persistence because it does not install a service, scheduled task, startup backdoor, or executable hook.Attack Path
- A user follows the localized setup instructions and replaces
your_token_herewith a valid Dataify API token. - The token is written to a persist ...[truncated 1152 chars]
- A user follows the localized setup instructions and replaces
- Remediation
View remediation
Remediation Suggestions
- Remove the recommendation to append API tokens to
.bashrcor.zshrc. - Remove persistent user-environment-variable setup as the default Windows recommendation.
- Present only session-scoped commands by default:
- macOS/Linux:
export DATAIFY_API_TOKEN="..." - PowerShell:
$env:DATAIFY_API_TOKEN = "..." - Command Prompt:
set DATAIFY_API_TOKEN=...
- macOS/Linux:
- For persistent storage, recommend an operating-system credential manager or dedicated secret-management facility rather than plaintext configuration files.
- If a user explicitly requests shell-profile storage, warn that the token will be stored in plaintext and advise restrictive file permissions, exclusion from version control and synchronization, and regular token rotation.
- Align
SKILL.zh-CN.mdwith the account policy inSKILL.md: never ask users to paste tokens into chat, never print token values, and verify only whether the environment variable is present. - Advise users who already followed these instructions to remove the token from shell profiles, inspect backups and dotfile repositories for copies, and rotate the exposed token.
- Remove the recommendation to append API tokens to
