T09 · Insecure Skill Coding Practices
- Location
SKILL.md:160- Finding
Overbroad Enumeration and Exposure of Credential-Related Environment Variables
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 160–164
Vulnerability Type: Credential exposure through overbroad environment-variable enumeration
Risk Level: MediumVulnerable Code
bash # Verify environment variables 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 connection check only needs to determine whether
JIRA_PATandJIRA_URLare configured. Instead, the documented commands enumerate all process environment variables whose names contain broad credential-related terms such asAPI,KEY,TOKEN, orSECRET.The Linux/macOS command replaces values before displaying its output, which reduces direct disclosure but still reveals the names and presence of unrelated credentials. More seriously, the PowerShell alternative sends matching environment-variable objects to
Format-Tablewithout redacting their values. It can therefore print unrelated API keys, access tokens, and secrets into the terminal and Agent context.This violates least-data-access principles and unnecessarily exposes credentials unrelated to Jira. No evidence shows that the Skill transmits these values to an external system, so active credential exfiltration is not established.
Attack Path
- A user configures the Skill in an environment that also contains credentials for unrelated services.
- The user or Agent follows the documented configuration-validation instructions.
- The broad name filter selects all environment variables containing
API,KEY,TOKEN,SECRET, or equivalent terms. - On PowerShell,
Format-Tablemay display both the names and values of the matching variables without redaction. - The exposed values enter terminal output and potentially the Agent transcript, model context, logs, screenshots, ...[truncated 859 chars]
- Remediation
View remediation
Remediation Suggestions
Replace broad environment enumeration with exact presence checks for only the variables required by the Skill. Do not print their values.
For Linux/macOS:
bash if [ -n "${JIRA_PAT:-}" ]; then echo "JIRA_PAT is set" else echo "JIRA_PAT is not set" fi if [ -n "${JIRA_URL:-}" ]; then echo "JIRA_URL is set" else echo "JIRA_URL is not set" fiFor PowerShell:
powershell if ([string]::IsNullOrEmpty($env:JIRA_PAT)) { Write-Output "JIRA_PAT is not set" } else { Write-Output "JIRA_PAT is set" } if ([string]::IsNullOrEmpty($env:JIRA_URL)) { Write-Output "JIRA_URL is not set" } else { Write-Output "JIRA_URL is set" }Additional hardening measures:
- Never use
env,set,Get-ChildItem Env:, or similar global enumeration commands for credential validation. - Ensure Agent transcripts and command logs do not retain authentication headers or secret values.
- Keep Jira PAT permissions limited to the projects and operations required by the user.
- Rotate any credential that may already have appeared in terminal output, Agent history, or logs.
- Preserve redaction at every output boundary, including error messages and debug logs.
- Never use
