GITHUB-ADVANCED-SECURITY practice question 4 of 15

– [Configure and Use Secret Scanning] What is a prerequisite to define a custom pattern for a repository?

Full set: 75 questions
Answer options
A: Change the repository visibility to Internal
B: Close other secret scanning alerts
C: Specify additional match criteria
D: Enable secret scanning Correct answer
Correct Answer:
D. Enable secret scanning
Explanation

Custom patterns are an extension of the core secret scanning functionality within GitHub Advanced Security. The ability to define, configure, and use these custom patterns is contingent upon the base secret scanning feature being active. Therefore, enabling secret scanning for the repository (or organization) is the fundamental prerequisite before you can proceed with defining any custom detection rules. Without the core service running, there is no mechanism to process or apply the custom patterns.

Why Incorrect

A. Changing repository visibility is not a prerequisite. Custom patterns can be defined for any repository where GitHub Advanced Security is enabled, which includes private and internal repositories.
B. Closing other secret scanning alerts is an unrelated administrative task. The state of existing alerts has no bearing on the ability to configure new detection patterns.
C. Specifying additional match criteria is a step within the process of defining a custom pattern, not a prerequisite to starting that process.

References

1. GitHub Docs, "Defining custom patterns for secret scanning." In the introductory section, the documentation explicitly states: "Before you can define a custom pattern for secret scanning, you must enable secret scanning for your repository or organization." This directly confirms that enabling the feature is the primary prerequisite.

2. GitHub Docs, "Managing security and analysis settings for your repository." This document outlines the process for enabling or disabling GitHub Advanced Security features. Under the "Enabling or disabling security and analysis features" section, it shows that "GitHub Advanced Security" must be enabled, which in turn allows for the configuration of its components like "Secret scanning." This establishes the enabling step as the gateway to further configuration.

3. GitHub Docs, "About secret scanning." The section "About custom patterns for secret scanning" describes custom patterns as a feature that builds upon the existing secret scanning service, reinforcing that the base service must be active first.

Scroll to Top