Set Up Dependency Vulnerability Scanning on GitHub
To scan dependencies for vulnerabilities on GitHub, enable the dependency graph and alerts, turn on automated update pull requests, add a check that fails builds on serious findings, and agree on how quickly each severity gets fixed. Most of the work is triage, not tooling.
This guide takes you from a repository with nothing enabled to a workflow that produces a short, actionable list.
Vendors Covered in this Article
Disclosure: We may earn a commission if you buy through some links on this page. It doesn't change what we recommend.
What do you switch on first?
Start with the free layer built into GitHub, then decide whether you need more.
- Open repository or organization security settings and enable the dependency graph, so GitHub knows what each project uses.
- Enable dependency alerts, which warn when a package version matches a published advisory.
- Enable automated security updates so GitHub opens pull requests that bump vulnerable packages.
- Commit your lockfiles. Scanning a manifest with loose version ranges can't tell you what actually runs in production.
- Send alert notifications to a place someone reads, such as a shared channel or a weekly digest, not to individual inboxes.
Apply the settings at the organization level so new repositories inherit them. Check archived and forgotten repositories too, since old services with live credentials are a favorite target.
How to add a check that blocks risky changes in CI
Alerts tell you about existing problems. A pull request check stops new ones. Options range from GitHub's dependency review action, which compares the dependencies a pull request adds or changes against known advisories, to third-party scanners such as Snyk or GitHub Advanced Security features that add code scanning and secret detection alongside dependency checks.
Whichever you choose, set the policy deliberately. A common starting point is to fail the build on critical and high findings that have a fix available, and to warn without failing on the rest. Blocking on issues nobody can fix trains people to bypass the check. Also decide what your scanner does with license problems if you care about them, since some tools report both.
How do you triage findings without drowning?
A first scan of a mature project can return hundreds of alerts. Sort them with a few questions rather than fixing in order:
- Is the vulnerable package in production code or only in build and test tooling?
- Is the vulnerable function actually called, or is the package present but the affected feature unused?
- Is the service reachable from the internet, and does the flaw need authentication or special input?
- Is there a known exploit in the wild? A vulnerability that attackers are using jumps the queue regardless of score.
- Is a fixed version available, and is it a patch bump or a breaking major upgrade?
Severity scores are inputs, not orders. A high score in a dev-only tool can wait, and a medium one in your login path might not. Record each decision, including 'accepted risk for now, revisit on date', so the reasoning survives staff changes.
What fix deadlines should you set?
Deadlines turn a backlog into a process. Federal agencies work to fixed remediation windows set by CISA's binding directives, which many private teams borrow as a starting point; check the current directives for the exact windows. Your own targets can be looser or tighter depending on customers and contracts.
How fast you can meet any deadline depends on how fast you can ship. DORA's 2024 report puts lead time for changes anywhere from under one day to one to six months across its performance clusters1. If a routine patch takes weeks to reach production, work on the delivery pipeline before you tighten the policy. Track time-to-fix per severity and report it monthly.
Common mistakes and how to avoid them
Patterns that undermine the setup:
- Merging update pull requests without running tests, then reverting when something breaks and never trying again.
- Ignoring transitive dependencies. The vulnerable package is often two levels down, and fixing it means updating the parent or overriding the version.
- Letting the scanner's ignore list grow with no expiry dates.
- Scanning only the default branch and missing long-lived release branches.
- Treating a clean scan as proof of safety. Scanners only know published advisories.
Pair this with secret detection in the same pipeline. For choosing between paid options, see Snyk vs Veracode vs GitHub Advanced Security, and for the workflow by team type, DevSecOps vulnerability scanning.
What Good Looks Like
Every repository reports its dependencies, new vulnerable versions are blocked in pull requests, and each finding has a severity-based deadline and an owner.
Building The Capability (5-Stage Skill Ladder)
How to Get Started
Disclosure: We may earn a commission if you buy through some links on this page. It doesn't change what we recommend.
Frequently Asked Questions
Is GitHub's built-in dependency scanning enough?
For many small teams it covers the basics: alerts and update pull requests. Consider adding a paid tool if you need reachability analysis, policy controls across many repositories, or code and container scanning in one place.
Should dependency scan failures block merges?
Block on critical and high findings that have a fix available, and warn on the rest. Blocking on unfixable issues teaches engineers to bypass the check and makes the whole gate meaningless.
What is the difference between direct and transitive dependencies?
Direct dependencies are the packages you list yourself. Transitive ones are pulled in by those packages. Many vulnerabilities live in transitive ones, so fixes often mean upgrading a parent package or overriding a version.
How often should we review dependency alerts?
Look at new critical and high alerts as they arrive, and hold a short weekly triage for the rest. Report time-to-fix per severity monthly so trends are visible.
Sources
Where we quote a benchmark, we show its source. Other figures in this guide are estimates or general guidance, so check them against your own numbers.
- Lead time for changes by DORA performance cluster (upper bound, days). DORA Accelerate State of DevOps 2024 (Google Cloud), cluster table via Octopus Deploy analysis, 2024.
Related Guides
Snyk vs Veracode vs GitHub Advanced Security: AppSec Tool Comparison
Compare Snyk, Veracode, and GitHub Advanced Security: SAST, SCA, container security, secret scanning, automated remediation, and SOC 2 compliance.
Running Vulnerability Scans Without Drowning in False Positives
A worked breakdown of what continuous vulnerability scanning really costs in engineering triage time, and how to tune it so findings get fixed.
Building a Vulnerability Scanning Program That Doesn't Just Generate Noise
How to triage vulnerability scan results by real exploitability instead of raw severity score, so the program finds real risk instead of burying it in noise.
Application Security for Agencies Building AI Workflows
How AI and workflow automation agencies weigh Snyk against GitHub Advanced Security when every build pulls in new packages and API keys fast.
Setting a Vulnerability Remediation SLA Your Team Can Actually Hit
A worked example for setting realistic vulnerability scanning and remediation timelines for zero trust APIs, based on the federal severity tiers.
Turning Vulnerability Scan Results Into Actually Fixed Bugs
Why most vulnerability scanners produce a pile of alerts nobody closes, and a practical process for triage, ownership, and remediation that actually works.