T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:6
- Finding
- Unnecessary Exposure of AADE Account Credentials Through Process Environment Variables## Vulnerability Details **File Location**: `SKILL.md`, line 6 and lines 13-18 **Vulnerability Type**: Sensitive credential exposure and excessive secret collection **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: {"openclaw": {"requires": {"bins": ["jq", "curl"], "env": ["OPENCLAW_DATA_DIR", "AADE_USERNAME", "AADE_PASSWORD"]}, "optional_env": {"SLACK_WEBHOOK_URL": "Webhook URL for urgent AADE change alerts", "SMS_GATEWAY_URL": "SMS gateway for critical compliance alerts", "GOOGLE_CALENDAR_ID": "Google Calendar ID for compliance deadline sync (optional)", "OUTLOOK_CALENDAR_ID": "Outlook Calendar ID for compliance deadline sync (optional)"}, "notes": "AADE credentials required for monitoring government portal. Slack and SMS alert channels are optional — if not configured, alerts are written to local files only."}} ``` ```bash export OPENCLAW_DATA_DIR="/data" export AADE_USERNAME="your-aade-username" export AADE_PASSWORD="your-aade-password" which jq curl || sudo apt install jq curl ``` ### Technical Analysis The skill declares an AADE username and password as mandatory environment variables and instructs users to export them into the process environment. However, the documented monitoring workflows identify only public government websites and public information such as announcements, deadlines, regulations, and system status. The project does not contain executable code or identify an authenticated endpoint that requires these credentials. Collecting high-value government account credentials without a demonstrated functional requirement violates least-secret and data-minimization principles. Environment variables are also an unsuitable broad secret boundary because they may be inherited by OpenClaw child processes, integrations, command-line utilities, or other components launched from the same runtime. Diagnostic or process-inspection facilities may expose them as well, depending on the host configuration. No direct credential theft or exfilt ...[truncated 1591 chars]
- Remediation
- ## Remediation Suggestions 1. Remove `AADE_USERNAME` and `AADE_PASSWORD` from the mandatory environment requirements when monitoring public announcements, deadlines, regulations, and service availability. 2. Clearly document which exact feature and authenticated endpoint require credentials before collecting any secret. 3. If authentication is genuinely necessary, make it optional and separate authenticated functionality from public monitoring. 4. Use a dedicated secret manager, operating-system credential store, or narrowly scoped credential provider rather than process-wide environment variables. 5. Prefer revocable, read-only, least-privilege tokens over a primary AADE account password whenever the service supports them. 6. Pass secrets only to the specific process that requires them and explicitly remove sensitive variables from unrelated child-process environments. 7. Never include credential values in command output, logs, diagnostics, crash reports, cached files, or audit trails. 8. Define secret rotation, revocation, expiration, and incident-response procedures. 9. Add implementation tests confirming that monitoring public sources works without AADE credentials and that optional authenticated secrets cannot propagate to unrelated integrations.
