GitHub Dependency Scanning and Dependabot
What You'll Learn
You'll learn how to configure GitHub's native tools to automatically detect vulnerable dependencies and keep them updated without manual intervention.
What GitHub Dependency Scanning Does
Think of GitHub's dependency scanning like having a security guard who automatically checks every package entering your codebase against a database of known criminals (vulnerabilities). When you push code to GitHub, it automatically:
- Scans your dependency lock files (package-lock.json, Gemfile.lock, requirements.txt, etc.)
- Compares them against vulnerability databases (like the GitHub Advisory Database)
- Alerts you when vulnerable versions are detected
This is passive scanning — it warns you but doesn't fix anything.
What Dependabot Adds
Dependabot is the proactive assistant. It doesn't just alert you — it takes action:
- Security updates: Automatically creates pull requests to upgrade vulnerable dependencies to patched versions
- Version updates: Can also keep non-vulnerable dependencies fresh by creating PRs for new releases
- Automated bumping: Follows your configured rules (e.g., only patch versions, or minor versions too)
Enabling the Features
On GitHub repositories, you can enable:
- Dependency graph: Shows all your dependencies visually
- Dependabot alerts: Notifications when vulnerabilities are found
- Dependabot security updates: Auto-PRs to fix vulnerabilities
- Dependabot version updates: Auto-PRs to update dependencies based on schedule
Configuration lives in .github/dependabot.yml where you specify which package ecosystems to monitor, update schedules, and version update strategies.
Key Takeaway: GitHub Dependency Scanning provides automated vulnerability detection for your dependencies, while Dependabot goes further by automatically creating pull requests to update vulnerable or outdated packages, reducing manual security maintenance work.