T09 · Insecure Skill Coding Practices
- Location
SKILL.md:157- Finding
Unsafe Instruction to Persist API Credentials in the Workspace
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 157-159
Vulnerability Type: Unsafe secret storage instruction
Risk Level: MediumAffected content:
markdown - `PermissionError: VOLCENGINE_ACCESS_KEY ...`: Inform the user to configure the environment variables. Write them to the workspace environment variable file, then retry. - `status: "timeout"`: The task is still generating. Provide the user with the `task_id` and the manual query command from the output. - Copyright check failure (code 50000001): Suggest the user enrich the description or increase the audio duration, then retry.Technical Analysis
The Skill instructs the Agent to write the Volcengine access key and secret key to an unspecified workspace environment-variable file. Workspace files are not necessarily protected secret stores. Depending on the execution environment, they may be included in source-control commits, artifacts, backups, indexing systems, diagnostic output, or files shared with other workspace users.
The executable script itself reads credentials through
os.getenvand does not transmit the secret key directly. It uses the secret key locally to produce an HMAC signature for the declared Volcengine HTTPS endpoint. Therefore, persistent workspace storage is not required for the Skill's declared functionality and exceeds the minimum necessary exposure of the credentials.Attack Path
- The Skill is executed without
VOLCENGINE_ACCESS_KEYorVOLCENGINE_SECRET_KEY. - Following the documented recovery instruction, the Agent obtains the credentials and writes them into a workspace environment file.
- The file is accidentally committed, uploaded as an artifact, indexed, backed up, logged, or made accessible to another workspace user or process.
- An attacker or unauthorized user reads the access key and secret key.
- The recovered credentials are used to authenticate directly to Volcengine APIs within t ...[truncated 418 chars]
- The Skill is executed without
- Remediation
View remediation
Remediation Suggestions
- Replace the workspace-storage instruction with guidance to use a platform-managed secret store, credential vault, or process-scoped environment variables.
- Explicitly prohibit storing credentials in repository files, workspace configuration committed to source control, shell history, command-line arguments, or generated artifacts.
- If a local environment file must be supported, require it to be outside the repository, restricted to the current user, and excluded from source control and artifact collection.
- Add a documented least-privilege requirement for the Volcengine credentials and recommend dedicated, narrowly scoped credentials rather than account-wide keys.
- Recommend credential rotation and immediate revocation if a key is accidentally written to a shared or version-controlled location.
