CWEweakness
CWE-1078 Inappropriate Source Code Style or Formatting
- Abstraction
- Class
- Structure
- Simple
- Status
- Incomplete
- Languages
- Not Language-Specific
- CWE version
- 5.0
Description
The source code does not follow
desired style or formatting for indentation, white
space, comments, etc.
Common consequences
• Other: Increase Analytical Complexity — Variations in indentation and other white space,
comments, etc. can make it more difficult for human
analysts to understand the actual behavior that is
being implemented.
Detection methods
• Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
• Automated Static Analysis - Source Code: An Integrated Development Environment (IDE) or linter can report or highlight this weakness.
Related
Child of · CWE (1)
- CWE-1076 Insufficient Adherence to Expected Conventions weakness
Referenced by CVE · weakness (1)
- CVE-2024-0667 The Form Maker by 10Web – Mobile-Friendly Drag & Drop Contact Form Builder plugin for WordPress is vulnerable to Cross-Site Request Forgery… vulnerability
Referenced by CWE · child of (12)
- CWE-1085 Invokable Control Element with Excessive Volume of Commented-out Code weakness
- CWE-1099 Inconsistent Naming Conventions for Identifiers weakness
- CWE-1106 Insufficient Use of Symbolic Constants weakness
- CWE-1107 Insufficient Isolation of Symbolic Constant Definitions weakness
- CWE-1109 Use of Same Variable for Multiple Purposes weakness
- CWE-1113 Inappropriate Comment Style weakness
- CWE-1114 Inappropriate Whitespace Style weakness
- CWE-1115 Source Code Element without Standard Prologue weakness
- CWE-1116 Inaccurate Source Code Comments weakness
- CWE-1117 Callable with Insufficient Behavioral Summary weakness
- CWE-546 Suspicious Comment weakness
- CWE-547 Use of Hard-coded, Security-relevant Constants weakness