CompTIA SecurityX (CAS-005) — Question 173

A developer receives feedback about code quality and efficiency. The developer needs to identify and resolve the following coding issues before submitting the code changes for peer review:

• Indexing beyond arrays
• Dereferencing null pointers
• Potentially dangerous data type combos
• Unreachable code
• Non-portable constructs

Which of the following would be most appropriate for the developer to use in this situation?

Answer options

Correct answer: A

Explanation

Linting is the most suitable tool for this situation as it analyzes code for potential errors, including indexing beyond arrays and dereferencing null pointers. The other options, such as SBoM and Software composition analysis, focus on software components and dependencies, while DAST is used for security testing on running applications, making them less relevant for the specified coding issues.