BaseIncomplete

CWE-1041Use of Redundant Code

Category: other

Description

The product has multiple functions, methods, procedures, macros, etc. that contain the same code.

Common consequences· 1

  • Other — Reduce Maintainability
    This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. For example, if there are two copies of the same code, the programmer might fix a weakness in one copy while forgetting to fix the same weakness in another copy.

Potential mitigations· 1

  • [Implementation]Merge common functionality into a single function and then call that function from across the entire code base.

References

  1. https://cwe.mitre.org/data/definitions/1041.html

Related by meaning· 6

Nearest entities by semantic similarity across the cs-graph corpus.

CWE
Excessive Use of Self-Modifying Code
CWE
Use of Same Invokable Control Element in Multiple Architectural Layers
CWE
Use of Prohibited Code
CWE
Improper Adherence to Coding Standards
CWE
Incomplete Design Documentation
CWE
Insufficient Isolation of System-Dependent Functions
Sourced from MITRE CWE 4.20. Curated for EU compliance use cases by Adam Lundqvist, Founder at SQUR.