This weakness occurs when code contains comments that flag potential issues, such as bugs, security gaps, or unfinished work, which can expose underlying problems or oversights.
Comments like BUG, HACK, FIXME, TODO, or LITERAL are more than just notes; they act as red flags for developers and security reviewers. They often point directly to areas where security controls, input validation, or proper error handling are missing or incomplete, leaving the code vulnerable. While these comments are sometimes used during development, they become a risk if left in production code, as they can guide attackers to weak spots. Beyond security, these markers can indicate broader code quality issues, such as hard-coded credentials, performance bottlenecks, or the use of insecure methods like dynamic SQL instead of prepared statements. For a developer, systematically reviewing and addressing these comments is a critical step in hardening an application before release, as they serve as an internal map of potential weaknesses that need resolution.
Impact: Quality Degradation
Suspicious comments could be an indication that there are problems in the source code that may need to be fixed and is an indication of poor quality. This could lead to further bugs and the introduction of weaknesses.
java
// TODO: Handle null user condition.* }