GitHub Advanced Security GH-500 Exam Dumps & Practice Test
GitHub Advanced Security Questions 36–40 (page: 9)

Updated On: 16-Nov-2026

Secret scanning will ignore a secret_scanning.yml file that

  1. contains 1,000 or more entries.
  2. has 1,000 or more directories
  3. is 1 MB or larger
  4. is 100 KB or larger.

Answer(s): C

Explanation:

Excluding folders and files from secret scanning
You can customize secret scanning to automatically close alerts for secrets found in specific directories or files by configuring a secret_scanning.yml file in your repository.
* If there are more than 1,000 entries in paths-ignore, secret scanning will only exclude the first 1,000 directories from scans.
*-> If secret_scanning.yml is larger than 1 MB, secret scanning will ignore the entire file.


Reference:

https://docs.github.com/en/code-security/secret-scanning/using-advanced-secret-scanning-and-push-protectio n-features/excluding-folders-and-files-from-secret-scanning



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

  1. private repositories
  2. none
  3. repositories owned by an organization
  4. repositories owned by an enterprise account

Answer(s): B

Explanation:

When Dependabot detects vulnerable dependencies in your repositories, we generate a Dependabot alert and display it on the Security tab for the repository. GitHub notifies the maintainers of affected repositories about the new alert according to their notification preferences. Dependabot is enabled by default on all public repositories, and needs to be enabled on private repositories.
Note:
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.


Reference:

https://docs.github.com/en/code-security/dependabot/dependabot-alerts/configuring-notifications-for-dependab ot-alerts



How would you build your code within the CodeQL analysis workflow? Each answer presents a complete solution. (Choose two.)

  1. Upload compiled binaries.
  2. Use CodeQL’s autobuild action.
  3. Use jobs.analyze.runs-on.
  4. Use CodeQL’s init action.
  5. Ignore paths.
  6. Implement custom build steps.

Answer(s): B,D

Explanation:

[B] Build Modes
The CodeQL Action supports different build modes for analyzing the source code. The available build modes are:
none: The database will be created without building the source code. Available for all interpreted languages and some compiled languages.
*-> autobuild: The database will be created by attempting to automatically build the source code. Available for all compiled languages.
manual: The database will be created by building the source code using a manually specified build command. To use this build mode, specify manual build steps in your workflow between the init and analyze steps. Available for all compiled languages.
[D] Actions
This repository contains several actions that enable you to analyze code in your repository using CodeQL and upload the analysis to GitHub Code Scanning. Actions in this repository also allow you to upload to GitHub analyses generated by any SARIF-producing SAST tool.
Actions for CodeQL analyses:
*-> init: Sets up CodeQL for analysis.
analyze: Finalizes the CodeQL database, runs the analysis, and uploads the results to Code Scanning.


Reference:

https://github.com/github/codeql-action



You are managing code scanning alerts for your repository. You receive an alert highlighting a problem with data flow.
What do you click for additional context on the alert?

  1. Show paths
  2. Code scanning alerts
  3. Security

Answer(s): A

Explanation:

When dealing with a data flow issue in a code scanning alert, clicking on "Show paths" provides a detailed view of the data's journey through the code. This includes the source of the data, the path it takes, and where it ends up (the sink). This information is crucial for understanding how untrusted data might reach sensitive parts of your application and helps in identifying where to implement proper validation or sanitization.​


Reference:

https://docs.github.com/en/code-security/code-scanning/managing-code-scanning-alerts/assessing-code-scan ning-alerts-for-your-repository



Which of the following is the best way to prevent developers from adding secrets to the repository?

  1. Make the repository public.
  2. Configure a security manager.
  3. Create a CODEOWNERS file.
  4. Enable push protection.

Answer(s): D

Explanation:

Enabling push protection for your repository
With push protection, secret scanning blocks contributors from pushing secrets to a repository and generates an alert whenever a contributor bypasses the block.


Reference:

https://docs.github.com/en/code-security/secret-scanning/enabling-secret-scanning-features/enabling-push-pro tection-for-your-repository



Viewing page 9 of 27
Viewing questions 36 - 40 out of 127 questions


Post your Comments and Discuss Microsoft GH-500 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!