phpwarden vs. composer audit

composer audit is built into Composer and flags known-vulnerable Composer packages. phpwarden also covers the PHP engine and WordPress, ranks findings by real-world exploitation (CISA KEV + EPSS), and checks reachability. Here's exactly how they differ.

Short version: composer audit is free, already in Composer, and perfect as a first gate on your composer.lock. phpwarden is a superset for PHP specifically: it scans the same Composer dependencies and your PHP engine version and WordPress install, ranks everything by what attackers are actually exploiting, and tells you whether a vulnerable package is even reachable in your code. Use composer audit if Composer dependencies are all you care about; use phpwarden if you want the whole PHP attack surface prioritised by real risk.

Feature comparison

composer auditphpwarden
Scans composer.lock✓ Yes✓ Yes
Scans the PHP engine version (per branch/SAPI)✗ No✓ Yes
Scans WordPress core / plugins / themes✗ No✓ Yes
Ranks by exploitation (CISA KEV, then EPSS, then CVSS)✗ severity label, no exploitation data✓ Yes
Reachability: is the vulnerable package used in your code?✗ No✓ Yes
Runtime protection (PHP-FPM guard daemon)✗ No✓ paid: dry-run on Pro, enforce on Team
Scans your own PHP code (whole program, framework-aware)✗ No✓ 89 rules, cross-file
Live check of the running site from outside✗ No✓ read-only, ownership-verified
One combined, ranked verdict across all of the above✗ No✓ phpwarden assess
SARIF output for GitHub / GitLab code scanning✗ No✓ Yes
Advisory data freshness✓ queries Packagist livebundled; free weekly update; twice daily on Pro; exploited CVEs within 24 hours
Runs offline / no account✗ needs the Packagist API✓ Yes
CostFreeFree (engine + community feed)
SetupNone: ships with Composer 2.4+pipx / composer require / single file
CI exit code for pipelines✓ Yes✓ Yes

What composer audit does well

composer audit (Composer 2.4+) queries the Packagist Security Advisory API, which aggregates GitHub Security Advisories and the FriendsOfPHP/security-advisories database, and flags any package in your composer.json or composer.lock with a known advisory, printing the package, affected range, severity, a link and the CVE. It exits non-zero with the count of advisories, so it drops straight into CI, and Composer 2.8+ can also report abandoned packages. It is free, zero-setup, and there is no reason not to run it.

Where phpwarden goes further

One thing composer audit has that the free phpwarden feed does not: it asks Packagist live, so a new advisory shows up the moment it is published. phpwarden's free feed is bundled with each release and updated weekly without a key (a newly exploited vulnerability is released to it straight away); the maintained feed on Pro is rebuilt twice a day.

When to use composer audit instead

If your project is pure Composer with no WordPress and you're happy assessing the PHP engine separately, and you want the absolute minimum setup, composer audit is already on your machine and covers the dependency case well. Many teams run both: composer audit as a zero-config gate, and phpwarden for the engine, WordPress, exploitation ranking and reachability. They draw from overlapping data (both see FriendsOfPHP/OSV), so phpwarden will flag the same Composer CVEs plus the rest.

Try phpwarden on your project

Zero dependencies, offline, Apache-2.0. Ranks findings by CISA KEV → EPSS → CVSS.

composer require --dev phpwarden/phpwarden   # PHP projects → vendor/bin/phpwarden
vendor/bin/phpwarden deps composer.lock      # Composer
vendor/bin/phpwarden scan                    # PHP engine on this host
vendor/bin/phpwarden wordpress /var/www/html # WordPress core, plugins, themes

No Composer? pipx install phpwarden or the single-file phpwarden.pyz. In CI: oroma-alfred/phpwarden-action@v1.

About this comparison

Competitor details reflect each vendor's public documentation as of November 2026 and may have changed. Check their own sites for current pricing and features. phpwarden is our own tool, so we have a stake here; we've tried to state only verifiable facts and to say plainly when another tool is the better fit. Spotted an error? We'll correct it. Sources: