T09 · Insecure Skill Coding Practices
- Location
SKILL.md:53- Finding
Unredacted Disclosure of Environment and Terraform Configuration Values
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 53–56 and 64–66
Vulnerability Type: Plaintext sensitive-data exposure
Risk Level: MediumVulnerable Code
bash # Compare .env files across environments for f in .env.development .env.staging .env.production; do if [[ -f "$f" ]]; then echo "=== $f ===" grep -v '^#' "$f" | grep -v '^$' | sort fi donebash # Compare tfvars across environments for f in terraform/environments/*/terraform.tfvars; do echo "=== $f ===" cat "$f" doneTechnical Analysis
The documented commands print complete values from environment files and Terraform variable files without identifying or redacting sensitive keys. Such files commonly contain database connection strings, passwords, API keys, access tokens, private endpoints, and other deployment credentials.
The output can be copied into an AI agent's context, terminal output, CI logs, audit artifacts, or generated reports. Reading complete values is unnecessary when the objective is configuration-parity analysis: key names, presence, metadata, or non-reversible fingerprints are generally sufficient.
Although the Skill does not transmit this information to an external service itself, its instructions create a direct plaintext disclosure channel. The exposure is limited to configuration files readable by the account executing the commands.
Attack Path
- A configuration file such as
.env.productionorterraform.tfvarscontains a secret value. - A user or agent follows the Skill's configuration extraction instructions.
greporcatprints the complete secret to standard output.- The output is retained in an agent transcript, terminal capture, CI log, report, or other operational record.
- A user with access to that record obtains and potentially reuses the exposed credential against its associated service.
Impact Assessment
An attacker does not receive new operating-system privileges directly from these ...[truncated 470 chars]
- A configuration file such as
- Remediation
View remediation
Remediation Suggestions
- Do not print complete configuration values by default.
- Extract and compare key names separately from values.
- Redact keys matching sensitive patterns such as
PASSWORD,SECRET,TOKEN,API_KEY,PRIVATE_KEY,CREDENTIAL, andDATABASE_URL. - When value comparison is required, compare keyed cryptographic hashes instead of plaintext values.
- Avoid including raw secrets in generated reports, AI prompts, CI logs, or build artifacts.
- Require explicit user confirmation before displaying any sensitive value.
- Configure CI systems to mask known secrets and restrict access to drift-analysis output.
- Replace the examples with a redaction-aware parser that preserves syntax and reports only whether values match.
Example safe output should resemble:
text DATABASE_PASSWORD=[REDACTED; values differ] LOG_LEVEL=info API_TOKEN=[REDACTED; values match]
