other
- Location
SKILL.md:159- Finding
Overbroad Environment Variable Enumeration May Expose Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 159–166
Vulnerability Type: Environment reconnaissance and sensitive-data exposure
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 validation procedure searches the entire process environment for variable names containing
API,KEY,TOKEN, orSECRET, although the skill only declares a need forFEISHU_APP_IDandFEISHU_APP_SECRET.On Linux and macOS,
sedmasks values before displaying the results, but it still discloses the names and presence of unrelated credentials. The PowerShell alternative passes complete matching environment-variable objects toFormat-Table; depending on normal PowerShell formatting behavior, this may print both names and values. Those values could consequently enter the agent transcript, terminal history, execution logs, or other monitoring systems.No credential transmission or external exfiltration mechanism was found in the supplied package. The risk is local disclosure to the agent session and any systems that retain its output.
Attack Path
- A user loads the skill and follows its environment-validation instructions.
- The agent receives permission to use
execand runs one of the documented commands. - The command examines the complete environment rather than only the two required Feishu variables.
- Names of unrelated sensitive variables are exposed on Unix-like systems.
- If the PowerShell alternative is used, matching credential values may also be displayed.
- The disclosed information may persist in the agent conversation, command output, or operational logs.
Impact Assessment
The issue does not grant ad ...[truncated 472 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove environment-wide matching for generic terms such as
API,KEY,TOKEN, andSECRET. - Validate only
FEISHU_APP_IDandFEISHU_APP_SECRET. - Return only boolean presence status; never print credential values.
- Use explicit allowlists in both shell variants.
- Ensure execution output containing configuration metadata is not retained longer than necessary.
- Add automated documentation checks that reject commands enumerating broad classes of sensitive environment variables.
A safer Unix-like validation pattern is:
bash [ -n "${FEISHU_APP_ID:-}" ] && echo "FEISHU_APP_ID: configured" || echo "FEISHU_APP_ID: missing" [ -n "${FEISHU_APP_SECRET:-}" ] && echo "FEISHU_APP_SECRET: configured" || echo "FEISHU_APP_SECRET: missing"A safer PowerShell equivalent is:
powershell Write-Output "FEISHU_APP_ID: $(if ($env:FEISHU_APP_ID) {'configured'} else {'missing'})" Write-Output "FEISHU_APP_SECRET: $(if ($env:FEISHU_APP_SECRET) {'configured'} else {'missing'})"- Remove environment-wide matching for generic terms such as
