GH-500 practice question 10 of 15

– [Configure and Use Secret Scanning] Which details do you have to provide to create a custom pattern for secret scanning? (Each answer presents part of the solution. Choose two.)

Full set: 75 questions
Answer options
A:

A. The secret format

Correct answer
B:

B. The name of the pattern

Correct answer
C:

C. A list of repositories to scan

D:

D. Additional match requirements for the secret format

Correct Answer:
A. A. The secret format; B. B. The name of the pattern
Explanation

When defining a custom pattern for GitHub secret scanning, two fields are mandatory for its creation. You must provide a unique Name to identify and manage the pattern. You must also define the Secret format using a regular expression (regex). This regex is the core of the pattern, specifying the structure of the secret that the scanning engine will search for. These two components are the minimum required details to save a new custom pattern at the organization or enterprise level.

Why Incorrect

C. A list of repositories to scan Specifying repositories is part of enabling or configuring a scan, not defining the pattern itself.
D. Additional match requirements for the secret format These are optional settings, such as "surrounding content," used to refine the main pattern and reduce false positives, not a mandatory creation detail.

References

1. GitHub Docs

"Defining custom patterns for secret scanning." This official documentation outlines the steps for creating a custom pattern. In the section "Creating a custom pattern

" it explicitly lists "Name" and "Secret format (regex)" as required fields. It also describes "Additional match requirements" as an optional step to refine results. The process described does not include selecting repositories during pattern creation.

Reference Location: Navigate to the "Creating a custom pattern" section. The input fields in the UI steps clearly distinguish between required and optional information.

2. GitHub Docs

"About secret scanning." This document provides an overview of the feature and distinguishes between defining patterns and enabling them for repositories. It clarifies that patterns are defined at the organization/enterprise level before being applied to specific repositories or all repositories.

Reference Location: See the section on "Defining custom patterns for secret scanning."

Scroll to Top