T09 · Insecure Skill Coding Practices
- Location
references/schema.md:8- Finding
Hardcoded and Unmasked Financial Account Identifiers
- Content
View full analysis
- Remediation
View remediation
str: value = str(value) return f"****{value[-4:]}" if len(value) >= 4 else "****" ``` 4. Return a non-sensitive display label or alias where possible instead of an account number. 5. Apply redaction before JSON serialization so every output mode receives the same protection. 6. Minimize transaction fields according to the caller's question rather than returning every available field. 7. Prevent raw financial results from being written to persistent debug logs, telemetry, or long-term agent memory. 8. Add automated tests that fail if output contains an unmasked account-number pattern. 9. Review repository history and distributed copies for previously committed identifiers and rotate or invalidate identifiers if exposure warrants it. ]]>
