Free Microsoft GH-500 Practice Test Questions MCQs

Stop wondering if you're ready. Our Microsoft GH-500 practice test is designed to identify your exact knowledge gaps. Validate your skills with GitHub Advanced Security Exam questions that mirror the real exam's format and difficulty. Build a personalized study plan based on your free GH-500 exam questions mcqs performance, focusing your effort where it matters most.

Targeted practice like this helps candidates feel significantly more prepared for GitHub Advanced Security Exam exam day.

2750+ already prepared
Updated On : 3-Mar-2026
75 Questions
GitHub Advanced Security Exam
4.9/5.0

Page 1 out of 8 Pages

Configure and Use Dependency Management

Which of the following Watch settings could you use to get Dependabot alert notifications? (Each answer presents part of the solution. Choose two.)

A. The Custom setting

B. The Participating and @mentions setting

C. The All Activity setting

D. The Ignore setting

A.   The Custom setting
C.   The All Activity setting

Explanation:
To receive Dependabot alert notifications, a user must configure their personal Watch settings on a repository to include security-related activity. By default, watching modes like "Participating and @mentions" or "Ignore" are too restrictive and will not relay automated security alerts. The two settings that enable these notifications are "All Activity," which sends notifications for everything including Dependabot alerts, and "Custom," which allows users to specifically select security alerts as an event they wish to receive.

Correct Option:

A. The Custom setting
This setting allows users to fine-tune their notifications by selecting specific events to watch. By choosing the "Custom" option, a user can explicitly check a box for "Security alerts" (which includes Dependabot alerts). This ensures they receive notifications about vulnerable dependencies without being overwhelmed by notifications for every single code push or issue comment in the repository.

C. The All Activity setting
Selecting "All Activity" means the user will be notified of all ongoing activities in the repository. This comprehensive setting inherently includes Dependabot alerts, as they are a type of activity generated by GitHub's security features. While effective, this setting is broad and will result in notifications for pull requests, pushes, and comments in addition to security updates.

Incorrect Option:

B. The Participating and @mentions setting
This setting is designed to notify users only when they are specifically involved in a conversation. This includes being @mentioned in a comment or when a thread they are part of receives an update. Since Dependabot alerts are automated system notifications and do not mention the user directly, they would not trigger notifications under this restrictive watch setting.

D. The Ignore setting
As the name implies, this setting is intended to silence all notifications from a repository. If a user has a repository set to "Ignore," they will not receive any activity updates, regardless of their importance. Consequently, this would completely prevent the delivery of any Dependabot security alerts.

Reference:
GitHub Docs - "Configuring notifications" / "About notifications for Dependabot alerts"

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. Ignore

B. Participating and @mentions

C. All Activity

D. Custom

D.   Custom

Explanation:
As a repository owner seeking to receive specific notifications including security alerts, you need granular control over which events trigger notifications. The "Custom" setting provides this flexibility by allowing you to select exactly which activities you want to monitor. This is particularly important for security alerts, which are automated system notifications that wouldn't be captured by participation-based settings. Custom configuration ensures you stay informed about security vulnerabilities without unnecessary notification noise from other repository activities.

Correct Option:

D. Custom
The Custom setting enables repository owners to hand-pick specific notification types they wish to receive. By selecting this option, you can explicitly enable notifications for "Security alerts" (including Dependabot alerts) while potentially disabling notifications for less critical events like branch creations, pull request comments, or wiki edits. This targeted approach ensures you receive important security information while maintaining control over your notification volume and focus.

Incorrect Option:

A. Ignore
The Ignore setting completely silences all notifications from the repository. As a repository owner responsible for security, this would be counterproductive because you would miss critical security alerts, vulnerability notifications, and other important updates that require your attention and potential action to protect the codebase.

B. Participating and @mentions
This restrictive setting only notifies you when you are directly involved in conversations through @mentions or when participating in threads. Dependabot security alerts are automated system notifications that don't mention specific users, so they would never trigger notifications under this setting, leaving you unaware of potential vulnerabilities.

