T09 · Insecure Skill Coding Practices
- Location
scripts/merge_easyclaw_config.py:76- Finding
Authentication Tokens Are Disclosed in Migration Output
- Content
View full analysis
{new!r}') ``` ### Technical Analysis The migration list explicitly includes `gateway.auth.token`. When that value differs between the source and target configurations, the script adds the original and replacement values to `changes`. Lines 76–78 then print both values using their raw `repr` representations. No path-sensitive redaction is applied before the values are written to standard output. This behavior affects both dry-run and `--apply` execution. It also conflicts with the sensitive-data handling requirement in `SKILL.md`, which directs the Skill to redact tokens, secrets, and authentication blobs. Although the reporting script contains a redaction function, that protection is not reused by the migration script. ### Attack Path 1. An EasyClaw bridge configuration contains a `gateway.auth.token`. 2. The active OpenClaw configuration either contains a different token or does not contain the field. 3. A user or Agent runs the documented command: ```bash python3 scripts/merge_easyclaw_config.py ``` or: ```bash python3 scripts/merge_easyclaw_config.py --apply ``` 4. The script prints the existing and replacement token values in plaintext. 5. An attacker with access to the terminal transcript, Agent conversation, CI output, centralized logs, or captured process output retrieves the token. 6. If the t ...[truncated 679 chars]- Remediation
View remediation
-> ') ``` 3. Introduce a shared redaction function and apply it to every diagnostic, dry-run, error, and success output path. 4. Prefer an explicit sensitive-path allowlist because field-name substring matching can miss unusually named credentials. 5. Add automated tests verifying that known token values never appear in captured standard output or standard error during dry-run and apply operations. 6. Rotate any gateway tokens that may already have been exposed through prior migration logs. ]]>
