Skip to content

Update dependencies and CI, fix Dependabot alert #1 - #118

Merged
puikinsh merged 6 commits into
masterfrom
chore/deps-and-ci
Dec 1, 2026
Merged

puikinsh merged 6 commits into
masterfrom
chore/deps-and-ci

Conversation

@puikinsh

@puikinsh puikinsh commented Dec 1, 2026

Copy link
Copy Markdown
Member

Resolves Dependabot alert #1 (brace-expansion ReDoS), brings every dependency to its latest usable version and tightens CI and the release workflow. No version bump. The two shipped changes (DOMPurify and the PHP fix) ride in the next release.

Shipped in the plugin

  • DOMPurify 3.4.17 → 3.5.0. It has security fixes, and 3.4.x is end of life. The behaviour changes only affect DOM input, hooks, IN_PLACE and custom elements in SVG. The lightbox sanitizes strings only. The tarball's sha512 matches the registry, and the sourceMappingURL comments are stripped as before.
  • Raw-JavaScript settings decode the same on every PHP version. PHP 8.1 changed html_entity_decode()'s default flags. On PHP 7.4 and 8.0, an apostrophe stored as ' in a custom expression, extra call or callback stayed encoded and broke the script. mfbfw_decode_js() passes the PHP 8.1+ flags explicitly, so 8.1+ sites see no change. The feature is no wider: the save-time unfiltered_html gate is untouched.

Build tooling

  • clean-css-cli is replaced by the clean-css library through bin/minify-css.mjs, and the output is byte-identical. The CLI hasn't been released since 2023. It brought in chokidar, glob 7 and brace-expansion for file watching and wildcards this project never used. The dev tree drops from 41 packages to 13, and npm audit reports 0 vulnerabilities.
  • terser 5.49 → 5.51.4. jquery.fancybox.min.js builds byte-identical. engines.node is now >=22.
  • PHPCompatibility 9.3.5 → 10.0 alpha, through the WordPress ruleset 3.0 alpha. 9.3.5 knows nothing after PHP 7.4, so composer phpcs wasn't really checking PHP 8 compatibility. The alpha found the html_entity_decode() issue above. PHP_CodeSniffer stays on 3.13.6 because WPCS 3.4.1 doesn't support 4 yet.

CI and releases

  • Actions: checkout, setup-node and upload-artifact move to v7. Node 20, which is EOL, becomes lts/*.
  • PHP versions: PHP 8.6.0 joins the lint matrix, and phpcs runs on 8.5.
  • Superseded runs: a new push to a PR cancels the previous run.
  • Dependabot: weekly grouped PRs for npm, Composer and Actions.
  • Deploy: the Publish job is opt-in through the WPORG_SVN_DEPLOY repository variable. Releases go to SVN by hand, so every tag push failed at the credentials step. The pre-flight still runs on every tag.
  • New daily workflow "WordPress.org matches git": bin/verify-release.mjs, also npm run verify:release, rebuilds the version WordPress.org serves from its git tag. It then compares that build file by file with the WordPress.org download and the GitHub release asset. This is the drift behind 3.3.7 and 3.4.1. Locally:
    • 3.4.4: all three match.
    • 3.4.3: reports the readme-only Tested up to: 7.2 SVN edit, as it should.
    • Tampered checkout: flagged.
    • Wrong tag: refused.

Verification

  • Sandbox (WordPress 7.2 RC3): the CVE-2026-96571 e2e suite passes 42 of 42 on this branch's build, and the issue Regression - form in fancybox #116 repro is unchanged from 3.4.4. A raw-JS setting containing ' and & runs correctly.
  • Local checks: npm run release:check, composer phpcs with PHPCompatibility 10, composer validate and actionlint all pass.

🤖 Generated with Claude Code

puikinsh and others added 6 commits December 1, 2026 15:04
PHP 8.1 changed html_entity_decode()'s default flags from ENT_COMPAT to
ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, so on PHP 7.4 and 8.0 an
apostrophe stored as ' in a custom expression, extra call or callback
stayed encoded and broke the script. The new flags are passed explicitly
through mfbfw_decode_js(), which matches what PHP 8.1+ sites already do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Security fixes for SAFE_FOR_TEMPLATES, IN_PLACE and custom elements; 3.4.x
is no longer maintained. The behaviour changes affect DOM input, hooks and
IN_PLACE, none of which the lightbox uses: it only sanitizes strings. Both
dist files come from the registry tarball (sha512 verified) with their
sourceMappingURL comments removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clean-css-cli has not been released since 2023 and brought chokidar,
glob 7 and brace-expansion along for file watching and wildcards this
project never used; the brace-expansion ReDoS was Dependabot alert #1.
bin/minify-css.mjs calls the library directly and its output is
byte-identical. The dev tree drops from 41 packages to 13, terser moves to
5.51.4 (same output), and engines.node to >=22 now that 18 and 20 are EOL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9.3.5 has no knowledge of PHP 8, so composer phpcs did not actually check
7.4-8.x compatibility. 10.0 is only out as an alpha, pulled in with @Alpha
flags; it found the html_entity_decode() default change fixed above.
PHP_CodeSniffer stays on 3.13 because WPCS 3.4.1 does not support 4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
checkout, setup-node and upload-artifact move to v7 and Node 20 (EOL) to
the current LTS. PHP 8.6.0 joins the lint matrix and phpcs runs on 8.5.
A new push to a PR cancels the previous run. Dependabot opens weekly
grouped update PRs for npm, Composer and Actions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Releases reach WordPress.org through a manual SVN commit, so the deploy
job failed at its credentials step on every tag push. It now runs only when
the WPORG_SVN_DEPLOY variable is true; the pre-flight still runs on every
tag. The new daily "WordPress.org matches git" workflow rebuilds the served
version from its tag and compares it file by file with the WordPress.org
download and the GitHub release asset, the drift behind 3.3.7 and 3.4.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

✅ WordPress Plugin Check Report

✅ Status: Passed

📊 Report

All checks passed! No errors or warnings found.


🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

@puikinsh
puikinsh merged commit 97ed5fb into master Dec 1, 2026
10 checks passed
@puikinsh puikinsh mentioned this pull request Dec 1, 2026
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