C. All Activity
While All Activity would successfully deliver security alerts, it represents an all-or-nothing approach. This setting bombards you with notifications for every repository event including pushes, pull requests, comments, and releases. For a repository owner seeking specific notifications as stated in the question, this lacks the precision and selectivity required.

Reference:
GitHub Docs - "Configuring notifications for a repository" / "About custom notification settings"

As a developer, you need to configure a code scanning workflow for a repository where GitHub Advanced Security is enabled. What minimum repository permission do you need?

A. Write

B. None

C. Admin

D. Read

A.   Write

Explanation:
Configuring a code scanning workflow involves creating or modifying workflow files in the .github/workflows directory and potentially changing repository settings. This requires the ability to push code changes and manage GitHub Actions configurations. GitHub uses repository permissions to control who can perform these actions. While anyone can view code scanning results with read access, the actual setup and configuration of the scanning workflow demands elevated permissions to commit workflow files and enable the feature.

Correct Option:

A. Write
The Write permission provides the necessary access level to configure code scanning workflows. Users with Write access can push commits to create or modify workflow YAML files, which is essential for setting up code scanning. Additionally, Write permission allows users to view results, manage workflow runs, and perform most configuration tasks without requiring full administrative privileges, making it the minimum required permission level.

Incorrect Option:

B. None
Users with no repository permissions cannot access the repository at all, let alone configure workflows. Code scanning configuration requires direct interaction with repository files and settings, which is impossible without any assigned permissions. This option would prevent any meaningful contribution to security configuration.

C. Admin
While Admin permission certainly allows code scanning workflow configuration, it exceeds the minimum requirement. Admin access is necessary for managing repository security settings at the organizational level or deleting branches, but Write permission is sufficient for the specific task of configuring a code scanning workflow. Requiring Admin would unnecessarily restrict capable developers.

D. Read
Read permission allows users to view code and code scanning results but does not permit writing changes to the repository. Configuring a code scanning workflow requires creating or editing workflow files and potentially enabling features, all of which demand write access. Read-only users would be unable to save any configuration changes.

Reference:
GitHub Docs - "Repository permission levels for an organization" / "Configuring code scanning for a repository"

What YAML syntax do you use to exclude certain files from secret scanning?

A. decrypt_secret.sh

B. paths-ignore:

C. branches-ignore:

D. secret scanning.yml

B.   paths-ignore:

Explanation:
When configuring secret scanning workflows or custom patterns in GitHub, you may need to exclude specific files to reduce false positives. GitHub uses standard YAML syntax patterns similar to those found in GitHub Actions workflows. The correct syntax follows the paths-ignore: directive, which allows you to specify file patterns that should be excluded from scanning operations, ensuring that legitimate test files or documentation containing example secrets don't trigger unnecessary alerts.

Correct Option:

B. paths-ignore:
The paths-ignore: syntax is used in GitHub's YAML configurations to specify which file paths should be excluded from scanning operations. This directive accepts glob patterns to match files or directories. For example, you might exclude *.test.js or test/* to prevent secret scanning from flagging secrets in test files where they might be intentionally used as placeholders. This helps teams focus on genuine secrets in production code.

Incorrect Option:

A. decrypt_secret.sh
This appears to be a filename rather than YAML syntax. decrypt_secret.sh sounds like a shell script that might be used for decrypting secrets during deployment, but it is not a valid YAML directive for excluding files from secret scanning. It cannot be used in configuration files to control secret scanning behavior.

C. branches-ignore:
branches-ignore: is valid YAML syntax in GitHub contexts, but it is used for controlling workflow triggers based on branch names, not for excluding files from scanning. For instance, you might use branches-ignore: in a GitHub Actions workflow to prevent execution on specific branches. It does not apply to file-level exclusions for secret scanning.

D. secret scanning.yml
This appears to be a filename pattern, not YAML syntax. While you might name a configuration file secret-scanning.yml, this string itself is not a valid directive for excluding files within such a configuration. The correct syntax for exclusions would appear inside the configuration file, not as the filename.

