other
- Location
SKILL.md:179- Finding
Unnecessary Enumeration of Credential-Related Environment Variables
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 179–184
Vulnerability Type: Environment Reconnaissance
Risk Level: MediumComplete Code Snippet
bash # Verify whether environment variables are configured 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 direct the AI Agent to enumerate the process environment and select variables whose names contain credential-related terms such as
API,KEY,TOKEN, orSECRET.The Unix command masks values before displaying the result, which limits direct secret disclosure. Nevertheless, it reveals the names and presence of credential-bearing variables. The PowerShell alternative similarly lists matching environment variables through
Format-Table; depending on its default rendering and host behavior, it may expose more information than a boolean configuration check requires.This broad inspection violates data-minimization and least-information principles. A weekly-report generator does not need an inventory of unrelated credentials to verify its configuration. The finding is classified as
other: Environment Reconnaissancebecause no listed T01–T09 category precisely describes non-privileged environment discovery without confirmed secret leakage or escalation.Attack Path
- A user asks the Agent to configure or validate the Skill.
- The Agent follows the validation procedure in
SKILL.md. - The Agent executes the Unix or PowerShell environment-enumeration command.
- The command identifies credential-related environment variables across the Agent process.
- Their names—and potentially additional PowerShell-rendered information—are placed in terminal output or conversation context.
- An untrusted party with access ...[truncated 860 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove broad enumeration based on generic terms such as
KEY,TOKEN, andSECRET. - Document the exact environment variable required by the Skill, if any.
- Validate only that explicitly named variable and return a boolean or fixed status message without printing its value.
- Avoid commands that render entire environment-variable objects or tables.
- If no environment variable is genuinely required for local report generation, remove the environment-validation step entirely.
- Keep external API use opt-in and clearly identify each required variable and destination.
A safer Unix presence check would be:
bash if [ -n "${WEEKLY_REPORT_API_KEY:-}" ]; then echo "Required API credential is configured." else echo "Required API credential is not configured." fiA safer PowerShell equivalent would be:
powershell if (Test-Path Env:WEEKLY_REPORT_API_KEY) { Write-Output "Required API credential is configured." } else { Write-Output "Required API credential is not configured." }These checks should use the actual documented variable name and must never print its value.
- Remove broad enumeration based on generic terms such as
