Skip to content

chore(deps): resolve open Dependabot npm advisories#2027

Open
subodhr258 wants to merge 2 commits into
developfrom
chore/dependabot-npm-audit
Open

chore(deps): resolve open Dependabot npm advisories#2027
subodhr258 wants to merge 2 commits into
developfrom
chore/dependabot-npm-audit

Conversation

@subodhr258

@subodhr258 subodhr258 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

What

Resolves the open Dependabot npm advisories on godam. All fixes are made through package.json overrides (plus one direct devDependency bump for @babel/core), then package-lock.json is regenerated. No source code changes.

Overrides use range selectors (pkg@<patched) so they only bump copies that sit below the patched version and never clamp a future higher major; dev-only pins (e.g. markdown-it) are scoped under the @wordpress/scripts block, while pins that also reach shipped runtime code (@opentelemetry/core via posthog-js, dompurify, protobufjs) stay global so every copy is patched.

Alerts resolved (21 of 22)

Package From To Severity
websocket-driver 0.7.4 0.7.5 Critical
adm-zip 0.5.16 0.6.0 High
protobufjs 7.5.8 7.6.3 High
form-data 4.0.5 4.0.6 High
ws 8.20.1 8.21.0 High
js-yaml 3.14.2 / 4.1.1 3.15.0 / 4.2.0 Moderate
webpack-dev-server 5.2.4 5.2.5 Moderate
http-proxy-middleware 2.0.9 2.0.10 Moderate
dompurify 3.4.5 3.4.11 Moderate + Low (8 alerts)
markdown-it 12.3.2 14.2.0 Moderate
@opentelemetry/core 1.30.1 / 2.2.0 / 2.6.0 2.8.0 Moderate
launch-editor 2.13.1 2.14.1 Moderate
@babel/core 7.25.7 / 7.28.0 7.29.6 Low

dompurify (shipped via isomorphic-dompurify) and protobufjs (shipped via posthog-js) are the only bumps that touch runtime bundle code; markdown-it and @opentelemetry/core@1.30.1 are dev-only tooling under @wordpress/scripts (markdownlint / lighthouse-sentry) and are not run by any project script or shipped.

Not fixed (no upstream patch)

  • showdown (GHSA-rmmh-p597-ppvv, ReDoS, Moderate): no patched release exists. It is a transitive dev-only dependency of @wordpress/scripts (via markdownlint), not shipped in the plugin bundle. npm audit fix --force would pull @wordpress/blocks@15.24.0 outside the pinned range, so it is left as-is until an upstream fix lands or @wordpress/scripts drops it.

Automated checks (done)

  • npm install regenerates the lockfile cleanly
  • npm run build:prod compiles all 25 bundles with no errors
  • npm run test:unit passes (21 tests)
  • npm run lint:package-json passes

Manual verification / QA steps

Only two bumps reach shipped runtime code, so QA effort focuses there. Build the plugin (npm run build:prod) and activate it on a test site, then:

  1. dompurify (HTML sanitization) - Open a video that has layers/CTAs/hotspots containing rich HTML (CTA text, form layer, HTML/ad layer). Confirm:
    • the HTML renders correctly in both the block editor and the front-end player;
    • unsafe markup is still stripped (e.g. a layer containing <img src=x onerror=alert(1)> renders with the onerror removed) - sanitization must remain intact.
  2. protobufjs (analytics via posthog-js) - Play a video and interact (play, seek, layer clicks). Confirm analytics events are still captured on the GoDAM analytics dashboard and there are no posthog-related errors in the browser console.
  3. Player + editor smoke - Insert/edit the GoDAM video block, save the post, and confirm the front-end renders with no new JS console errors or failed network requests on player load.

No manual steps needed for the dev-only bumps (adm-zip, ws, js-yaml, webpack-dev-server, http-proxy-middleware, launch-editor, form-data, markdown-it, @opentelemetry/core, @babel/core, websocket-driver) - they are build/test tooling and are covered by the automated checks above.

Automation impact

None. No source or UI changes, no new test-ids or hooks affected.

Bump vulnerable transitive/direct npm dependencies to their patched
versions via package.json overrides (and the direct @babel/core dev
dependency), regenerating package-lock.json.

Resolves the open Dependabot alerts for: websocket-driver, adm-zip,
protobufjs, form-data, ws, js-yaml, webpack-dev-server,
http-proxy-middleware, dompurify, markdown-it, @opentelemetry/core,
launch-editor and @babel/core.

