T09 · Insecure Skill Coding Practices
- Location
SKILL.md:29- Finding
Credential File Is Not Protected Despite Documentation Assurance
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:29-34
Vulnerability Type: Missing credential-file protection and misleading security documentation
Risk Level: MediumRelevant excerpt translated into English:
markdown The project provides an `.env.example` template, which can be copied and modified: ```bash cp .env.example .envThe
.envfile is ignored by.gitignoreand will not be committed, so real credentials can be safely entered.text Neither `.gitignore` nor `.env.example` exists in the audited project. Meanwhile, `scripts/generate.ts:20-31` automatically reads credentials from a root-level `.env` file. ### Technical Analysis The setup instructions explicitly encourage users to store a VolcEngine Access Key and Secret Key in `.env` and assure them that Git ignores this file. That assurance is false for the audited package because no `.gitignore` is present. Secret files must be excluded by an actual repository control rather than documentation alone. Without that control, commands such as `git add .`, automated repository synchronization, archive creation, or broad file-upload operations can include `.env`. This issue does not independently transmit credentials to an attacker. Exploitation requires the credential file to be committed, published, uploaded, or otherwise exposed after a user follows the documented setup process. ### Attack Path 1. A user follows the Skill instructions and creates `.env`. 2. The user places `VOLCENGINE_AK` and `VOLCENGINE_SK`, or an STS token, in that file. 3. Because the project contains no `.gitignore`, Git and other broad file-collection tools do not exclude `.env`. 4. The user runs a command such as `git add .`, publishes the repository, or uploads the complete project directory. 5. An attacker obtains the exposed credential file. 6. The attacker uses the credentials against VolcEngine APIs within the permissions assigned to the affected id ...[truncated 447 chars]- Remediation
View remediation
Remediation Suggestions
- Add a root-level
.gitignorecontaining at least:gitignore .env .env.* !.env.example output/ dist/ node_modules/ - Add the referenced
.env.examplewith placeholders only:dotenv VOLCENGINE_AK= VOLCENGINE_SK= VOLCENGINE_TOKEN= - Replace the absolute safety assurance with instructions to verify exclusion:
bash git check-ignore .env - Prefer short-lived STS credentials with minimum required permissions over permanent access keys.
- Add secret scanning to CI and pre-commit workflows.
- If credentials have already entered repository history, revoke or rotate them immediately; deleting the file from the latest commit is insufficient.
- Add a root-level
