Use env vars to skip Composer audit in release builds#82
Merged
Conversation
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The previous fix used the
--no-auditCLI flag, which doesn't exist in the Composer version provided byshivammathur/setup-php. This switches to environment variables (COMPOSER_NO_AUDIT=1andCOMPOSER_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
1.3.0— should build successfully1.4.0and1.4.1