nerdexam
Microsoft

GH-500 · Question #79

Why should you dismiss a code scanning alert?

The correct answer is C. if it includes an error in code that is used only for testing. You should dismiss a code scanning alert if the flagged code is not a true security concern, such *-> Code in test files Code paths that are unreachable or safe by design False positives from the scanner Fixing the code would automatically resolve the alert - not dismiss it…

Describe GitHub Advanced Security best practices, results, and how to take corrective measures

Question

Why should you dismiss a code scanning alert?

Options

  • Aif you fix the code that triggered the alert
  • Bto prevent developers from introducing new problems
  • Cif it includes an error in code that is used only for testing
  • Dif there is a production error in your code

How the community answered

(50 responses)
  • A
    4% (2)
  • B
    2% (1)
  • C
    92% (46)
  • D
    2% (1)

Explanation

You should dismiss a code scanning alert if the flagged code is not a true security concern, such *-> Code in test files Code paths that are unreachable or safe by design False positives from the scanner Fixing the code would automatically resolve the alert - not dismiss it. Dismissing is for valid exceptions or noise reduction.

Topics

#Code Scanning Alerts#Alert Dismissal#False Positives#Test Code

Community Discussion

No community discussion yet for this question.

Full GH-500 Practice