Microsoft GitHub Advanced Security GH-500 Exam Questions

Page: 1 / 14
Total 125 questions
Question 1

Which details do you have to provide to create a custom pattern for secret scanning? (Each answer presents part of the solution. Choose two.)



Answer : A, B

When defining a custom pattern for secret scanning, two key fields are required:

Name of the pattern: A unique label to identify the pattern

Secret format: A regular expression that defines what the secret looks like (e.g., token format)

You can optionally specify additional match requirements (like required context keywords), but they're not mandatory. Listing repositories is also not part of the required fields during pattern creation.


==========

Question 2

Which alerts do you see in the repository's Security tab? (Each answer presents part of the solution. Choose three.)



Answer : B, C, E

In a repository's Security tab, you can view:

Secret scanning alerts: Exposed credentials or tokens

Dependabot alerts: Vulnerable dependencies from the advisory database

Code scanning alerts: Vulnerabilities in code detected via static analysis (e.g., CodeQL)

You won't see general 'security status alerts' (not a formal category) or permission-related alerts here.


==========

Question 3

If default code security settings have not been changed at the repository, organization, or enterprise level, which repositories receive Dependabot alerts?



Answer : C

By default, no repositories receive Dependabot alerts unless configuration is explicitly enabled. GitHub does not enable Dependabot alerts automatically for any repositories unless:

The feature is turned on manually

It's configured at the organization or enterprise level via security policies

This includes public, private, and enterprise-owned repositories --- manual activation is required.


==========

Question 4

Secret scanning will scan:



Answer : C

Secret scanning is a feature provided by GitHub that scans the contents of your GitHub repositories for known types of secrets, such as API keys and tokens. It operates within the GitHub environment and does not scan external systems, services, or repositories outside of GitHub. Its primary function is to prevent the accidental exposure of sensitive information within your GitHub-hosted code.

References: GitHub Docs -- About secret scanning


Question 5

Assuming that no custom patterns are configured, what type of secret is detected by secret scanning?



Answer : C

GitHub secret scanning is designed to identify credentials and other sensitive values that match supported secret patterns. Among the options listed, private keys are the supported secret type. GitHub classifies private keys such as RSA, OpenSSH, EC, and PGP private keys as generic secret patterns. These are distinct from organization-specific custom patterns, which administrators create by defining their own regular expressions. Usernames and general PII are not treated as standard secret-scanning credential patterns, while ''sealed boxes'' are not a supported secret category. In current GitHub terminology, generic-pattern detection is separately configurable, so it may need to be enabled for the repository. Nevertheless, of the choices presented, private keys are the valid secret-scanning type.


Question 6

Dependabot has created a pull request. Which of the following commands should you use in a comment to prevent Dependabot from re-creating the same pull request?



Answer : B

The command @dependabot ignore this dependency closes the current Dependabot pull request and creates an ignore condition that prevents Dependabot from opening additional pull requests for that dependency. The restriction remains until the pull request is reopened or the dependency is manually upgraded to the suggested version. @dependabot recreate performs the opposite action: it recreates the pull request and overwrites edits made to it. @dependabot rebase rebases the Dependabot pull request against the current target branch. GitHub does not document @dependabot close as the command for permanently suppressing the dependency update. GitHub also provides more granular commands to ignore only a major, minor, or patch version when permanent dependency-level suppression would be too broad.


Question 7

Which of the following steps should you follow to integrate CodeQL into a third-party continuous integration system? (Each answer presents part of the solution. Choose three.)



Answer : B, C, D

When integrating CodeQL outside of GitHub Actions (e.g., in Jenkins, CircleCI):

Install the CLI: Needed to run CodeQL commands.

Analyze code: Perform the CodeQL analysis on your project with the CLI.

Upload scan results: Export the results in SARIF format and use GitHub's API to upload them to your repo's security tab.

You don't need to write custom queries unless extending functionality. ''Processing alerts'' happens after GitHub receives the results.


==========

Page:    1 / 14   
Total 125 questions