Reference:
GitHub Docs - "Custom secret scanning patterns" / "GitHub Actions workflow syntax for paths-ignore"

A repository's dependency graph includes:

A. Dependencies parsed from a repository's manifest and lock files.

B. Annotated code scanning alerts from your repository's dependencies.

C. A summary of the dependencies used in your organization's repositories.

D. Dependencies from all your repositories.

A.   Dependencies parsed from a repository's manifest and lock files.

Explanation:
The dependency graph is a GitHub feature that provides a visual representation of a repository's dependencies. It automatically parses manifest files (like package.json, pom.xml, requirements.txt) and lock files (like package-lock.json, Gemfile.lock) to identify both direct and transitive dependencies. This information powers other security features like Dependabot alerts and version updates by establishing a comprehensive inventory of the software your project relies on.

Correct Option:

A. Dependencies parsed from a repository's manifest and lock files.
This accurately describes the dependency graph's core functionality. GitHub automatically analyzes supported ecosystem files whenever they are pushed to the repository. The graph includes both direct dependencies explicitly declared in manifest files and transitive dependencies (dependencies of dependencies) captured in lock files. This comprehensive dependency inventory enables security vulnerability monitoring and automated updates.

Incorrect Option:

B. Annotated code scanning alerts from your repository's dependencies.
Code scanning alerts are a separate GitHub Advanced Security feature that analyzes code for security vulnerabilities and coding errors. These alerts are not part of the dependency graph. While both features enhance security, the dependency graph focuses exclusively on identifying and tracking dependencies, not on generating alerts about code quality or security flaws.

C. A summary of the dependencies used in your organization's repositories.
The dependency graph operates at the repository level, not the organization level. While GitHub provides organization-level insights like the security overview that aggregates dependency information across repositories, the dependency graph itself is specifically defined for and displayed within individual repositories. It shows dependencies for that particular repository only.

D. Dependencies from all your repositories.
This is incorrect because the dependency graph is repository-specific. Each repository maintains its own dependency graph based on the manifest and lock files within that repository. GitHub does not combine dependencies from multiple repositories into a single graph, as dependencies vary significantly between different projects and codebases.

Reference:
GitHub Docs - "About the dependency graph" / "Exploring the dependencies of a repository"

When secret scanning detects a set of credentials on a public repository, what does GitHub do?

A. It notifies the service provider who issued the secret.

B. It displays a public alert in the Security tab of the repository.

C. It scans the contents of the commits for additional secrets

D. It sends a notification to repository members.

A.   It notifies the service provider who issued the secret.

Where can you find a deleted line of code that contained a secret value?

A. Insights

B. Issues

C. Commits

D. Dependency graph

C.   Commits

Explanation:
When a line of code containing a secret is deleted, it remains permanently accessible through the repository's commit history. Git preserves every version of every file ever committed, even if later deleted or overwritten. The Commits section allows you to browse the complete history, view individual commit details, and examine exactly what code existed at any point in time, including lines that may have contained secrets before they were removed.

Correct Option:

C. Commits
The Commits section provides access to the complete historical record of all changes made to the repository. Each commit represents a snapshot of the codebase at a specific point in time. By navigating through commit history, you can view the exact state of files before and after changes, including lines that were deleted. This makes commits the definitive source for finding previously committed secrets, even after they've been removed from the current code.

Incorrect Option:

A. Insights
The Insights tab contains analytics and metrics about repository activity, including contributor statistics, code frequency graphs, and traffic data. While useful for understanding repository trends and performance, it does not provide access to historical file contents or deleted code. It focuses on aggregated data rather than granular commit details.

B. Issues
Issues are used for tracking bugs, feature requests, and discussions. They exist separately from the codebase and do not contain historical code content. While issues might reference deleted code through comments or attachments, they are not a reliable or systematic way to find deleted lines containing secrets and are not designed for this purpose.

D. Dependency graph
The dependency graph visualizes the relationships between your repository and its external dependencies based on manifest files. It shows which packages your project relies on but does not contain your actual source code or its revision history. Deleted code lines are completely outside the scope of dependency tracking functionality.

