Safeguard
Security Guides•

Scheduled or event-driven vulnerability scans: which should you use?

Use both. Event-driven scans catch what you change, scheduled scans catch what the world learns later. Here is how to split the work between them.

Safeguard Security Team
4 min read

Use both. Event-driven scans run when your code changes, such as a pull request or a release, and catch problems you introduce. Scheduled scans run on a clock and catch problems that were published after you shipped. Neither one covers the other's gap, so a sound setup pairs them.

Definitions

An event-driven scan starts because something happened: a push, a pull request, a merge, a tag, a deployment or an incoming webhook. A scheduled scan starts because time passed: a nightly cron job, a weekly sweep, a monthly full audit.

The distinction matters because vulnerabilities have two origins. You can add a vulnerable dependency today. Or a dependency you added a year ago can become vulnerable tomorrow, when a researcher publishes an advisory. Your code did not change, so no event fires.

What each trigger catches

TriggerCatchesMisses
Pull requestVulnerable packages and code you are about to mergeAdvisories published after merge
Merge to mainAnything that slipped past review, plus the exact released stateAdvisories published later
Release or tagA record of what shippedEverything after the tag
Nightly scheduleNew advisories against code that has not changedNothing about today's edits until the next run
New advisory signalFast response to a specific disclosureAnything the signal source lacks

How to split the work

  1. Gate on events. Run a fast scan on every pull request and fail the check on the findings you have agreed to block. Keep it quick, because developers wait on it.
  2. Record on release. Generate an inventory (an SBOM) at release time and store it. That stored file is what your scheduled job re-checks later.
  3. Sweep on a clock. Once a day, re-match stored inventories against the latest advisory data. This does not need a rebuild, which keeps it cheap.
  4. React to urgent signals. Add a trigger for the small set of advisories that need action within days, such as entries on a known-exploited list. The CISA Known Exploited Vulnerabilities catalog publishes JSON and CSV files you can poll.

For a deeper take on the nightly sweep, see how often should you scan dependencies.

When to lean one way

A small team with a few repositories can start with pull request scans plus one nightly job and be well covered. A team with hundreds of services needs the signal triggers too, because a nightly sweep across everything can take hours and a response to an urgent advisory should not wait for it.

If you only pick one, pick events. Blocking a bad dependency before it merges is cheaper than finding it in production. But accept that you are then blind to anything published after the merge.

Try it yourself

Open the demo and look at how a monitored inventory changes state without any code change. The point to notice is that a finding appears while nothing in the repository moved.

Click through it at your own pace, or open it full screen.

Where Safeguard fits

Safeguard offers SBOM and dependency scanning, reachability analysis and policy gates for pull requests. You can try a free scan at gold.safeguard.sh/scan.

Quick check

Is a nightly scan enough on its own?

No. It tells you about new advisories the next morning, but it does not stop a vulnerable dependency from merging today. Add a pull request check.

Do event-driven scans find new advisories?

Only if the event is an advisory signal. A pull request scan uses the data available at that moment and will not rerun when new data arrives.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.