CSSLP · Question #397
A payments startup measures defects per thousand lines of code across its repositories to monitor code quality. Which category of software assessment does that metric represent?
The correct answer is D. Static code analysis. Measuring "defects per thousand lines of code" is a metric commonly derived from static code analysis, which involves examining source code without execution to identify quality issues.
Question
A payments startup measures defects per thousand lines of code across its repositories to monitor code quality. Which category of software assessment does that metric represent?
Options
- AVulnerability scanning
- BCode review
- CThreat modeling
- DStatic code analysis
How the community answered
(32 responses)- A3% (1)
- B3% (1)
- D94% (30)
Why each option
Measuring "defects per thousand lines of code" is a metric commonly derived from static code analysis, which involves examining source code without execution to identify quality issues.
Vulnerability scanning typically refers to scanning deployed applications or networks for known vulnerabilities, not primarily measuring code defects per line in source code.
Code review is a manual process where developers inspect each other's code, which can find defects but doesn't automatically generate "defects per thousand lines of code" as a direct, automated metric.
Threat modeling is a structured approach to identify potential threats, vulnerabilities, and counter-measures for a system, not a method for directly quantifying code defects per line.
Static code analysis (SCA) is a method of examining source code, bytecode, or binary code without executing the program, primarily to detect defects, security vulnerabilities, and adherence to coding standards. Tools for SCA can quantify metrics like defects per thousand lines of code (DLOC or KLOC) by systematically scanning the codebase for patterns indicating potential issues.
Concept tested: Static code analysis metrics
Source: https://owasp.org/www-project-static-analysis-security-testing-guide/latest/
Topics
Community Discussion
No community discussion yet for this question.