GH-500 · Question #12
What is the best method to ensure all new code is scanned for vulnerabilities?
The correct answer is B. Configure code scanning. Configuring code scanning (B) is the best method to ensure all new code is automatically analyzed for vulnerabilities. Code scanning integrates into the pull request workflow via GitHub Actions (using tools like CodeQL), scanning every code change before it is merged. Adding an…
Question
What is the best method to ensure all new code is scanned for vulnerabilities?
Options
- AAdd the extended suite.
- BConfigure code scanning.
- CSet up a security policy.
- DConfigure code owners.
How the community answered
(39 responses)- A5% (2)
- B90% (35)
- C3% (1)
- D3% (1)
Explanation
Configuring code scanning (B) is the best method to ensure all new code is automatically analyzed for vulnerabilities. Code scanning integrates into the pull request workflow via GitHub Actions (using tools like CodeQL), scanning every code change before it is merged. Adding an extended query suite (A) enhances code scanning coverage but is a secondary configuration step, not the foundational setup. A security policy (C) documents reporting procedures but does not scan code. Code owners (D) manage review assignments, not vulnerability detection.
Topics
Community Discussion
No community discussion yet for this question.