other
- Location
SKILL.md:188- Finding
Sensitive Environment Variable Enumeration May Expose Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 188–195
Vulnerability Type: Sensitive Environment Information Enumeration
Risk Level: MediumVulnerable Code
bash # Verify whether environment variables are set echo "Configuration check:" env | grep -E "API|KEY|TOKEN|SECRET" | sed "s/=.*/=***/" # Linux/macOS # Or PowerShell # Get-ChildItem Env: | Where-Object {$_.Name -match "API|KEY|TOKEN"} | Format-TableTechnical Analysis
The configuration-validation instructions broadly enumerate process environment variables whose names contain credential-related terms. This is not limited to variables required by the Skill.
The Linux/macOS command masks values before displaying its results, but still reveals the names and presence of potentially sensitive credentials. More seriously, the PowerShell command passes matching environment-variable objects to
Format-Table, which normally displays both their names and values. Consequently, API keys, access tokens, or other secrets may be exposed in terminal output and the Agent's context.The Skill does not instruct the Agent to transmit these results externally. Therefore, this is an information-exposure risk caused by unsafe validation guidance, not confirmed credential exfiltration.
Attack Path
- A user or Agent loads the Skill and follows its environment-validation procedure.
- The Agent executes the provided command in a process containing API keys or access tokens.
- The command searches the entire environment for broadly matching names.
- On PowerShell, matching secret values are displayed without redaction; on Linux/macOS, sensitive variable names are disclosed.
- The output may enter the Agent context, terminal history, execution logs, transcripts, screenshots, or other diagnostic records.
- Any party with access to those records may recover the exposed information and, where values were disclosed, use the associated credentials within their existing permissions. ...[truncated 543 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove broad enumeration based on patterns such as
API,KEY,TOKEN, andSECRET. - Check only explicitly required environment-variable names.
- Return only whether each required variable is present; never print its value.
- Ensure diagnostic logs, Agent messages, and command output redact secrets by default.
- Use platform-specific presence checks, for example:
bash if [ -n "${EXPECTED_API_KEY+x}" ]; then echo "EXPECTED_API_KEY is configured" else echo "EXPECTED_API_KEY is not configured" fipowershell if ($null -ne $env:EXPECTED_API_KEY -and $env:EXPECTED_API_KEY.Length -gt 0) { Write-Output "EXPECTED_API_KEY is configured" } else { Write-Output "EXPECTED_API_KEY is not configured" }- Document the exact variables required by the Skill and apply least-exposure principles to all configuration diagnostics.
- Remove broad enumeration based on patterns such as
