Avoid duplicate code
Summary
The source code must not have repeated functions, methods or classes.
Description
The organization must avoid code duplication because it makes maintenance more difficult. If the same functionality is implemented in multiple places and a change is needed, developers must update each instance separately. This increases the likelihood of inconsistencies and introduces the risk of omitting a particular occurrence. In general, repeated functions or methods may lead to inconsistencies in behavior or logic across different parts of the source code.
Supported In
This requirement is verified in following services
Plan | Supported |
---|---|
Essential | 🔴 |
Advanced | 🔴 |
References
- CWE™-474. Use of function with inconsistent implementations
- CWE™-561. Dead code
- OWASP-M TOP 10-M7. Poor code quality
- Agile Alliance-9. Continuous attention to technical excellence and good design
- MITRE ATT&CK®-M1013. Application developer guidance
- ISO/IEC 27002-8_28. Secure coding
- OWASP SAMM-ST. Security Testing
- SIG Lite-SL_89. Is there a formal Software Development Life Cycle (SDLC) process?
- SIG Core-I_2_1. Application security
- ISO/IEC 27001-8_28. Secure coding
Vulnerabilities
Search for vulnerabilities in your apps for free with Fluid Attacks' automated security testing! Start your 21-day free trial and discover the benefits of the Continuous Hacking Essential plan. If you prefer the Advanced plan, which includes the expertise of Fluid Attacks' hacking team, fill out this contact form.