Developer Tools

Composer Audit: Check PHP Dependencies for Advisories

Composer audit checks installed dependencies against security advisories and helps teams identify vulnerable packages.

Overview

Composer includes an audit command that checks dependency information against configured advisory data sources. It helps maintainers identify packages with known security advisories.

When to run it

Run dependency audits during development, in continuous integration and before production releases. Combine audit results with regular dependency updates and review of package maintenance status.

Interpreting findings

A reported advisory should be reviewed for affected versions, severity, exploit conditions and available fixed releases. Update within compatible version constraints where possible, then run tests to catch regressions.

Limitations

An audit is not a complete security assessment. It does not prove that an application is secure or detect every vulnerability in custom code. Keep lock files committed and use trusted package sources.

Official resource

Composer CLI documentation

Share this page Help other developers discover this resource.