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
Vulnerability Type: Plaintext credential persistence
Risk Level: MediumVulnerable Code
markdown ## 设置 DATAIFY_API_TOKEN 推荐使用永久环境变量,而不是只在当前终端临时设置。 Windows PowerShell,当前用户永久设置: ```powershell [Environment]::SetEnvironmentVariable("DATAIFY_API_TOKEN", "your_token_here", "User")然后重新打开 PowerShell。如果当前会话也要立即生效,再执行:
powershell $env:DATAIFY_API_TOKEN = "your_token_here"macOS 或 Linux,bash 永久设置:
bash echo 'export DATAIFY_API_TOKEN="your_token_here"' >> ~/.bashrc source ~/.bashrcmacOS 或 Linux,zsh 永久设置:
bash echo 'export DATAIFY_API_TOKEN="your_token_here"' >> ~/.zshrc source ~/.zshrctext ### Technical Analysis The localized instructions explicitly recommend permanent environment-variable configuration. On macOS and Linux, this writes the API token in plaintext to shell startup files such as `~/.bashrc` or `~/.zshrc`. On Windows, the token is stored as a persistent user environment variable. These storage locations are not dedicated secret stores. Shell configuration files can be read by processes operating under the same user account, copied into backups, included in diagnostic bundles, or accidentally shared. Persistent user environment variables can likewise be retrieved by other processes running in the user's security context. The guidance also conflicts with the safer account policy in the primary Skill document, which requires showing a matching session-scoped setup command first and discourages unnecessary persistent configuration. ### Attack Path 1. A user follows the localized Skill instructions. 2. The user substitutes a real Dataify API token into one of the documented commands. 3. The token is stored persistently in a shell startup file or user environment configuration. 4. Local malware, another process under the same user account, an exposed backu ...[truncated 584 chars]- Remediation
View remediation
Remediation Suggestions
- Remove the recommendation to store API tokens in
~/.bashrc,~/.zshrc, or persistent user environment variables. - Recommend session-scoped environment variables by default:
- POSIX shells:
export DATAIFY_API_TOKEN="..." - PowerShell:
$env:DATAIFY_API_TOKEN = "..." - Command Prompt:
set DATAIFY_API_TOKEN=...
- POSIX shells:
- If persistent storage is required, direct users to an operating-system credential manager or an approved secret-management system.
- Never instruct users to paste the token into chat, source control, project files, or command examples likely to be retained.
- Explain that exposed tokens should be revoked and rotated through Dataify API-key management.
- Align the localized instructions with the session-scoped credential policy in
SKILL.md.
- Remove the recommendation to store API tokens in
