Intent-Code Divergence
Medium
- Confidence
- 98% confidence
- Finding
- The example labeled as the safe refactor still maps the error conditions to the wrong exception types: the unauthorized case raises a wrong-encoding error, and the encoding failure raises an unauthorized error. In a security-review skill, incorrect "safe" examples are dangerous because users may copy them directly, leading to misclassified auth failures, bypass-like logic confusion, and weakened incident detection or auditing.
