
Free Jan-2026 GH-500 Certification Sample Questions certification Exam
Certification Topics of GH-500 Exam PDF Recently Updated Questions
Microsoft GH-500 Exam Syllabus Topics:
| Topic | Details |
|---|---|
| Topic 1 |
|
| Topic 2 |
|
| Topic 3 |
|
| Topic 4 |
|
| Topic 5 |
|
NEW QUESTION # 11
In the pull request, how can developers avoid adding new dependencies with known vulnerabilities?
- A. Enable Dependabot alerts.
- B. Add Dependabot rules.
- C. Add a workflow with the dependency review action.
- D. Enable Dependabot security updates.
Answer: C
Explanation:
To detect and block vulnerable dependencies before merge, developers should use the Dependency Review GitHub Action in their pull request workflows. It scans all proposed dependency changes and flags any packages with known vulnerabilities.
This is a preventative measure during development, unlike Dependabot, which reacts after the fact.
NEW QUESTION # 12
Where can you find a deleted line of code that contained a secret value?
- A. Dependency graph
- B. Issues
- C. Insights
- D. Commits
Answer: D
Explanation:
Secrets committed and then deleted are still accessible in the repository's Git history. To locate them, navigate to the Commits tab. GitHub's secret scanning can detect secrets in both current and historical commits, which is why remediation should also include revoking the secret, not just removing it from the latest code.
NEW QUESTION # 13
As a repository owner, you want to receive specific notifications, including security alerts, for an individual repository. Which repository notification setting should you use?
- A. All Activity
- B. Ignore
- C. Participating and @mentions
- D. Custom
Answer: D
Explanation:
Using the Custom setting allows you to subscribe to specific event types, such as Dependabot alerts or vulnerability notifications, without being overwhelmed by all repository activity. This is essential for repository maintainers who need fine-grained control over what kinds of events trigger notifications.
This setting is configurable per repository and allows users to stay aware of critical issues while minimizing notification noise.
NEW QUESTION # 14
If notification and alert recipients are not customized, which users receive notifications about new Dependabot alerts in an affected repository?
- A. Users with Maintain privileges to the repository
- B. Users with Admin privileges to the repository
- C. Users with Read permissions to the repository
- D. Users with Write permissions to the repository
Answer: D
Explanation:
By default, users with Write, Maintain, or Admin permissions will receive notifications for new Dependabot alerts. However, Write permission is the minimum level needed to be automatically notified. Users with only Read access do not receive alerts unless added explicitly.
NEW QUESTION # 15
Which of the following workflow events would trigger a dependency review? (Each answer presents a complete solution. Choose two.)
- A. trigger
- B. commit
- C. workflow_dispatch
- D. pull_request
Answer: C,D
Explanation:
Comprehensive and Detailed Explanation:
Dependency review is triggered by specific events in GitHub workflows:
pull_request: When a pull request is opened, synchronized, or reopened, GitHub can analyze the changes in dependencies and provide a dependency review.
workflow_dispatch: This manual trigger allows users to initiate workflows, including those that perform dependency reviews.
The trigger and commit options are not recognized GitHub Actions events and would not initiate a dependency review.
NEW QUESTION # 16
Which security feature shows a vulnerable dependency in a pull request?
- A. Dependency graph
- B. Dependency review
- C. The repository's Security tab
- D. Dependabot alert
Answer: B
Explanation:
Dependency review runs as part of a pull request and shows which dependencies are being added, removed, or changed - and highlights vulnerabilities associated with any added packages.
It works in real-time and is specifically designed for use during pull request workflows.
The dependency graph is an overview, Dependabot alerts notify post-merge, and the Security tab shows the aggregated alert list.
NEW QUESTION # 17
Which key is required in the update settings of the Dependabot configuration file?
- A. assignees
- B. package-ecosystem
- C. rebase-strategy
- D. commit-message
Answer: B
Explanation:
In a dependabot.yml configuration file, package-ecosystem is a required key. It defines the package manager being used in that update configuration (e.g., npm, pip, maven, etc.).
Without this key, Dependabot cannot determine how to analyze or update dependencies. Other keys like rebase-strategy or commit-message are optional and used for customizing behavior.
NEW QUESTION # 18
How many alerts are created when two instances of the same secret value are in the same repository?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: B
Explanation:
When multiple instances of the same secret value appear in a repository, only one alert is generated. Secret scanning works by identifying exposed credentials and token patterns, and it groups identical matches into a single alert to reduce noise and avoid duplication.
This makes triaging easier and helps teams focus on remediating the actual exposed credential rather than reviewing multiple redundant alerts.
NEW QUESTION # 19
What were the long-term impacts of the Cultural Revolution on Chinese society?
- A. Maintain
- B. Triage
- C. Write
- D. Admin
Answer: D
Explanation:
Requesting a CVE ID for a security advisory in a GitHub repository requires Admin permissions. This level of access is necessary because it involves managing sensitive security information and coordinating with external entities to assign a CVE, which is a formal process that can impact the public perception and security posture of the project.
NEW QUESTION # 20
You have enabled security updates for a repository. When does GitHub mark a Dependabot alert as resolved for that repository?
- A. When you dismiss the Dependabot alert
- B. When the pull request checks are successful
- C. When you merge a pull request that contains a security update
- D. When Dependabot creates a pull request to update dependencies
Answer: C
Explanation:
A Dependabot alert is marked as resolved only after the related pull request is merged into the repository. This indicates that the vulnerable dependency has been officially replaced with a secure version in the active codebase.
Simply generating a PR or passing checks does not change the alert status; merging is the key step.
NEW QUESTION # 21
What is a prerequisite to define a custom pattern for a repository?
- A. Specify additional match criteria
- B. Close other secret scanning alerts
- C. Enable secret scanning
- D. Change the repository visibility to Internal
Answer: C
Explanation:
You must enable secret scanning before defining custom patterns. Secret scanning provides the foundational capability for detecting exposed credentials, and custom patterns build upon that by allowing organizations to specify their own regex-based patterns for secrets unique to their environment.
Without enabling secret scanning, GitHub will not process or apply custom patterns.
NEW QUESTION # 22
Which of the following statements best describes secret scanning push protection?
- A. Secret scanning alerts must be closed before a branch can be merged into the repository.
- B. Buttons for sensitive actions in the GitHub UI are disabled.
- C. Users need to reply to a 2FA challenge before any push events.
- D. Commits that contain secrets are blocked before code is added to the repository.
Answer: D
Explanation:
Comprehensive and Detailed Explanation:
Secret scanning push protection is a proactive feature that scans for secrets in your code during the push process. If a secret is detected, the push is blocked, preventing the secret from being added to the repository. This helps prevent accidental exposure of sensitive information.
GitHub Docs
NEW QUESTION # 23
The autobuild step in the CodeQL workflow has failed. What should you do?
- A. Compile the source code.
- B. Remove the autobuild step from your code scanning workflow and add specific build steps.
- C. Use CodeQL, which implicitly detects the supported languages in your code base.
- D. Remove specific build steps.
Answer: B
Explanation:
If autobuild fails (which attempts to automatically detect how to build your project), you should disable it in your workflow and replace it with explicit build commands, using steps like run: make or run: ./gradlew build.
This ensures CodeQL can still extract and analyze the code correctly.
NEW QUESTION # 24
Who can fix a code scanning alert on a private repository?
- A. Users who have Write access to the repository
- B. Users who have Read permissions within the repository
- C. Users who have the Triage role within the repository
- D. Users who have the security manager role within the repository
Answer: A
Explanation:
Comprehensive and Detailed Explanation:
In private repositories, users with write access can fix code scanning alerts. They can do this by committing changes that address the issues identified by the code scanning tools. This level of access ensures that only trusted contributors can modify the code to resolve potential security vulnerabilities.
GitHub Docs
Users with read or triage roles do not have the necessary permissions to make code changes, and the security manager role is primarily focused on managing security settings rather than directly modifying code.
Reference:
GitHub Docs
NEW QUESTION # 25
As a repository owner, you do not want to run a GitHub Actions workflow when changes are made to any .txt or markdown files. How would you adjust the event trigger for a pull request that targets the main branch? (Each answer presents part of the solution. Choose three.) on:
pull_request:
branches: [main]
- A. - '/*.md'
- B. - '/*.txt'
- C. paths-ignore:
- D. - 'docs/*.md'
- E. paths:
Answer: A,B,C
Explanation:
To exclude .txt and .md files from triggering workflows on pull requests to the main branch:
on: defines the event (e.g., pull_request)
pull_request: is the trigger
paths-ignore: is the key used to ignore file patterns
Example YAML:
yaml
CopyEdit
on:
pull_request:
branches:
- main
paths-ignore:
- '*.md'
- '*.txt'
Using paths: would include only specific files instead - not exclude. paths-ignore: is correct here.
NEW QUESTION # 26
How do I configure a webhook to monitor key scan alert events? What are the steps of this operation?
- A. Document alternatives to storing secrets in the source code.
- B. Enable system for cross-domain identity management (SCIM) provisioning for the enterprise.
- C. Configure a webhook to monitor for secret scanning alert events.
- D. Dismiss alerts that are older than 90 days.
Answer: A,C
Explanation:
To proactively address secret scanning:
Webhooks can be configured to listen for secret scanning events. This allows automation, logging, or alerting in real-time when secrets are detected.
Documenting secure development practices (like using environment variables or secret managers) helps reduce the likelihood of developers committing secrets in the first place.
Dismissal based on age is not a best practice without triage. SCIM deals with user provisioning, not scanning alerts.
NEW QUESTION # 27
What role is required to change a repository's code scanning severity threshold that fails a pull request status check?
- A. Maintain
- B. Triage
- C. Write
- D. Admin
Answer: D
Explanation:
To change the threshold that defines whether a pull request fails due to code scanning alerts (such as blocking merges based on severity), the user must have Admin access on the repository. This is because modifying these settings falls under repository configuration privileges.
Users with Write, Maintain, or Triage roles do not have the required access to modify rulesets or status check policies.
NEW QUESTION # 28
What should you do after receiving an alert about a dependency added in a pull request?
- A. Update the vulnerable dependencies before the branch is merged
- B. Disable Dependabot alerts for all repositories owned by your organization
- C. Fork the branch and deploy the new fork
- D. Deploy the code to your default branch
Answer: A
Explanation:
If an alert is raised on a pull request dependency, best practice is to update the dependency to a secure version before merging the PR. This prevents the vulnerable version from entering the main codebase.
Merging or deploying the PR without fixing the issue exposes your production environment to known risks.
NEW QUESTION # 29
......
2026 New Preparation Guide of Microsoft GH-500 Exam: https://www.premiumvcedump.com/Microsoft/valid-GH-500-premium-vce-exam-dumps.html
GH-500 Exam Prep Guide: Prep guide for the GH-500 Exam: https://drive.google.com/open?id=1B6hNzehyU17Y3rw_kUyA4uHjHgdljenX