GITHUB-ADVANCED-SECURITY practice question 11 of 15

– [Configure and Use Dependency Management] In a private repository, what minimum requirements does GitHub need to generate a dependency graph? (Each answer presents part of the solution. Choose two.)

Full set: 75 questions
Answer options
A: Read-only access to all the repository's files
B: Dependency graph enabled at the organization level for all new private repositories Correct answer
C: Write access to the dependency manifest and lock files for an enterprise
D: Read-only access to the dependency manifest and lock files for a repository Correct answer
Correct Answer:
B. Dependency graph enabled at the organization level for all new private repositories; D. Read-only access to the dependency manifest and lock files for a repository
Explanation

For GitHub to generate a dependency graph for a private repository, two fundamental requirements must be met. First, unlike public repositories where the feature is on by default, the dependency graph must be explicitly enabled for private repositories. This can be done at the individual repository level or set as a policy for new repositories at the organization level (Option B). Second, GitHub's analysis service requires read-only access specifically to the repository's dependency manifest and lock files (e.g., package.json, pom.xml, Gemfile.lock). This access allows GitHub to parse the declared dependencies and construct the graph (Option D).

Why Incorrect

A. Access to all repository files is not required. GitHub only needs to parse specific manifest and lock files, adhering to the principle of least privilege.
C. Write access is unnecessary for generating the dependency graph. Write permissions are required for features like Dependabot that create pull requests to update dependencies, not for simply reading them.

References

1. GitHub Docs, "Configuring the dependency graph":

Section: Prerequisites for the dependency graph: "To generate a dependency graph, GitHub needs read-only access to the dependency manifest and lock files for a repository." This directly supports option D.

Section: Enabling and disabling the dependency graph for a private repository: "For private repositories, you must enable the dependency graph." This section details how to enable the feature for a single repository or for all repositories in an organization, supporting the requirement described in option B.

2. GitHub Docs, "About the dependency graph":

Section: Availability of the dependency graph: "The dependency graph is automatically generated for all public repositories. You can choose to enable it for private repositories..." This confirms that enablement is a mandatory step for private repositories, which is the core principle behind option B.

Scroll to Top