GitHub Advanced Security GHAS Exam Questions and Answers
Question 21
After investigating a code scanning alert related to injection, you determine that the input is properly sanitized using custom logic. What should be your next step?
Options:
A.
Draft a pull request to update the open-source query.
B.
Ignore the alert.
C.
Open an issue in the CodeQL repository.
D.
Dismiss the alert with the reason "false positive."
Answer:
D
Explanation:
When you identify that a code scanning alert is a false positive—such as when your code uses a custom sanitization method not recognized by the analysis—you should dismiss the alert with the reason "false positive." This action helps improve the accuracy of future analyses and maintains the relevance of your security alerts.
As per GitHub's documentation:
"If you dismiss a CodeQL alert as a false positive result, for example because the code uses a sanitization library that isn't supported, consider contributing to the CodeQL repository and improving the analysis."
By dismissing the alert appropriately, you ensure that your codebase's security alerts remain actionable and relevant.
Question 22
What are Dependabot security updates?
Options:
A.
Automated pull requests that help you update dependencies that have known vulnerabilities
B.
Automated pull requests that keep your dependencies updated, even when they don’t have any vulnerabilities
C.
Automated pull requests to update the manifest to the latest version of the dependency
D.
Compatibility scores to let you know whether updating a dependency could cause breaking changes to your project
Answer:
A
Explanation:
Dependabot security updatesareautomated pull requeststriggered when GitHub detects avulnerabilityin a dependency listed in your manifest or lockfile. These PRs upgrade the dependency to theminimum safe versionthat fixes the vulnerability.
This is separate from regular updates (which keep versions current even if not vulnerable).
[: GitHub Docs – About Dependabot Security Updates, ==========]