Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Design a strategy for security, vulnerability, and compliance scanning

A worked example

Single answer

An Azure Repos repository has GitHub Advanced Security enabled. Its security team is designing a merge gate with these requirements:

  • Existing critical and high alerts are accepted temporarily and must not block merges.
  • A proposed change that introduces a critical or high vulnerability must be blocked before merging.
  • Security findings must be assessed for the proposed changes.

The scanning pipeline publishes findings, but a vulnerability finding does not itself make the pipeline's build result unsuccessful.

Which merge-gate strategy meets these requirements?

Choose one answer
Why

Use AdvancedSecurity/NewHighAndCritical to block newly introduced critical and high vulnerabilities while allowing the accepted backlog to remain. This check requires a build validation policy that runs Advanced Security tasks for the pull request. Requiring build success alone would not enforce the security requirement with this pipeline's behavior.

  • Correct: Require AdvancedSecurity/NewHighAndCritical and build validation that runs Advanced Security tasks against the PR branch. The source identifies this check as the gate for new critical and high vulnerabilities without requiring existing findings to be resolved. The build validation policy runs the Advanced Security tasks for the pull request and satisfies the check's prerequisite.
  • Not correct: Require the scanning pipeline's successful build status and build validation that runs Advanced Security tasks against the PR branch. A successful build can still contain vulnerability findings under the stated pipeline behavior. The source describes Advanced Security status checks as the mechanism that evaluates security results and can block merging based on those findings.
  • Not correct: Require AdvancedSecurity/NewHighAndCritical and scheduled validation that runs Advanced Security tasks against the default branch. Scheduled default-branch scans do not satisfy the build validation requirement or assess each proposed change before it merges.
  • Not correct: Require AdvancedSecurity/AllHighAndCritical and build validation that runs Advanced Security tasks against the PR branch. The source states that AdvancedSecurity/AllHighAndCritical requires resolution of critical and high alerts across the repository. It would therefore make the accepted backlog a barrier to merging.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free