1. GitHub Docs, "About Dependabot alerts": This document explicitly states the process: "When GitHub detects a vulnerability from the GitHub Advisory Database, we find every repository that uses the affected version of the dependency and we send a Dependabot alert. We generate Dependabot alerts when: A new vulnerability is added to the GitHub Advisory Database... The dependency graph for one of your repositories changes..." This confirms the use of both the dependency graph and the Advisory Database.
Source: GitHub Docs, "About security alerts for vulnerable dependencies", Section: "How Dependabot alerts are generated".
2. GitHub Docs, "About the dependency graph": This page details how the graph is generated and its purpose. "The dependency graph is a summary of the manifest and lock files stored in a repository... GitHub uses the dependency graph to identify repositories that use a vulnerable dependency when a new security advisory is published." This supports the first part of the correct answer.
Source: GitHub Docs, "About the dependency graph", Introduction.
3. GitHub Docs, "Browsing security advisories in the GitHub Advisory Database": This resource describes the database that Dependabot uses for comparison. "The GitHub Advisory Database contains a curated list of security vulnerabilities that you can view, search, and filter." This confirms the second part of the correct answer.
Source: GitHub Docs, "Browsing security advisories in the GitHub Advisory Database", Introduction.