T09 · Insecure Skill Coding Practices
- Location
setup.txt:1- Finding
Credential files are not protected by a repository ignore rule
- Content
View full analysis
Vulnerability Details
File Location:
setup.txt:1-13,SKILL.md:104-121
Vulnerability Type: Credential exposure through insecure configuration
Risk Level: MediumVulnerable Code
setup.txt:1-13:text # MiniMax TTS Plus - Environment Variables # Copy this file to .env and fill in your values. # NEVER commit .env to version control. # === Required: MiniMax API (https://api.minimaxi.com) === # Get your API Secret Key from: https://platform.minimax.io → Account → API Keys MINIMAX_API_KEY=your-minimax-secret-key-here # === Optional: Telegram sending === # Only needed if you want to send voice messages to Telegram. # Get bot token from: https://t.me/BotFather # Get your chat ID from: https://t.me/useridbot or check @userinfobot TELEGRAM_BOT_TOKEN=your-telegram-bot-token-hereRelevant documentation in
SKILL.md:104-121:markdown 1. Copy `setup.txt` to `.env` and fill in your credentials: ```bash cp skills/voice-for-openclaw/setup.txt skills/voice-for-openclaw/.env # Then edit .env with your real values- The script loads credentials from
.envat runtime — no hardcoded tokens in scripts.
⚠️ Security note: Credentials are loaded from
.envonly — no tokens are hardcoded in shell scripts. The.envfile is gitignored and never published.text ### Technical Analysis The setup instructions direct users to create a project-local `.env` file containing a MiniMax API secret and, optionally, a Telegram bot token and chat ID. However, the audited project contains no `.gitignore` file or equivalent repository control that excludes `.env`. The documentation states that `.env` is gitignored and never published, but this assertion is not enforced by the distributed project. A warning inside the template does not prevent Git or other packaging tools from including the credential file. This is an insecure secret-management practice rather than intentional cre ...[truncated 1436 chars]- The script loads credentials from
- Remediation
View remediation
Remediation Suggestions
-
Add a project-root
.gitignorewith at least:gitignore .env .env.* !.env.example -
Keep
setup.txtor rename it to.env.example, ensuring it contains placeholders only. -
Prefer injecting secrets through the process environment or a supported secret manager rather than keeping them in the project directory.
-
Restrict local credential-file permissions, for example with
chmod 600 .env. -
Add a startup check that warns when
.envhas permissions allowing access by other users. -
Add secret scanning to continuous integration and pre-commit workflows.
-
Remove or qualify the statement that
.envis “gitignored and never published” unless the repository actually enforces that behavior. -
If credentials have already been committed, revoke and rotate them; removing the file from the latest revision alone does not remove it from repository history.
-
