Visitar URL original
Audit committed composer.lock files for security advisories by schlessera · Pull Request #311 · wp-cli/.github · GitHub
Skip to content

Audit committed composer.lock files for security advisories - #311

Merged
schlessera merged 1 commit into
mainfrom
composer-audit
Oct 30, 2026
Merged

schlessera merged 1 commit into
mainfrom
composer-audit

Conversation

@schlessera

Copy link
Copy Markdown
Member

Closes #310.

Composer refuses vulnerable versions when it resolves dependencies, but not when it installs from a committed lock file. wp-cli-bundle builds the Phar from its composer.lock, so an advisory published after a dependency was locked would otherwise go unnoticed.

This adds a composer-audit job to the shared code quality workflow. It runs only where a composer.lock is committed (wp-cli-bundle and wp-cli/dashboard today), as a job of its own like the other checks, so an advisory never looks like a lint failure. It uses each repository's existing triggers, so wp-cli-bundle gets it on pull requests, on pushes and nightly at 02:17 UTC. Nightly runs wait a random delay of up to 20 minutes to spread the load on Packagist.

Abandoned packages are reported without failing the job, because wp-cli-bundle locks the abandoned behat/transliterator. Against wp-cli-bundle's current lock, the audit command finds no advisories and passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera
schlessera requested a review from a team as a code owner October 30, 2026 18:47
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6634b6c5-efd0-432f-bf3c-90f9779bf988
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added enhancement New feature or request scope:testing labels Oct 30, 2026
@schlessera
schlessera merged commit 7bc2548 into main Oct 30, 2026
16 checks passed
@schlessera
schlessera deleted the composer-audit branch October 30, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request scope:testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audit committed composer.lock files for security advisories

1 participant