Halloween Sale Special - 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 75only

Microsoft GH-500 GitHub Advanced Security Exam Exam Practice Test

Demo: 37 questions
Total 125 questions

GitHub Advanced Security Exam Questions and Answers

Question 1

You are tasked with filtering queries in a CodeQL query suite. Which metadata tag matches on the last path component?

Options:

A.

query path

B.

tags contain all

C.

query filename

D.

tags contain

Question 2

You want to enforce an enterprise policy that allows repository administrators within all organizations to enable GitHub Advanced Security for their repositories. Which option should you choose for this policy?

Options:

A.

No policy

B.

Allow for all organizations

C.

Never allow

D.

Allow for selected organizations

Question 3

As a repository administrator, you can enable secret scanning on:

Options:

A.

Current private repositories owned by your organization

B.

Current private repositories owned by users of your organization

C.

New user-owned private repositories created by users within your organization

D.

New private repositories created by users outside your organization

Question 4

The autobuild step in the CodeQL workflow has failed. What should you do?

Options:

A.

Remove specific build steps.

B.

Compile the source code.

C.

Remove the autobuild step from your code scanning workflow and add specific build steps.

D.

Use CodeQL, which implicitly detects the supported languages in your code base.

Question 5

You are creating an application that will use the code scanning Application Programming Interface (API) to export an organization's alerts into a CSV file. What scope needs to be included in the GitHub token?

Options:

A.

read:user

B.

security_events

C.

admin:org

D.

workflow

Question 6

Assuming there is no custom Dependabot behavior configured, where possible, what does Dependabot do after sending an alert about a vulnerable dependency in a repository?

Options:

A.

Creates a pull request to upgrade the vulnerable dependency to the minimum possible secure version

B.

Scans repositories for vulnerable dependencies on a schedule and adds those files to a manifest

C.

Constructs a graph of all the repository's dependencies and public dependents for the default branch

D.

Scans any push to all branches and generates an alert for each vulnerable repository

Question 7

You have enabled security updates for a repository. When does GitHub mark a Dependabot alert as resolved for that repository?

Options:

A.

When Dependabot creates a pull request to update dependencies

B.

When you dismiss the Dependabot alert

C.

When the pull request checks are successful

D.

When you merge a pull request that contains a security update

Question 8

Where in the repository can you give additional users access to secret scanning alerts?

Options:

A.

Security

B.

Settings

C.

Secrets

D.

Insights

Question 9

What is the format of the GitHub security advisory form?

Options:

A.

A CVE Numbering Authority (CNA) description format

B.

A Dependabot alert sent to the affected repositories

C.

A form matching the MITRE database security advisory format

D.

A form matching the Common Vulnerabilities and Exposures (CVE) description format

Question 10

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

Options:

A.

Insights

B.

Issues

C.

Commits

D.

Dependency graph

Question 11

What is the minimum role needed in order to view the secret scanning alerts list within the Security tab of a repository?

Options:

A.

Admin

B.

Read

C.

Repository owner

D.

Write

Question 12

Which Dependabot configuration fields are required? (Each answer presents part of the solution. Choose three.)

Options:

A.

directory

B.

package-ecosystem

C.

milestone

D.

schedule.interval

E.

allow

Question 13

Your security team requested that you enable the dependency graph. What happens when you enable this feature for your repository?

Options:

A.

Admins of the repository will see dependency information in the dependency graph.

B.

Dependabot security updates create pull requests to upgrade those dependencies.

C.

New repositories will need to have dependency information enabled.

D.

GitHub generates Dependabot alerts for vulnerable dependencies.

Question 14

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]

Options:

A.

- '/*.md'

B.

- '/*.txt'

C.

paths:

D.

paths-ignore:

E.

- 'docs/*.md'

Question 15

By default, where will secret scanning look in a repository in order to execute its job? (Each correct answer presents part of the solution. Choose three.)

Options:

A.

Dependencies

B.

Selected files in the repository

C.

All branches

D.

Full commit history

E.

All files in the repository

Question 16

Which of the following formats are used to describe a code scanning alert from CodeQL?

Options:

A.

Common Weakness Enumeration (CWE)

B.

Vulnerability Exploitability eXchange (VEX)

C.

Common Vulnerabilities and Exposures (CVE)

D.

GitHub Security Advisory (GHSA)

Question 17

Which of the following tasks can be performed by a security team as a proactive measure to help address secret scanning alerts? (Each answer presents a complete solution. Choose two.)

Options:

A.

Dismiss alerts that are older than 90 days.

B.

Configure a webhook to monitor for secret scanning alert events.

C.

Enable system for cross-domain identity management (SCIM) provisioning for the enterprise.

D.

Document alternatives to storing secrets in the source code.

