
[Dec 26, 2025] GH-500 Practice Exam Dumps - 99% Marks In Microsoft Exam
Updated Verified GH-500 Q&As - Pass Guarantee or Full Refund
Microsoft GH-500 Exam Syllabus Topics:
| Topic | Details |
|---|---|
| Topic 1 |
|
| Topic 2 |
|
| Topic 3 |
|
| Topic 4 |
|
| Topic 5 |
|
NEW QUESTION # 42
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. - 'docs/*.md'
- C. - '/*.txt'
- D. paths-ignore:
- E. paths:
Answer: A,C,D
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 # 43
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 Ignore setting
- D. The All Activity setting
Answer: A,D
Explanation:
Comprehensive and Detailed Explanation:
To receive Dependabot alert notifications for a repository, you can utilize the following Watch settings:
Custom setting: Allows you to tailor your notifications, enabling you to subscribe specifically to security alerts, including those from Dependabot.
All Activity setting: Subscribes you to all notifications for the repository, encompassing issues, pull requests, and security alerts like those from Dependabot.
The Participating and @mentions setting limits notifications to conversations you're directly involved in or mentioned, which may not include security alerts. The Ignore setting unsubscribes you from all notifications, including critical security alerts.
GitHub Docs
+1
GitHub Docs
+1
NEW QUESTION # 44
Which key is required in the update settings of the Dependabot configuration file?
- A. commit-message
- B. package-ecosystem
- C. rebase-strategy
- D. assignees
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 # 45
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. Commits that contain secrets are blocked before code is added to the repository.
- D. Users need to reply to a 2FA challenge before any push events.
Answer: C
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 # 46
Assuming security and analysis features are not configured at the repository, organization, or enterprise level, secret scanning is enabled on:
- A. User-owned private repositories
- B. Private repositories
- C. Public repositories
- D. All new repositories within your organization
Answer: C
Explanation:
By default, secret scanning is enabled automatically for all public repositories. For private or internal repositories, secret scanning must be enabled manually unless configured at the organization or enterprise level.
This default behavior helps protect open-source projects without requiring additional configuration.
NEW QUESTION # 47
Which CodeQL query suite provides queries of lower severity than the default query suite?
- A. security-extended
- B. github/codeql/cpp/ql/src@main
- C. github/codeql-go/ql/src@main
Answer: A
Explanation:
The security-extended query suite includes additional CodeQL queries that detect lower severity issues than those in the default security-and-quality suite.
It's often used when projects want broader visibility into code hygiene and potential weak spots beyond critical vulnerabilities.
The other options listed are paths to language packs, not query suites themselves.
NEW QUESTION # 48
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. Deploy the code to your default branch
- C. Fork the branch and deploy the new fork
- D. Disable Dependabot alerts for all repositories owned by your organization
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 # 49
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?
- A. Draft a pull request to update the open-source query.
- B. Open an issue in the CodeQL repository.
- C. Ignore the alert.
- 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.
NEW QUESTION # 50
Where can you view code scanning results from CodeQL analysis?
- A. A CodeQL database
- B. The repository's code scanning alerts
- C. A CodeQL query pack
- D. At Security advisories
Answer: B
Explanation:
All results from CodeQL analysis appear under the repository's code scanning alerts tab. This section is part of the Security tab and provides a list of all current, fixed, and dismissed alerts found by CodeQL.
A CodeQL database is used internally during scanning but does not display results. Query packs contain rules, not results. Security advisories are for published vulnerabilities, not per-repo findings.
NEW QUESTION # 51
What is the first step you should take to fix an alert in secret scanning?
- A. Revoke the alert if the secret is still valid.
- B. Update your dependencies.
- C. Remove the secret in a commit to the main branch.
- D. Archive the repository.
Answer: A
Explanation:
The first step when you receive a secret scanning alert is to revoke the secret if it is still valid. This ensures the secret can no longer be used maliciously. Only after revoking it should you proceed to remove it from the code history and apply other mitigation steps.
Simply deleting the secret from the code does not remove the risk if it hasn't been revoked - especially since it may already be exposed in commit history.
NEW QUESTION # 52
Assuming that notification settings and Dependabot alert recipients have not been customized, which user account setting should you use to get an alert when a vulnerability is detected in one of your repositories?
- A. Enable all for Dependency graph
- B. Enable all in existing repositories
- C. Enable all for Dependabot alerts
- D. Enable by default for new public repositories
Answer: C
Explanation:
To ensure you're notified whenever a vulnerability is detected via Dependabot, you must enable alerts for Dependabot in your personal notification settings. This applies to both new and existing repositories. It ensures you get timely alerts about security vulnerabilities.
The dependency graph must be enabled for scanning, but does not send alerts itself.
NEW QUESTION # 53
Where in the repository can you give additional users access to secret scanning alerts?
- A. Settings
- B. Security
- C. Insights
- D. Secrets
Answer: A
Explanation:
To grant specific users access to view and manage secret scanning alerts, you do this via the Settings tab of the repository. From there, under the "Code security and analysis" section, you can add individuals or teams with roles such as security manager.
The Security tab only displays alerts; access control is handled in Settings.
NEW QUESTION # 54
Which of the following workflow events would trigger a dependency review? (Each answer presents a complete solution. Choose two.)
- A. pull_request
- B. trigger
- C. workflow_dispatch
- D. commit
Answer: A,C
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 # 55
Which of the following statements most accurately describes push protection for secret scanning custom patterns?
- A. Push protection is not available for custom patterns.
- B. Push protection is enabled by default for new custom patterns.
- C. Push protection is an opt-in experience for each custom pattern.
- D. Push protection must be enabled for all, or none, of a repository's custom patterns.
Answer: C
Explanation:
Comprehensive and Detailed Explanation:
Push protection for secret scanning custom patterns is an opt-in feature. This means that for each custom pattern defined in a repository, maintainers can choose to enable or disable push protection individually. This provides flexibility, allowing teams to enforce push protection on sensitive patterns while leaving it disabled for others.
NEW QUESTION # 56
You have enabled security updates for a repository. When does GitHub mark a Dependabot alert as resolved for that repository?
- A. When Dependabot creates a pull request to update dependencies
- B. When the pull request checks are successful
- C. When you merge a pull request that contains a security update
- D. When you dismiss the Dependabot alert
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 # 57
Which details do you have to provide to create a custom pattern for secret scanning? (Each answer presents part of the solution. Choose two.)
- A. Additional match requirements for the secret format
- B. A list of repositories to scan
- C. The secret format
- D. The name of the pattern
Answer: C,D
Explanation:
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.
NEW QUESTION # 58
Which of the following information can be found in a repository's Security tab?
- A. Number of alerts per GHAS feature
- B. Two-factor authentication (2FA) options
- C. Access management
- D. GHAS settings
Answer: A
Explanation:
The Security tab in a GitHub repository provides a central location for viewing security-related information, especially when GitHub Advanced Security is enabled. The following can be accessed:
Number of alerts related to:
Code scanning
Secret scanning
Dependency (Dependabot) alerts
Summary and visibility into open, closed, and dismissed security issues.
It does not show 2FA options, access control settings, or configuration panels for GHAS itself. Those belong to account or organization-level settings.
NEW QUESTION # 59
......
GH-500 Real Valid Brain Dumps With 77 Questions: https://www.fast2test.com/GH-500-premium-file.html
GH-500 Certification with Actual Questions: https://drive.google.com/open?id=1Ey-2JXps1ga4sBZ3OmUdsHJgiFXSf41k