Detect Declaration of Variable with Unnecessarily Wide Scope with Automated Static Analysis
Documented detection approaches include Automated Static Analysis; recorded impacts include Reduce Maintainability, and Increase Analytical Complexity; related weaknesses include CWE-710. Use these source-defined anchors to turn CWE-1126 into implementation, review, and verification checks for the affected component.
CWE-1126: Declaration of Variable with Unnecessarily Wide Scope — MITRE CWE