Safeguard
Supply Chain•

What is a dependency audit checklist for Rails and Laravel teams?

A practical dependency audit checklist for Rails and Laravel: lockfiles, advisory checks in CI, ignore records, nightly runs, and reachability triage.

Safeguard Security Team
3 min read

A dependency audit for Rails or Laravel means checking your lockfile against known advisories on every change and on a schedule, recording decisions, and ranking findings by whether your code reaches the vulnerable part. Use bundle-audit for Ruby and composer audit for PHP, then act on the results.

Step one: know what you ship

You cannot audit what you have not listed. Commit Gemfile.lock and composer.lock, so the exact versions are recorded. The bundler-audit README says it checks Gemfile.lock for vulnerable versions. Composer's documentation lists an audit command among its commands and offers audit options on install and update, which include choosing the output format.

An inventory should also include transitive packages, JavaScript dependencies pulled in by your asset pipeline, and anything in the container image.

Step two: wire checks into CI

CheckRubyPHP
Lockfile auditbundle-audit check --updatecomposer audit
Run onPull requests and nightlyPull requests and nightly
OutputJSON for recordsTable, plain, JSON or summary formats
Ignores.bundler-audit.yml or flagComposer audit ignore settings

Both tools can write machine readable output, which you can keep as a build artifact. Our guides on bundler-audit in CI and composer audit cover each in detail.

Step three: triage with a short rubric

  1. Is the vulnerable version actually deployed?
  2. Is a fixed version available, and is the upgrade small?
  3. Does your code call the affected function or accept the affected input?
  4. Is the service internet facing?
  5. Is there a known exploit in the wild?

A finding that is deployed, fixable and reachable goes first. One that is in a development only gem and unreachable can wait, with a note.

Step four: record decisions

Every ignore needs a reason, an owner and a review date. Without that, an ignore list becomes a graveyard of forgotten risk. The Composer settings document ignores for audit and for abandoned packages, so there is a natural place to write them down.

Step five: schedule it

New advisories appear while your code sits still. A nightly job on the main branch catches them, and a weekly review turns them into tickets. After a security release of your framework, run the audit the same day.

Try it yourself

Open the walkthrough to see how reachability changes the order of a findings list. Click a finding and look at what moves down once it is marked unreachable.

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

Quick check

Is one audit tool enough for a mixed app?

Each tool reads one ecosystem's lockfile. An app with Ruby, PHP and JavaScript needs coverage of each, or a scanner that reads all of them.

How often should the audit run?

On every pull request that touches a lockfile, nightly on the main branch, and right after a framework security release.

Safeguard offers SBOM and dependency scanning with reachability analysis and policy gates, so findings arrive ranked and enforced in the pull request. Try a free scan at gold.safeguard.sh/scan.

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.