fix(e2e): use audit.block-insecure false for 2.8#25
Conversation
--no-audit in 0.4.1 only skipped post-install audit. The advisory block happens at resolution time via audit.block-insecure, which needs to be set as composer config before the require runs. Closes #24
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses build failures caused by Composer 2.8's security advisory blocking mechanism. By switching from a post-install audit flag to a global configuration setting, the build process can now successfully resolve dependencies without being interrupted by security advisories during the resolution phase. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Composer checks the code with care, / But blocks the build when threats are there. / We set the flag to false today, / To clear the path and lead the way. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the CHANGELOG.md for version 0.4.2, detailing a fix to disable Composer 2.8 resolution-time advisory blocks. However, the implementation files referenced in the changelog are missing from the current commit. Additionally, the changelog entry should include the --global flag for the composer command and follow the established formatting style by including a blank line after the category header.
|
|
||
| ### Fixed | ||
|
|
||
| - `reusable-wp-e2e.yml`, `reusable-wp-visual-regression.yml`, `reusable-lhci.yml` — use `composer config audit.block-insecure false` to actually disable Composer 2.8 resolution-time advisory block (`--no-audit` in 0.4.1 only skipped post-install audit) (#24) |
There was a problem hiding this comment.
|
|
||
| ### Fixed | ||
|
|
||
| - `reusable-wp-e2e.yml`, `reusable-wp-visual-regression.yml`, `reusable-lhci.yml` — use `composer config audit.block-insecure false` to actually disable Composer 2.8 resolution-time advisory block (`--no-audit` in 0.4.1 only skipped post-install audit) (#24) |
There was a problem hiding this comment.
The command mentioned in the changelog is missing the --global flag, which is specified in the pull request description (composer config --global audit.block-insecure false). For accuracy, the changelog should reflect the actual command being used. Additionally, ensure a blank line is maintained between the category header and the first list item to maintain consistency with the established style of the document.
| - `reusable-wp-e2e.yml`, `reusable-wp-visual-regression.yml`, `reusable-lhci.yml` — use `composer config audit.block-insecure false` to actually disable Composer 2.8 resolution-time advisory block (`--no-audit` in 0.4.1 only skipped post-install audit) (#24) | |
| - reusable-wp-e2e.yml, reusable-wp-visual-regression.yml, reusable-lhci.yml — use composer config --global audit.block-insecure false to actually disable Composer 2.8 resolution-time advisory block (--no-audit in 0.4.1 only skipped post-install audit) (#24) |
References
- In the CHANGELOG.md file, a blank line should be kept between a category header (e.g., ### Fixed) and the first list item to maintain consistency with the established style of the document.
Summary
--no-audit/COMPOSER_NO_AUDIT=1(which only affect post-install audit) withcomposer config --global audit.block-insecure false, which is what actually governs resolution-time advisory blockingreusable-wp-e2e.yml,reusable-wp-visual-regression.yml, andreusable-lhci.yml(whensetup-wp-env: true)Closes #24. Upstream: WordPress/gutenberg#77470.
Why 0.4.1 didn't work
Composer's output itself pointed at the right toggle:
--no-audit/COMPOSER_NO_AUDIT=1both only skip the post-install audit step. The "these were not loaded, because they are affected by security advisories" error fires during package resolution, which runs before any audit and is controlled byaudit.block-insecure.The 0.4.1
sedrewrote the command but didn't change the failing behavior — bothcliandtests-cliimages still failed to build.Test plan
@fix/wp-env-composer-block-insecureand confirmwp-env startcompletesPatched: ...for bothcliandtests-cliDockerfiles