Subdomain 1.3: Detect, manage, and respond to security alerts
1.What is the primary difference between Dependabot alerts and code scanning alerts?
- A.Dependabot identifies vulnerabilities in dependencies, while code scanning detects vulnerabilities in the codebase itself.
- B.Dependabot is limited to JavaScript projects, whereas code scanning supports all programming languages.
- C.Dependabot alerts are generated by GitHub, but code scanning requires third-party integration.
- D.Dependabot runs only on manual triggers, and code scanning runs automatically on each push.
Show answer & explanation
Correct answer: A — Dependabot identifies vulnerabilities in dependencies, while code scanning detects vulnerabilities in the codebase itself.
- A. Correct. Dependabot alerts focus on known vulnerabilities in project dependencies (e.g., outdated or insecure libraries declared in manifest or lock files). Code scanning alerts identify vulnerabilities directly in the repository's own code, typically using static analysis to detect security flaws, hardcoded secrets, or insecure patterns.
- B. Incorrect. Dependabot is not limited to JavaScript; it supports many ecosystems such as npm, pip, Maven, NuGet, and RubyGems. Code scanning also supports a wide range of languages, but this is not the primary difference.
- C. Incorrect. Both Dependabot alerts and code scanning are native GitHub features. Code scanning can be powered by GitHub-native tools like CodeQL, though third-party tools can also integrate; it does not require third-party integration.
- D. Incorrect. Dependabot alerts are automatically generated when GitHub detects vulnerable dependencies, and can also be triggered manually or on a schedule. Code scanning runs automatically on pushes and pull requests, but this is not the primary distinction.