Microsoft Azure

GitHub Advanced Security

GH-500

Prepare for the GH-500 exam to validate your knowledge in GitHub Advanced Security.

141 questions 0 views Free
Start Mock Test Timed · Full-length · Scored

Questions 21–30 of 141

Q21

What happens when a pull request is merged with unresolved conflicts?

  • A It automatically resolves conflicts.
  • B It fails to merge and creates an error.
  • C It merges, leaving conflicts unresolved.
  • D It notifies the repository owner.
Explanation Merging with unresolved conflicts results in a failure, as integrity is compromised; others suggest conflicting outcomes.
Q22

Which service does GitHub Advanced Security provide for code scanning?

  • A CodeQL
  • B Azure DevOps
  • C GitHub Pages
  • D Microsoft Sentinel
Explanation CodeQL is specifically designed for code scanning, while others serve different purposes.
Q23

A company needs to enforce stricter security policies on its GitHub repositories. Which approach should it take?

  • A Set up branch protection rules
  • B Use GitHub Actions for CI/CD
  • C Enable two-factor authentication
  • D Restrict repository visibility
Explanation Branch protection rules directly enforce security policies, while others enhance security but do not enforce policies.
Q24

What happens when a pull request triggers a workflow that contains a secret?

  • A Secret leaks to logs
  • B Secret remains hidden
  • C Secret is emailed to owner
  • D Depends on repository settings
Explanation Secrets are masked and kept hidden during workflows to prevent leaks, while the others misrepresent the behavior.
Q25

Which service is used for scanning code for secrets in Azure DevOps?

  • A Azure Key Vault
  • B GitHub Advanced Security
  • C Azure Logic Apps
  • D Azure Functions
Explanation GitHub Advanced Security specializes in identifying sensitive information like secrets, unlike the other options.
Q26

A company needs to enforce that all contributions to a repository must pass security checks. What should they configure?

  • A Branch protection rules
  • B Actions for CI/CD
  • C Wiki templates
  • D Git tags
Explanation Branch protection rules can enforce checks before allowing merges, while the others do not enforce security checks.
Q27

You are applying a policy that blocks certain file types in a repository. What happens if a contributor tries to upload these files?

  • A Upload succeeds with notice
  • B Upload is silently rejected
  • C Upload is blocked and notified
  • D Upload creates a merge conflict
Explanation The policy will actively block the upload and notify the contributor, unlike other options that would not take such action.
Q28

Which service helps in sensitive data classification in GitHub?

  • A GitHub Actions
  • B GitHub Secrets
  • C CodeQL
  • D Dependabot
Explanation CodeQL analyzes code for vulnerabilities and sensitive data patterns, while the others manage workflows or dependencies.
Q29

A company needs to ensure their repository code does not contain secrets. Which GitHub feature should they utilize?

  • A Branch Protection Rules
  • B Security Alerts
  • C Secret Scanning
  • D Pull Request Templates
Explanation Secret Scanning detects sensitive data in code, while the others serve different repository protection or management purposes.
Q30

What happens when a secret is found in a commit and GitHub Secret Scanning is enabled?

  • A It automatically deletes the commit.
  • B No action is taken.
  • C A security alert is generated.
  • D It merges the commit into the main branch.
Explanation A security alert is generated to notify repository admins to take action, unlike the other options which are incorrect.