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 questionsWhen 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.
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.
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."
Keep practicing
Take the free GH-500 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other GH-500 practice questions
- Question 1– [Configure and Use Secret Scanning] Secret scanning will scan:
- Question 2– [Use Code Scanning with CodeQL] Why should you dismiss a code scanning alert?
- Question 3– [Configure and Use Secret Scanning] A secret scanning alert should be closed as "used i…
- Question 4– [Configure and Use Dependency Management] Which of the following formats are used to de…
- Question 5– [Configure GitHub Actions Workflows] As a repository owner, you do not want to run a Gi…
- Question 6– [Describe GitHub Advanced Security Best Practices] Which of the following benefits do c…