Reference:
GitHub Docs - "Viewing commit history" / "Accessing Git history"

In a private repository, what minimum requirements does GitHub need to generate a dependency graph? (Each answer presents part of the solution. Choose two.)

A. Read-only access to all the repository's files

B. Dependency graph enabled at the organization level for all new private repositories

C. Write access to the dependency manifest and lock files for an enterprise

D. Read-only access to the dependency manifest and lock files for a repository

B.   Dependency graph enabled at the organization level for all new private repositories
D.   Read-only access to the dependency manifest and lock files for a repository

Explanation:
Generating a dependency graph for a private repository requires both feature enablement and appropriate file access. Unlike public repositories where dependency graphs are automatically generated, private repositories need explicit configuration. The dependency graph must be enabled at the organization level, and GitHub needs read access specifically to the manifest and lock files to parse dependency information. This two-part requirement ensures proper governance while maintaining security.

Correct Option:

B. Dependency graph enabled at the organization level for all new private repositories.
This is a critical prerequisite because private repositories require explicit opt-in for dependency graph generation. Organizations can enable this feature at the organization level, which automatically activates it for new private repositories. This setting gives administrators control over which private repositories expose dependency information while maintaining security compliance across the organization.

D. Read-only access to the dependency manifest and lock files for a repository.
GitHub needs to read specific files like package.json, Gemfile.lock, or pom.xml to parse and understand the repository's dependencies. This requires read-only access to these files, not to the entire repository. The dependency graph feature works by analyzing these files when they are pushed, extracting both direct and transitive dependency information to build the complete dependency picture.

Incorrect Option:

A. Read-only access to all the repository's files.
This requirement is excessive and incorrect. GitHub does not need access to all repository files to generate the dependency graph. The feature specifically targets manifest and lock files that declare dependencies. Granting access to all files would create unnecessary security exposure when only specific file types are required for dependency analysis.

C. Write access to the dependency manifest and lock files for an enterprise.
Write access is not required for generating the dependency graph. The dependency graph is a read-only analysis feature that parses existing files. It does not modify or write to manifest or lock files. Requesting write access would be inappropriate as the feature functions purely as an observer of dependency declarations, not as a modifier.

Reference:
GitHub Docs - "Enabling the dependency graph for private repositories" / "About the dependency graph"

A dependency has a known vulnerability. What does the warning message include?

A. The security impact of these changes

B. An easily understandable visualization of dependency change

C. How many projects use these components

D. A brief description of the vulnerability

B.   An easily understandable visualization of dependency change

Explanation:
When Dependabot detects a dependency with a known vulnerability, it generates alerts that include visual elements to help developers quickly understand the dependency relationships. These alerts feature an easily understandable visualization showing how the vulnerable dependency fits into your project's dependency tree. This visual representation helps developers identify whether the vulnerable component is a direct dependency or a transitive dependency, which influences remediation strategies.

Correct Option:

B. An easily understandable visualization of dependency change.
Dependabot alerts include a dependency graph visualization that shows the path from your repository to the vulnerable component. This visual element clearly illustrates whether the vulnerability affects a direct dependency you explicitly declared or a transitive dependency (a dependency of a dependency). Understanding this relationship helps developers determine the appropriate fix, such as updating a direct dependency versus waiting for an indirect dependency to be updated.

Incorrect Option:

A. The security impact of these changes.
While Dependabot alerts do include information about the vulnerability, this option is too vague and not specifically accurate. The alert includes a description of the vulnerability itself and its severity, but not a detailed analysis of the security impact of potential changes. The security impact assessment is typically left to the development team based on how they use the affected component.

C. How many projects use these components.
This information is not included in individual dependency vulnerability warnings. The alert focuses on the specific repository being scanned and its relationship to the vulnerable dependency. Cross-project usage statistics are not relevant to fixing the vulnerability in the current repository and are not displayed in the alert.

