Configure GitHub Advanced Security Tools in GitHub Enterprise

Dependabot reviews manifest files in the repository

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

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

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

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

Explanation:
Dependabot's core function is to keep dependencies secure and up-to-date. It works by first generating a dependency graph from your repository's manifest and lock files. Dependabot then continuously compares this graph against the GitHub Advisory Database, which contains known security vulnerabilities. When a match is found between a dependency in your project and a vulnerability in the database, Dependabot creates an alert and can automatically generate pull requests to update the affected dependency to a safe version.

Correct Option:

B. A dependency graph is created, and Dependabot compares the graph to the GitHub Advisory database.
This accurately describes Dependabot's workflow. First, GitHub parses manifest files to build a comprehensive dependency graph. Dependabot then continuously monitors this graph against the GitHub Advisory Database, which aggregates vulnerability information from various sources including the National Vulnerability Database (NVD) and GitHub-reviewed advisories. When matches occur, Dependabot generates security alerts and can automatically create pull requests with version updates that resolve the vulnerability.

Incorrect Option:

A. CodeQL analyzes the code and raises vulnerabilities in third-party dependencies.
CodeQL is GitHub's semantic code analysis engine used for code scanning, not dependency scanning. While CodeQL can find vulnerabilities in your own code, it does not analyze third-party dependencies for known vulnerabilities. This is Dependabot's responsibility. Mixing these two distinct security features is a common misconception.

C. The build tool finds the vulnerable dependencies and calls the Dependabot API.
Build tools like Maven, npm, or Gradle do not have built-in functionality to identify vulnerable dependencies or call Dependabot APIs. Dependency checking requires access to an external vulnerability database, which build tools typically don't include. Dependabot operates independently, scanning repositories from GitHub's side rather than being triggered by local build tools.

Reference:
GitHub Docs - "About Dependabot alerts" / "About the GitHub Advisory Database"

As a contributor, you discovered a vulnerability in a repository. Where should you look for the instructions on how to report the vulnerability?

A. support.md

B. readme.md

C. contributing.md

D. security.md

D.   security.md

Explanation:
GitHub provides a standardized way for repository maintainers to communicate security reporting procedures. The SECURITY.md file is the designated location where project owners should include instructions for reporting security vulnerabilities. When this file exists, GitHub automatically displays a prominent "Security policy" link in the repository's Security tab and also shows a warning in the Issues section encouraging reporters to follow the security policy instead of creating a public issue.

Correct Option:

D. security.md
The SECURITY.md file is GitHub's recognized standard for security policies. Repository maintainers place instructions in this file about how security researchers and contributors should responsibly disclose vulnerabilities. GitHub's interface highlights this file prominently, making it the authoritative source for security reporting procedures. Following this standardized approach ensures vulnerability reports are handled privately and appropriately rather than exposed publicly.

Incorrect Option:

A. support.md
The SUPPORT.md file typically contains information about getting help with the project, such as community forums, documentation links, or commercial support options. While valuable for general assistance, it is not the standard location for security vulnerability reporting instructions and does not receive the same GitHub UI emphasis for security-related matters.

B. readme.md
The README.md file serves as the project's main introduction and typically includes installation instructions, basic usage examples, and project overview. While some projects might include security information here, it is not the standardized location. GitHub's security-specific UI elements do not automatically surface content from README files for vulnerability reporting.

C. contributing.md
The CONTRIBUTING.md file provides guidelines for developers who want to contribute code, report bugs, or suggest features. While it may contain some security-related guidance, its primary focus is on the contribution workflow. Security vulnerability reporting requires special handling (private disclosure) that is distinct from general contribution guidelines.

Reference:
GitHub Docs - "Adding a security policy to your repository" / "About security policies"

Which details do you have to provide to create a custom pattern for secret scanning? (Each answer presents part of the solution. Choose two.)

A. The secret format

B. The name of the pattern

C. A list of repositories to scan

D. Additional match requirements for the secret format

A.   The secret format
B.   The name of the pattern

Explanation:
When creating a custom pattern for secret scanning, you must provide essential identifying information that GitHub uses to detect the secret. This includes defining the actual secret format through a regular expression pattern and assigning a descriptive name to identify the pattern in alerts and management interfaces. These two elements form the foundation of any custom pattern, enabling GitHub to recognize and report exposures of your organization's specific credential types.

Correct Option:

A. The secret format.
The secret format defines the actual pattern that secret scanning will search for in your repository. This is typically provided as a regular expression (regex) that matches the structure of your organization's proprietary secrets, such as API keys, tokens, or credentials. The regex must be precise enough to identify genuine secrets while minimizing false positives. This is the core technical specification that enables detection.

