GitHub GH-500 sample questions with explanations, traps, topic labels, and IT Mastery route links.
These original sample questions are designed to help you check how the exam topics appear in decision-style prompts. They are not taken from the live exam.
Use these sample questions as a guided self-assessment for GitHub Advanced Security (GH-500) topics such as secret scanning, code scanning, CodeQL, dependency review, Dependabot alerts, workflow security, security policies, and alert triage. The prompts focus on reducing software risk without turning scanning tools into checkbox activity.
The sample set below is part of the GitHub Advanced Security GH-500 guide path:
Work through each prompt before opening the explanation. Strong answers usually combine the right detection feature with ownership, triage, and remediation workflow.
Topic: Responding to a leaked token alert
Secret scanning raises an alert for a cloud token committed to a private repository. The developer deletes the line and closes the pull request. What is the strongest next action?
Best answer: B
Explanation: Secret exposure is a credential-risk problem, not just a code-diff problem. The key must be invalidated or rotated, possible usage should be checked, and the alert should remain part of the remediation record.
Why the other choices are weaker:
What this tests: Secret scanning response, credential rotation, alert ownership, and remediation evidence.
Related topics: Secret scanning; Credential rotation; Alert triage; Remediation
Topic: Customizing code scanning
A security team uses code scanning but repeatedly misses a risky in-house API pattern. The pattern is specific to the company’s framework and is not flagged by the default rules. What is the best improvement?
Best answer: C
Explanation: Code scanning can be tuned with CodeQL queries so an organization can detect patterns that matter to its codebase. The important decision is adapting scanning to real risk, not abandoning automation.
Why the other choices are weaker:
What this tests: Code scanning customization, CodeQL, default rules versus custom risk, and scalable detection.
Related topics: Code scanning; CodeQL; Custom queries; Secure coding
Topic: Reviewing dependency risk in a pull request
A pull request adds a new package version. The team wants reviewers to see whether the dependency introduces known vulnerabilities or license concerns before merge. Which feature is the closest fit?
Best answer: D
Explanation: Dependency review is designed to surface dependency changes and risk in the pull request review flow. It supports decision-making before the vulnerable or policy-breaking dependency is merged.
Why the other choices are weaker:
What this tests: Dependency review, pull request gates, vulnerability awareness, and policy-driven review.
Related topics: Dependency review; Vulnerabilities; Pull requests; Policy
Tech Exam Lexicon and IT Mastery are independent study tools. They are not affiliated with, endorsed by, or sponsored by GitHub or any certification body.