Skip to content

Use env vars to skip Composer audit in release builds#82

Merged
GaryJones merged 2 commits intodevelopfrom
GaryJones/fix-composer-audit
Mar 13, 2026
Merged

Use env vars to skip Composer audit in release builds#82
GaryJones merged 2 commits intodevelopfrom
GaryJones/fix-composer-audit

Conversation

@GaryJones
Copy link
Contributor

Summary

The previous fix used the --no-audit CLI flag, which doesn't exist in the Composer version provided by shivammathur/setup-php. This switches to environment variables (COMPOSER_NO_AUDIT=1 and COMPOSER_AUDIT_ABANDONED=ignore) which work across all Composer 2.x versions.

Without this, the release workflow fails when building older tags that pin to AWS SDK versions flagged with security advisories.

Test plan

  • Merge, then dispatch the release workflow for tag 1.3.0 — should build successfully
  • Repeat for 1.4.0 and 1.4.1

Composer 2.8+ blocks packages with known security advisories by
default. Older tags like 1.3.0 pin aws/aws-sdk-php to ~3.288.1 which
is flagged, causing the build to fail. Skipping the audit is
appropriate here since we are building historical releases as-is, and
the dependency has already been updated on develop.
@GaryJones GaryJones requested a review from a team as a code owner March 13, 2026 10:33
COMPOSER_NO_AUDIT prevents the post-install audit report but does not
stop Composer from blocking resolution of packages with known security
advisories. The --no-security-blocking flag is needed to allow older
SDK versions to resolve.
@GaryJones GaryJones merged commit de62b40 into develop Mar 13, 2026
3 checks passed
@GaryJones GaryJones deleted the GaryJones/fix-composer-audit branch March 13, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant