Free Microsoft GH-500 Actual Exam Questions - Question 2 Discussion

Question No. 2
– [Use Code Scanning with CodeQL]
Why should you dismiss a code scanning alert?
Select one option, then reveal solution.
US
LP
Liam P.
2026-02-18

It’s A, since you shouldn’t dismiss alerts unless the issue’s actually fixed.

0
LP
Liam P.
2026-02-17

What about A? Fixing the issue seems like the main reason to dismiss alerts.

0
LP
Liam P.
2026-02-12

B tbh doesn't really fit because dismissing alerts to stop new problems sounds off—alerts are meant to catch issues before they happen, not just to be ignored. D is clearly out since production errors need fixing, not dismissal. So between A and C, A feels safer since you want to clear alerts only after actually fixing the code. C could be tempting but test code might sometimes affect other parts unexpectedly, so dismissing without caution isn't ideal.

0
OG
Omar G.
2026-02-12

Makes sense to go with A here. If the underlying problem is fixed, keeping the alert only clutters things and wastes time. C could be risky unless you’re absolutely sure that test code won’t impact anything else, but that’s not always guaranteed. D doesn’t fit because a production error isn’t a reason to dismiss an alert—it’s actually a reason to fix it. So A feels cleaner and safer overall.

0
CJ
Carlos J.
2026-01-16

A imo. If you’ve already fixed the problem the alert flagged, it’s reasonable to dismiss it so it doesn’t keep popping up. C is good too, but dismissing because it’s test code alone doesn’t cover cases where test code might still cause issues downstream. B and D don’t really fit since dismissing alerts to prevent new problems or because of production errors doesn’t align with how code scanning alerts are meant to be handled.

0
CJ
Carlos J.
2026-01-12

I think C makes the most sense since test code errors usually don’t affect the actual app. D feels off because a production error isn’t something you’d just dismiss.

0