T09 · Insecure Skill Coding Practices
- Location
SKILL.md:32- Finding
Credentials and bearer tokens may be exposed through command-line arguments and terminal output
- Content
View full analysis
- Remediation
View remediation
&2 jq -n \ --arg username "$OPENPROVIDER_USERNAME" \ --arg password "$OP_PASS" \ '{username: $username, password: $password}' | curl --fail-with-body --silent --show-error \ -X POST https://api.openprovider.eu/v1beta/auth/login \ -H "Content-Type: application/json" \ --data-binary @- | jq -r '.data.token' ``` 3. Avoid credential-testing examples that print the full response. Return only a success/failure result and reseller identifier, while explicitly removing the token: ```bash # Process the response without printing data.token. jq '{code, desc, reseller_id: .data.reseller_id}' ``` 4. Ensure application and agent logs redact `password`, `Authorization`, `token`, transfer authorization codes, and other sensitive fields. 5. Disable shell tracing around authentication. Documentation should explicitly warn against `set -x` and verbose `curl` output. 6. Store cached tokens only in process memory, never in persistent logs or world-readable files, and clear them on logout, credential rotation, or authentication failure. 7. Use an OpenProvider identity with the narrowest available account permissions. Separate read-only lookup functionality from identities allowed to purchase, modify, transfer, or delete resources. 8. Rotate credentials and invalidate active tokens if the documented commands have previously been executed in recorded terminals or CI/CD environments. ]]>