showdown (GHSA-rmmh-p597-ppvv) has no upstream fix yet and is left in
place; it is a dev-only dependency of @wordpress/scripts (markdownlint)
and is not shipped in the plugin bundle.
Copilot AI review requested due to automatic review settings July 20, 2026 06:12
@github-actions

Copy link
Copy Markdown

🔍 WordPress Plugin Check Report

⚠️ Status: Passed with warnings

📊 Report

🎯 Total Issues ❌ Errors ⚠️ Warnings
17 0 17

⚠️ Warnings (17)

📁 composer.json (1 warning)
📍 Line 🔖 Check 💬 Message
0 missing_composer_json_file The "/vendor" directory using composer exists, but "composer.json" file is missing.
📁 readme.txt (2 warnings)
📍 Line 🔖 Check 💬 Message
0 mismatched_plugin_name Plugin name "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" is different from the name declared in plugin header "GoDAM".
0 trademarked_term The plugin name includes a restricted term. Your chosen plugin name - "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" - contains the restricted term "wordpress" which cannot be used at all in your plugin name.
📁 assets/build/blocks/godam-gallery-v2/render.php (2 warnings)
📍 Line 🔖 Check 💬 Message
15 WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$inner_block_video_ids".
23 WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$inner_block_video_ids".
📁 tests/bootstrap.php (1 warning)
📍 Line 🔖 Check 💬 Message
23 WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound Functions declared in the global namespace by a theme/plugin should start with the theme/plugin prefix. Found: "wp_strip_all_tags".
📁 assets/build/css/main.css (1 warning)
📍 Line 🔖 Check 💬 Message
0 EnqueuedStylesScope This style is being loaded in all contexts.
📁 assets/src/libs/analytics.min.js (5 warnings)
📍 Line 🔖 Check 💬 Message
0 EnqueuedScriptsScope This script is being loaded in all frontend contexts.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/2026/07/20/hello-world/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/sample-page/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/demo-attachment-post/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
📁 assets/build/js/main.min.js (5 warnings)
📍 Line 🔖 Check 💬 Message
0 EnqueuedScriptsScope This script is being loaded in all frontend contexts.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/2026/07/20/hello-world/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/sample-page/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/demo-attachment-post/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Resolves Dependabot npm security advisories by bumping vulnerable transitive packages via package.json overrides (plus a direct @babel/core devDependency bump), with no source code changes.

Changes:

  • Bumped @babel/core devDependency to 7.29.6
  • Added/updated multiple overrides entries to force patched versions for vulnerable transitive dependencies
  • Updated override rules for packages like ws, websocket-driver, protobufjs, dompurify, and tooling dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json Outdated
Comment thread package.json Outdated
Comment thread package.json
Comment thread package.json Outdated
Address review feedback on the override selectors:

- Move markdown-it under the @wordpress/scripts override block; it is
  dev-only (markdownlint-cli -> @wordpress/scripts) and does not belong
  in the global graph.
- Convert the newly added global pins to range selectors
  (pkg@<fixed: fixed) so they only bump copies below the patched
  version and never clamp future higher majors, matching the existing
  ws@</js-yaml@< convention.
- @opentelemetry/core stays a global (range) override on purpose: it is
  pulled by posthog-js (shipped runtime) as well as the dev-only
  sentry/lighthouse tree, so scoping it under @wordpress/scripts would
  leave the runtime copy unpatched.
- @babel/core keeps its direct devDependency bump as the source of
  truth; its override becomes @babel/core@<7.29.6 so it only patches
  older transitive copies instead of duplicating the direct pin.

Resolves to a byte-identical package-lock.json (same 2616-package
graph); all Dependabot-flagged packages remain on their patched
versions.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated 3 comments.

Comment thread package.json
"@xmldom/xmldom": "0.8.13",
"@babel/core@<7.29.6": "7.29.6",
"@babel/plugin-transform-modules-systemjs": "7.29.4",
"@opentelemetry/core@<2.8.0": "2.8.0",
Comment thread package.json
"@xmldom/xmldom": "0.8.13",
"@babel/core@<7.29.6": "7.29.6",
"@babel/plugin-transform-modules-systemjs": "7.29.4",
"@opentelemetry/core@<2.8.0": "2.8.0",
Comment thread package.json
Comment on lines +120 to +121
"js-yaml@<4.0.0": "3.15.0",
"js-yaml@>=4.0.0": "4.2.0",
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.

3 participants