B. The name of the pattern.
Providing a descriptive name for your custom pattern is required for identification and management purposes. The name appears in secret scanning alerts, allowing security teams to quickly understand which type of credential was exposed. It also helps in organizing multiple custom patterns and distinguishing between different secret types within the same organization.

Incorrect Option:

C. A list of repositories to scan.
While you can specify which repositories a custom pattern applies to during configuration, this is an optional scope setting, not a required element for creating the pattern itself. The pattern definition (name and format) must be created first; repository scope can be assigned afterward. You can also apply the same pattern to multiple repositories without redefining it.

D. Additional match requirements for the secret format.
Additional match requirements, such as surrounding keywords or file path restrictions, are optional refinements rather than mandatory elements. These help reduce false positives by providing context, but a valid custom pattern can be created with just the core secret format regex. The additional requirements enhance accuracy but are not fundamental to pattern creation.

Reference:
GitHub Docs - "Defining custom secret scanning patterns" / "Creating a custom pattern"

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

A. In the readme.md file.

B. In a test file.

C. Solely used for tests.

D. Not a secret in the production environment

C.   Solely used for tests.

Explanation:
When dismissing a secret scanning alert, GitHub provides several closure reasons including "Used in tests." This specific designation should be applied when a detected secret is genuinely used for testing purposes and poses no security risk. The key criterion is that the secret is exclusively used in test environments or test code, meaning it never grants access to production systems or sensitive data. This helps security teams distinguish between genuine exposures and intentional test credentials.

Correct Option:

C. Solely used for tests.
This accurately captures the condition for using the "Used in tests" dismissal reason. The secret must be exclusively used in testing contexts—such as test API keys, test database credentials, or dummy tokens—and should never provide access to production environments. This designation helps maintain accurate security metrics by excluding intentional test credentials from genuine security incident counts while documenting the reason for dismissal.

Incorrect Option:

A. In the readme.md file.
Simply being in a README file does not automatically qualify a secret as "used in tests." README files may contain example code with placeholder credentials, but they might also inadvertently include real secrets. The dismissal reason depends on the secret's actual purpose and environment, not just its file location. Documentation files containing real secrets should be handled as genuine exposures.

B. In a test file.
Location in a test file is a strong indicator but not sufficient by itself. Test files might contain credentials that, while used in testing, could also accidentally provide access to production-like environments or contain real credentials copied from production. The determining factor is whether the secret is actually used only in testing, not merely where it resides.

D. Not a secret in the production environment.
This description is too broad and potentially misleading. Many credentials that aren't used in production might still be sensitive in other contexts, such as staging environments containing real user data or development environments with access to sensitive information. The "Used in tests" designation specifically requires the secret to be test-only, not just non-production.

Reference:
GitHub Docs - "Managing secret scanning alerts" / "Dismissing alerts"

Which of the following workflow events would trigger a dependency review? (Each answer presents a complete solution. Choose two.)

A. pull_request

B. workflow_dispatch

C. trigger

D. commit

A.   pull_request
B.   workflow_dispatch

Explanation:
Dependency review is a GitHub feature that analyzes dependency changes in pull requests, showing the differences in both direct and transitive dependencies. It is triggered by specific workflow events where dependency changes can be introduced and reviewed. The pull_request event is the primary trigger since dependency review is designed for pre-merge analysis. Additionally, workflow_dispatch allows manual triggering, which is useful for testing or reviewing dependency changes outside the normal PR workflow.

Correct Option:

A. pull_request.
The pull_request event is the most common and appropriate trigger for dependency review. When a pull request is opened or updated, GitHub automatically analyzes the dependency changes between the base branch and the head branch. This provides reviewers with a clear visualization of added, removed, or updated dependencies, including transitive dependencies and any known vulnerabilities associated with them.

B. workflow_dispatch.
The workflow_dispatch event enables manual triggering of dependency review through the GitHub UI or API. This is valuable for scenarios where you need to review dependency changes outside of a pull request context, such as analyzing a specific branch's dependencies, auditing after a direct push to a protected branch, or investigating dependency-related issues without creating a PR.

Incorrect Option:

C. trigger.
"trigger" is not a valid GitHub Actions workflow event. It is a generic term that might refer to various event types, but it does not exist as a specific event name in GitHub's workflow syntax. Valid events include push, pull_request, schedule, workflow_dispatch, and others, but not simply "trigger."

D. commit.
While commits are the underlying units of change in Git, there is no specific commit event in GitHub Actions workflows. Changes are typically evaluated through push events (which include commits) or pull_request events. A standalone commit event does not exist in GitHub's workflow event taxonomy, making this an invalid trigger for dependency review.

