Skip to content

fix(e2e): use audit.block-insecure false for 2.8#25

Merged
apermo merged 2 commits into
mainfrom
fix/wp-env-composer-block-insecure
Apr 18, 2026
Merged

fix(e2e): use audit.block-insecure false for 2.8#25
apermo merged 2 commits into
mainfrom
fix/wp-env-composer-block-insecure

Conversation

@apermo
Copy link
Copy Markdown
Owner

@apermo apermo commented Apr 18, 2026

Summary

  • Replace the 0.4.1 patch's --no-audit / COMPOSER_NO_AUDIT=1 (which only affect post-install audit) with composer config --global audit.block-insecure false, which is what actually governs resolution-time advisory blocking
  • Applies to reusable-wp-e2e.yml, reusable-wp-visual-regression.yml, and reusable-lhci.yml (when setup-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:

To ignore the advisories, add them to the audit "ignore" config. To turn the feature off entirely, you can set "block-insecure" to false in your "audit" config.

--no-audit / COMPOSER_NO_AUDIT=1 both 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 by audit.block-insecure.

The 0.4.1 sed rewrote the command but didn't change the failing behavior — both cli and tests-cli images still failed to build.

Test plan

  • Point a consumer E2E caller at @fix/wp-env-composer-block-insecure and confirm wp-env start completes
  • Verify the patch step prints Patched: ... for both cli and tests-cli Dockerfiles
  • Verify idempotency — running twice doesn't double-inject

apermo added 2 commits April 18, 2026 09:31
--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
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, 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

  • Composer Configuration Update: Replaced the ineffective --no-audit flag with composer config audit.block-insecure false to correctly disable resolution-time advisory blocking in Composer 2.8.
  • Scope of Changes: Applied the configuration fix across reusable-wp-e2e.yml, reusable-wp-visual-regression.yml, and reusable-lhci.yml workflows.
Ignored Files
  • Ignored by pattern: .github/workflows/** (3)
    • .github/workflows/reusable-lhci.yml
    • .github/workflows/reusable-wp-e2e.yml
    • .github/workflows/reusable-wp-visual-regression.yml
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@apermo apermo merged commit cfa101d into main Apr 18, 2026
3 checks passed
@apermo apermo deleted the fix/wp-env-composer-block-insecure branch April 18, 2026 07:34
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread CHANGELOG.md

### 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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The changelog entry describes changes to reusable-wp-e2e.yml, reusable-wp-visual-regression.yml, and reusable-lhci.yml, but these files are not included in the current pull request. It appears the implementation of the fix was accidentally omitted from this commit.

Comment thread CHANGELOG.md

### 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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
- `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
  1. 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.

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.

v0.4.1 e2e patch: --no-audit does not bypass Composer block-insecure

1 participant