other
- Location
SKILL.md:182- Finding
Security-Related Environment Variable Enumeration
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 182–187
Vulnerability Type: Environment reconnaissance
Risk Level: Mediumbash env | grep -E "API|KEY|TOKEN|SECRET" | sed "s/=.*/=***/" # Linux/macOS # Get-ChildItem Env: | Where-Object {$_.Name -match "API|KEY|TOKEN"} | Format-TableTechnical Analysis
The Skill instructs the Agent to enumerate environment variables whose names contain security-sensitive terms such as
API,KEY,TOKEN, andSECRET. This behavior is unrelated to the core purpose of a task-planning Skill.The Unix command masks values before displaying them, but it still reveals variable names and confirms which credentials or service integrations are present. The PowerShell command displays matching environment-variable objects in a table and does not explicitly redact their values, potentially resulting in direct credential disclosure depending on output formatting.
Because command output can enter the Agent context, execution logs, terminal history, or captured audit records, this instruction creates an unnecessary credential-discovery channel.
Attack Path
- A user or automated workflow follows the configuration-verification instructions.
- The Agent executes the applicable environment-enumeration command.
- The command identifies environment variables associated with API keys, tokens, or secrets.
- On Unix, credential names and their presence are disclosed even though values are masked.
- On PowerShell, matching variable values may also be included in the formatted output.
- The resulting information enters Agent-visible output or logs and may be exposed through later prompts, callbacks, logging, or compromised session context.
Impact Assessment
This issue can disclose the presence and names of credentials for unrelated services. In environments where the PowerShell output includes values, it may also disclose the credentials themselves.
Successful exploitation does not independentl ...[truncated 328 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove broad enumeration of environment variables matching generic secret-related terms.
- Document only the exact environment-variable name required by the Skill.
- Check whether that specific variable is defined without printing its value or name alongside unrelated variables.
- Return only a Boolean configuration status, such as
configuredornot configured. - Avoid placing credential-related command output in Agent context, logs, caches, or execution reports.
- If PowerShell validation remains necessary, access only the documented variable and suppress its value explicitly.
- Apply least privilege by removing the
execcapability if task planning can be implemented through structured local data operations alone.