Reference:
GitHub Docs - "About dependency review" / "Events that trigger workflows"

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

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

C.   Users who have Write access to the repository

Explanation:
Fixing a code scanning alert requires the ability to modify the source code to address the identified vulnerability or coding error. This necessitates write access to the repository, as the fix must be committed and pushed. While users with other roles can view alerts or manage their dismissal, the actual remediation—changing code to resolve the underlying issue—demands the ability to create commits and open pull requests with the necessary fixes.

Correct Option:

C. Users who have Write access to the repository.
Write access provides the necessary permissions to push code changes that fix the underlying issue causing the code scanning alert. Users with Write access can create branches, commit fixes, and open pull requests to address vulnerabilities. This permission level ensures that the person fixing the alert can modify the codebase while typically requiring pull request reviews for protected branches, maintaining security oversight.

Incorrect Option:

A. Users who have the Triage role within the repository.
The Triage role allows users to manage issues and pull requests but does not grant write access to code. Triage users can view code scanning alerts, add labels, close issues, and manage discussions, but they cannot commit code changes to fix the underlying vulnerabilities. Their permissions are limited to project management, not code modification.

B. Users who have Read permissions within the repository.
Read permissions allow users to view code and alerts but not modify anything. These users can see that a code scanning alert exists and examine the vulnerable code, but they cannot push fixes or create pull requests to resolve the issue. Read-only access is insufficient for any remediation action requiring code changes.

D. Users who have the security manager role within the repository.
The security manager role grants permissions to manage security settings and alerts across repositories, including dismissing alerts and configuring security features. However, this role does not automatically include write access to code. Security managers can manage alert states but may need write permissions or collaboration with developers to actually fix the underlying code.

Reference:
GitHub Docs - "Repository permission levels for an organization" / "Managing code scanning alerts"

Which patterns are secret scanning validity checks available to?

A. High entropy strings

B. Custom patterns

C. Partner patterns

D. Push protection patterns

C.   Partner patterns

Explanation:
Secret scanning validity checks are advanced verification mechanisms that GitHub performs to confirm whether a detected potential secret is actually a valid, active credential. These checks involve contacting the service provider's API to validate the secret before generating an alert. This capability is currently available exclusively for partner patterns—secrets issued by service providers who have formal partnerships with GitHub and have implemented the necessary API endpoints for real-time validation.

Correct Option:

C. Partner patterns.
Partner patterns benefit from validity checks because GitHub has established direct integrations with these service providers. When a potential secret matching a partner pattern is detected, GitHub can securely query the provider's API to verify whether the credential is genuine and active. This dramatically reduces false positives because only confirmed valid secrets trigger alerts. Partners like AWS, Google, Slack, and over 100 other providers participate in this program.

Incorrect Option:

A. High entropy strings.
High entropy strings are detected through pattern matching that identifies strings with high randomness, which may indicate secrets like API keys. However, GitHub cannot perform validity checks on these because there is no associated service provider to validate them. Without a partner relationship, GitHub cannot determine if a high entropy string is a real credential or random text.

B. Custom patterns.
Custom patterns are defined by organizations for their proprietary secrets. While GitHub can scan for these patterns, validity checks are not available because GitHub does not have integrations with the organization's internal systems to validate the credentials. Organizations must manually verify and dismiss false positives for their custom pattern detections.

D. Push protection patterns.
Push protection is a feature that blocks pushes containing secrets, but it applies to the same pattern types as secret scanning. Validity checks are still limited to partner patterns even when push protection is enabled. The protection mechanism can block based on pattern matching, but only partner patterns receive the additional validation step.

Reference:
GitHub Docs - "About secret scanning" / "Validity checks for partner patterns"

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

A. Security

B. Settings

C. Secrets

D. Insights

B.   Settings

Explanation:
Managing access to secret scanning alerts involves controlling who can view and respond to security notifications. GitHub provides granular permission management through repository settings, where administrators can configure teams and individuals with specific roles. The Security tab displays the alerts themselves, but the actual access control—determining which users can see and manage these alerts—is configured in the repository's Settings under "Collaborators and teams" and "Security & analysis" sections.

Correct Option:

B. Settings.
Repository Settings is where administrators manage all access controls, including permissions for security features. Within Settings, you can add collaborators, assign teams, and configure roles that determine who can view secret scanning alerts. Users need appropriate permissions (typically Write, Triage, or Security Manager roles) to access the Security tab and its alerts. Access is granted through standard GitHub permission management in Settings.

Incorrect Option:

A. Security.
The Security tab is where secret scanning alerts are displayed and managed after access has been granted. It is the destination for users with appropriate permissions to view and dismiss alerts, not the location where you grant access to additional users. Access must be configured in Settings before users can see anything in the Security tab.