Question 18

When does Dependabot alert you of a vulnerability in your software development process?

Options:

A.

When a pull request adding a vulnerable dependency is opened

B.

As soon as a vulnerable dependency is detected

C.

As soon as a pull request is opened by a contributor

D.

When Dependabot opens a pull request to update a vulnerable dependency

Question 19

Which of the following would raise secret scanning alerts?

Options:

A.

GitHub personal access token

B.

Structured Query Language (SQL) injection

C.

Cross-site scripting (XSS)

D.

Server-side request forgery

Question 20

Which of the following formats are used to describe a Dependabot alert? (Each answer presents a complete solution. Choose two.)​

Options:

A.

Common Weakness Enumeration (CWE)

B.

Exploit Prediction Scoring System (EPSS)

C.

Common Vulnerabilities and Exposures (CVE)

D.

Vulnerability Exploitability exchange (VEX)​

Question 21

What permission level is required to manage code scanning alerts in a repository?

Options:

A.

Read

B.

Maintain

C.

View

D.

Triage

Question 22

What is a prerequisite to define a custom pattern for a repository?

Options:

A.

Change the repository visibility to Internal

B.

Close other secret scanning alerts

C.

Specify additional match criteria

D.

Enable secret scanning

Question 23

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

Options:

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​

Question 24

To be compatible with code scanning, what data format must third-party code scanning tools use for output?

Options:

A.

Static Analysis Results Interchange Format (SARIF)

B.

YAML

C.

ESLint

D.

ECMAScript

Question 25

When does secret scanning skip reporting a secret?

Options:

A.

When the secret is in a set of credentials from a service provider.

B.

When the secret is part of a new commit.

C.

After switching a private repository to a public repository.

D.

When the secret has been revoked from the repository.

Question 26

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?

Options:

A.

Enable all in existing repositories

B.

Enable by default for new public repositories

C.

Enable all for Dependabot alerts

D.

Enable all for Dependency graph

Question 27

Which of the following is the most complete method for Dependabot to find vulnerabilities in third-party dependencies?

Options:

A.

Dependabot reviews manifest files in the repository

B.

CodeQL analyzes the code and raises vulnerabilities in third-party dependencies

C.

A dependency graph is created, and Dependabot compares the graph to the GitHub Advisory database

D.

The build tool finds the vulnerable dependencies and calls the Dependabot API

Question 28

A secret scanning alert should be closed as "used in tests" when a secret is:

Options:

A.

In the readme.md file.

B.

In a test file.

C.

Solely used for tests.

D.

Not a secret in the production environment.

Question 29

What is the first step you should take to fix an alert in secret scanning?

Options:

A.

Archive the repository.

B.

Update your dependencies.

C.

Revoke the alert if the secret is still valid.

D.

Remove the secret in a commit to the main branch.

Question 30

What CodeQL query information must you specify to identify the results as a simple alert?

Options:

A.

@kind problem

B.

@kind diagnostic

C.

@kind path-problem

D.

@kind metric

Question 31

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

Options:

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.

Question 32

You want to specify a CodeQL configuration file for a GitHub Actions workflow. Which input to the init step in the CodeQL action do you use to pass the path of the configuration file?

Options:

A.

config-file

B.

source-root

C.

db-location

D.

queries

Question 33

What do you need to do before you can define a custom pattern for a repository?​

Options:

A.

Provide a regular expression for the format of your secret pattern.

B.

Add a secret scanning custom pattern.

C.

Enable secret scanning on the repository.

D.

Provide match requirements for the secret format.​

Stack Overflow

Question 34

A colleague ignores a code scanning alert. What are the implications of the colleague's action? (Each answer presents part of the solution. Choose three.)

Options:

A.

A dangerous argument could be passed to functions.

B.

Data could be used insecurely.

C.

GitHub removes the alert after sixty days.

D.

Webhooks and the code scanning API remove the alert.

E.

Sensitive information could be leaked.

Question 35

Assuming that no custom Dependabot behavior is configured, who has the ability to merge a pull request created via Dependabot security updates?​

Options:

A.

An enterprise administrator

B.

A user who has write access to the repository

C.

A user who has read access to the repository

D.

A repository member of an enterprise organization​

Question 36

Who can fix a code scanning alert on a private repository?​

Options:

A.

Users who have the Triage role within the repository

B.

Users who have Read permissions within the repository

C.

Users who have Write access to the repository

D.

Users who have the security manager role within the repository​

Question 37

What happens when you remove someone's access to a private repository?

Options:

A.

Local clones of the private repository are deleted.

B.

Team access to a private repository is revoked.

C.

Their forks of that private repository are deleted.

D.

Confidential information is deleted.

Demo: 37 questions
Total 125 questions