Intent-Code Divergence
Medium
- Confidence
- 98% confidence
- Finding
- This is a true issue in the guidance: the example claims to prevent log injection, but the sanitizer explicitly preserves newline and tab characters. Newlines are a primary vehicle for log forging and record-splitting attacks, so readers who copy this code may still allow attackers to inject fake log entries or corrupt downstream parsing and monitoring.