C. Secrets.
There is no "Secrets" tab in standard GitHub repository navigation for managing user access. Secrets typically refer to encrypted environment variables used in GitHub Actions or Codespaces, which are configured separately in Settings under "Secrets and variables." This option is confusing secret scanning with GitHub Actions secrets, which are entirely different features.

D. Insights.
The Insights tab provides analytics and metrics about repository activity, including contributor statistics, dependency graphs, and traffic data. It does not contain user access management functionality and is not where you would grant permissions for secret scanning alerts. Insights is for viewing data, not configuring permissions.

Reference:
GitHub Docs - "Managing security and analysis settings for your repository" / "Access permissions on GitHub"

What are Dependabot security updates?

A. Automated pull requests that help you update dependencies that have known vulnerabilities

B. Automated pull requests that keep your dependencies updated, even when they don’t have any vulnerabilities

C. Automated pull requests to update the manifest to the latest version of the dependency

D. Compatibility scores to let you know whether updating a dependency could cause breaking changes to your project

A.   Automated pull requests that help you update dependencies that have known vulnerabilities

Explanation:
Dependabot security updates are a specialized GitHub feature focused on vulnerability remediation. When Dependabot detects a dependency with a known security vulnerability, it automatically generates pull requests to update that dependency to the minimum safe version that resolves the vulnerability. This targeted approach helps development teams quickly address security risks while minimizing disruption, as the updates are specifically tailored to fix known vulnerabilities rather than chasing latest versions.

Correct Option:

A. Automated pull requests that help you update dependencies that have known vulnerabilities.
This accurately defines Dependabot security updates. The feature monitors your dependency graph against the GitHub Advisory Database. When a vulnerability is found in a dependency you use, Dependabot automatically creates a pull request that updates the dependency to a secure version—typically the patch release that fixes the vulnerability. This automation helps teams remediate security issues quickly before they can be exploited.

Incorrect Option:

B. Automated pull requests that keep your dependencies updated, even when they don't have any vulnerabilities.
This describes Dependabot version updates, not security updates. Version updates are a separate feature that can be configured to regularly check for and create pull requests with the latest versions of dependencies, regardless of security status. Security updates are specifically triggered by and focused on vulnerability remediation.

C. Automated pull requests to update the manifest to the latest version of the dependency.
While Dependabot security updates do update manifest files, they target the minimum secure version that fixes a vulnerability, not necessarily the latest version. The priority is resolving the security issue with the smallest possible change to reduce regression risk. Latest version updates are handled by the separate version updates feature.

D. Compatibility scores to let you know whether updating a dependency could cause breaking changes to your project.
Compatibility scores are a feature that Dependabot may display alongside pull requests, but they are not the definition of security updates. These scores provide information about whether the update is likely to be compatible based on your project's tests and dependency relationships, but they are supplementary information, not the update itself.

Reference:
GitHub Docs - "About Dependabot security updates" / "About Dependabot version updates"

When using CodeQL, what extension stores query suite definitions?

A. .yml

B. .ql

C. .qll

D. .qls

D.   .qls

Explanation:
CodeQL uses specific file extensions to organize its query language and associated components. Query suite definitions are configuration files that group multiple queries together for specific analysis purposes. These suite files tell CodeQL which queries to run during a scan, allowing for organized and reusable collections of security and code quality checks. The file extension distinguishes suite definitions from individual query files and library files.

Correct Option:

D. .qls.
The .qls extension stands for "QL suite" and is used specifically for query suite definition files. These files contain references to individual queries (.ql files) or other query suites, organizing them into logical groups. For example, a security suite might include all queries related to SQL injection, cross-site scripting, and other vulnerabilities. The suite format allows CodeQL to run comprehensive, targeted analyses.

Incorrect Option:

A. .yml.
The .yml extension is used for YAML files, which in the CodeQL context are typically workflow configuration files for GitHub Actions or CodeQL CLI configuration. While YAML files are crucial for setting up and running CodeQL scans (like the codeql-analysis.yml workflow), they do not store query suite definitions themselves.

B. .ql.
The .ql extension is used for individual CodeQL query files. These files contain the actual query logic written in QL, CodeQL's query language. Each .ql file represents a single security vulnerability or code quality check. Query suites (.qls) reference these individual query files to create collections.

C. .qll.
The .qll extension stands for "QL library" and is used for library files in CodeQL. These files contain reusable code, modules, and predicates that can be imported into multiple queries. Libraries provide common functionality and data flow models that queries depend on, but they do not define query suites.

Reference:
GitHub Docs - "About CodeQL" / "CodeQL query suites"

Page 2 out of 8 Pages