D. A brief description of the vulnerability.
While Dependabot alerts do include descriptions of vulnerabilities, this is not the primary distinguishing feature being asked about. The question specifically asks what the warning message includes in the context of the answer choices, and the visualization of dependency change is a unique and important feature that helps developers understand their exposure to the vulnerability.

Reference:
GitHub Docs - "About Dependabot alerts" / "Viewing and updating Dependabot alerts"

What happens when you enable secret scanning on a private repository?

A. Repository administrators can view Dependabot alerts.

B. Your team is subscribed to security alerts.

C. GitHub performs a read-only analysis on the repository.

D. Dependency review, secret scanning, and code scanning are enabled.

C.   GitHub performs a read-only analysis on the repository.

Explanation:
Enabling secret scanning on a private repository activates GitHub's automated credential detection system. This feature operates by performing a read-only analysis of the repository's contents, including its entire Git history. GitHub scans for patterns that match known service provider credentials without modifying any files or accessing the repository in any write capacity. The analysis runs continuously on new commits and retrospectively on existing history to identify any exposed secrets.

Correct Option:

C. GitHub performs a read-only analysis on the repository.
This accurately describes what happens when secret scanning is enabled. GitHub uses pattern matching to scan all files in the repository, including the full commit history, for credentials that match known formats from partner service providers. The scan is completely non-invasive—GitHub only reads the content to identify potential secrets but never writes, modifies, or stores the actual credential values beyond the alert notification.

Incorrect Option:

A. Repository administrators can view Dependabot alerts.
Dependabot alerts are a separate security feature focused on vulnerable dependencies, not secret scanning. Enabling secret scanning does not affect Dependabot functionality or visibility. Administrators may view secret scanning alerts in the Security tab, but these are distinct from Dependabot vulnerability notifications.

B. Your team is subscribed to security alerts.
Enabling secret scanning does not automatically subscribe team members to notifications. Notification settings are configured separately based on individual watch settings and team membership. The feature itself simply enables detection; delivery of alerts depends on each user's notification preferences.

D. Dependency review, secret scanning, and code scanning are enabled.
This is incorrect because enabling secret scanning only activates that specific feature. Dependency review and code scanning are separate GitHub Advanced Security features that must be enabled independently. Secret scanning focuses exclusively on detecting exposed credentials and does not automatically enable other security tools.

Reference:
GitHub Docs - "About secret scanning" / "Managing secret scanning for your repository"

Page 1 out of 8 Pages
123

GitHub Advanced Security Exam Practice Exam Questions

GH-500: What the GitHub Advanced Security Exam Measures


The GH-500 GitHub Advanced Security exam is about building a secure development pipeline using GitHub’s security features—then proving you can tune them for real teams. Expect scenario questions on finding risks early, prioritizing alerts, and enforcing security without slowing delivery.

Core Capabilities You’ll Be Tested On


Code scanning (CodeQL): enabling, customizing, interpreting results, triage
Secret scanning: detection, push protection, response playbooks, exemptions
Dependency security: Dependabot alerts/updates, version risks, remediation flow
Security policies: org/repo settings, rulesets, required checks, governance
Alert management: severity vs priority, false positives, suppression rationale
Secure collaboration: PR checks, reviews, security gates, audit visibility

A Prep Approach That Works


Learn the “why” behind each feature:

Detect (scan code, secrets, dependencies)
Triage (confirm, prioritize, assign)
Fix (PR workflow, automation, documentation)
Prevent (rulesets, required checks, push protection)
Build a small repo and practice turning alerts into clean pull requests with clear remediation notes.

Common Pitfalls


Treating every alert as equal (severity ≠ business impact)
Disabling checks instead of tuning rules and workflows
Ignoring secret exposure response steps (rotation, revoke, audit)
Missing the difference between repo-level controls and org-wide enforcement

Practice That Improves Passing Odds


GH-500 is full of “best action” questions. Timed, full-length GitHub Advanced Security Exam practice exam helps you learn the patterns: what to enable first, what to fix first, and what to enforce globally. GH-500 practice questions help you sharpen triage decisions and get comfortable with real exam phrasing.