GH-100 practice question 14 of 15

In a GitHub repository using Dependabot, which of the following best describes the purpose of the .github/dependabot.yml file?

Full set: 65 questions
Answer options
A: It configures scheduling, package ecosystems, and target directories for update checks. Correct answer
B: It lists commit SHAs to exclude from automatic pull requests.
C: It enables GitHub to scan for secrets in dependency files.
D: It encrypts dependency versions before storing them in the repo.
Correct Answer:
A. It configures scheduling, package ecosystems, and target directories for update checks.
Explanation

The .github/dependabot.yml file is the central configuration file used to manage Dependabot version updates within a GitHub repository. Its primary purpose is to define how Dependabot scans and creates pull requests for outdated dependencies. This is achieved by specifying required parameters such as the package manager (package-ecosystem), the location of the manifest file (directory), and the frequency of checks (schedule.interval). This file provides developers with granular control over the automated dependency update process, allowing them to tailor it to their project's specific needs and CI/CD pipeline.

Why Incorrect

B. The file is used to ignore specific dependencies or versions using the ignore condition, not to exclude updates based on commit SHAs.
C. This describes GitHub secret scanning, a distinct security feature that is configured in repository settings and is not managed through the dependabot.yml file.
D. Dependabot and its configuration file do not perform encryption; they read and update plain-text dependency manifest files like package.json or pom.xml.

References

1. GitHub Docs, "Configuration options for the dependabot.yml file." This official documentation details all available options for the dependabot.yml file. It explicitly lists package-ecosystem, directory, and schedule as top-level required options for each entry in the updates array, directly supporting the correct answer. See the section "Required options."

2. GitHub Docs, "About Dependabot version updates." This document states, "You enable Dependabot version updates by checking a dependabot.yml configuration file into the .github directory of your repository." This confirms the file's role as the central enabler and configuration point for this feature.

3. GitHub Docs, "About secret scanning." This resource describes secret scanning as a separate feature for finding accidentally committed secrets. Its configuration and operation are entirely independent of Dependabot and the dependabot.yml file, confirming that option C is incorrect. See the section "About secret scanning."

Scroll to Top