T09 · Insecure Skill Coding Practices
- Location
script/plan.py:15- Finding
Sensitive Credentials Included in General Deployment Packaging Plans
- Content
View full analysis
Vulnerability Details
File Location:
script/plan.py, lines 15-18 and 31-37; supporting instructions inSKILL.md, lines 18-21
Vulnerability Type: Sensitive credential propagation through deployment artifacts
Risk Level: MediumVulnerable Code
python if ftype in ('environment', 'credentials', 'configuration'): env_config_files.append(f) print(f" [ENV-CONFIG] {fpath} ({ftype})") elif ftype == 'ci-cd':python if env_config_files: plan["packages"].append({ "package_name": "environment-config-bundle", "description": "Environment files, credentials, and configuration for deployment consistency. Includes .env, config files, credential files, and database configs.", "files": [f["path"] for f in env_config_files], "rationale": "Configuration files must travel with deployment to ensure environment consistency. This bundle includes all environment variables, credentials, and service account keys needed at runtime." })The supporting Skill instructions explicitly require credential files such as private keys and service-account JSON files to be included in the configuration package.
Technical Analysis
The implementation treats entries classified as
credentialsidentically to ordinary environment and configuration files. Their paths are placed inenvironment-config-bundle, which is expressly designed for consumption by a downstream deployment packager.This design violates least privilege and secure secret-management principles. Private keys, environment files, and service-account credentials commonly have narrower access requirements than application configuration. Combining them into a general deployment bundle increases the number of systems, artifacts, and operators that may gain access to those credentials.
The script itself only generates a JSON plan: it does not read credential contents, create an archive, transmit data, ...[truncated 1605 chars]
- Remediation
View remediation
Remediation Suggestions
- Exclude entries classified as
credentialsfrom deployment bundles by default. - Replace secret file paths with references to an approved secret manager, workload identity, or runtime secret-injection mechanism.
- Separate non-sensitive configuration from secrets using distinct package types and access policies.
- Require an explicit allowlist for every file eligible for packaging.
- Canonicalize and validate all paths, then reject paths outside the declared project directory.
- Reject high-risk secret formats such as
.pem,.key,.env, and service-account key files unless an authorized exceptional workflow explicitly approves them. - Require downstream packagers to independently enforce secret exclusions rather than blindly trusting the generated plan.
- Apply least-privilege permissions, encryption, retention limits, and audit logging to any exceptional secret-distribution process.
- Update
SKILL.mdso it instructs users to deploy secret references rather than raw credential files.
- Exclude entries classified as
