Skip to content

chore: resolve open dependabot security alerts - #1422

Merged
toddbaert merged 3 commits into
mainfrom
chore/dependabot-alerts
Jul 30, 2026
Merged

chore: resolve open dependabot security alerts#1422
toddbaert merged 3 commits into
mainfrom
chore/dependabot-alerts

Conversation

@jonathannorris

Copy link
Copy Markdown
Member

Summary

Resolved 20 of 22 open Dependabot security alerts by bumping vulnerable transitive dependencies via scoped Yarn resolutions (lockfile-only re-resolution where the parent's range already permitted the patched version; scoped resolutions where it did not).

Dependabot Alerts Resolved

Alert Package Severity Fix
#225 @babel/core low Bumped to 7.29.7 via resolution ^7.29.6
#229 form-data high Bumped to 4.0.6 via resolution ^4.0.6
#237 markdown-it medium Bumped to 14.3.0 via resolution ^14.2.0
#241 http-proxy-middleware medium Bumped to 2.0.10 via resolution ^2.0.10
#243, #250 js-yaml (4.x line) high Bumped to 4.3.0 via resolutions scoped to markdownlint-cli2/js-yaml and js-yaml@npm:^4.1.0
#244, #249 js-yaml (3.x line, gray-matter) medium Bumped to 3.15.0 via resolution scoped to gray-matter/js-yaml
#245, #246 websocket-driver critical/medium Bumped to 0.7.5 via resolution ^0.7.5
#252, #253, #254, #255, #267 tar critical/high/medium Bumped to 7.5.22 via resolution ^7.5.22
#258 body-parser low Bumped to 1.20.6 via resolution ^1.20.6
#259 linkify-it high Bumped to 5.0.2 via resolution ^5.0.2
#260, #261 immutable high Bumped to 5.1.9 via resolution ^5.1.8

Notes

  • The js-yaml 3.x resolution is scoped to gray-matter/js-yaml (not global). gray-matter@4.0.3 depends on js-yaml@^3.13.1 and calls the safeLoad API removed in js-yaml 4; a global bump would break Docusaurus frontmatter parsing at build time.
  • The js-yaml 4.x resolutions target both markdownlint-cli2/js-yaml (which pins an exact 4.1.0) and the general js-yaml@npm:^4.1.0 range (docusaurus, eslint, redocly, cosmiconfig) so both consumers land on the patched 4.3.0.
  • All other bumps stay within the same major version line as the previously-resolved version, so no consumer-facing API changes are expected.

Unresolvable / Deferred

  • [DOC] update OFO tutorial with Helm and new spec changes #80 tsup (low): no patched version is available yet (first_patched_version is null). Left open.
  • [Provider]: DevCycle .NET Provider #268 brace-expansion (high): the only patched line is 5.0.8, which is a full rewrite that dropped the CommonJS default export. Both wireit (our build/lint task runner, import braces from 'brace-expansion') and minimatch@9.x (used internally by tooling) rely on that default export, so forcing this resolution breaks yarn lint:md/yarn build immediately (SyntaxError: The requested module 'brace-expansion' does not provide an export named 'default'). Fixing this cleanly requires upgrading the minimatch/glob/wireit toolchain to versions compatible with the new brace-expansion API, which is out of scope for a dependency-only security patch. Left unresolved pending a compatible patch release or a separate toolchain upgrade.

Verification

  • yarn install: lockfile resolves cleanly, all listed packages land on patched (or newer same-major) versions.
  • yarn build (full Docusaurus production build): succeeds.
  • yarn lint:md (markdownlint-cli2, the js-yaml/markdown-it consumer): 0 errors.
  • yarn lint:es: passes on a clean checkout (verified separately; the nested-worktree checkout used for this change hits an unrelated ESLint plugin-resolution quirk from having two node_modules trees stacked on top of each other, not present in CI).
  • Pre-existing yarn typecheck errors (missing image type declarations, a C++ dataset entry, and an Algolia type mismatch) are unrelated to these changes and reproduce identically on a clean origin/main.

- @babel/core -> 7.29.7 (low, alert #225)
- form-data -> 4.0.6 (high, alert #229)
- markdown-it -> 14.3.0 (medium, alert #237)
- http-proxy-middleware -> 2.0.10 (medium, alert #241)
- js-yaml 4.x -> 4.3.0 via scoped resolutions (high, alerts #243, #250)
- js-yaml 3.x (gray-matter) -> 3.15.0 via scoped resolution (medium, alerts #244, #249)
- websocket-driver -> 0.7.5 (critical/medium, alerts #245, #246)
- tar -> 7.5.22 (critical/high/medium, alerts #252, #253, #254, #255, #267)
- body-parser -> 1.20.6 (low, alert #258)
- linkify-it -> 5.0.2 (high, alert #259)
- immutable -> 5.1.9 (high, alerts #260, #261)

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
@jonathannorris
jonathannorris requested review from a team as code owners July 27, 2026 14:24
@netlify

netlify Bot commented Jul 27, 2026

Copy link
Copy Markdown

Deploy Preview for openfeature ready!

Name Link
🔨 Latest commit 964996e
🔍 Latest deploy log https://app.netlify.com/projects/openfeature/deploys/6a6b9faa4f3fdc0008388cab
😎 Deploy Preview https://deploy-preview-1422--openfeature.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@jonathannorris
jonathannorris marked this pull request as draft July 27, 2026 14:24
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

package.json expands and pins dependency resolutions. The Makefile centralizes Git safety, Corepack, and Docker execution setup across dependency, build, version, start, and lint targets.

Changes

Dependency and container setup updates

Layer / File(s) Summary
Expand and pin dependency resolutions
package.json
Additional dependencies are pinned in resolutions; markdownlint-cli2/js-yaml is changed to ^4.3.0, and targeted js-yaml, gray-matter/js-yaml, tar, and websocket-driver entries are added.
Centralize container setup commands
makefile
A shared SETUP command configures Git safe-directory handling and enables Corepack, and Docker-based targets invoke it through the shared command variables.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: beeme1mr, toddbaert

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: resolving Dependabot security alerts.
Description check ✅ Passed The description directly describes the dependency-resolution and security-alert changes in the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to reduce open Dependabot security alerts by forcing patched versions of vulnerable transitive dependencies using Yarn resolutions, and updating yarn.lock to reflect the resulting dependency graph.

Changes:

  • Added/updated Yarn resolutions to steer vulnerable transitive dependencies to patched versions (including scoped resolutions for js-yaml consumers).
  • Re-resolved dependencies and updated yarn.lock to the new patched versions.

Reviewed changes

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

File Description
package.json Adds/adjusts Yarn resolutions to force patched transitive dependency versions (including scoped overrides).
yarn.lock Updates the lockfile to reflect the patched versions selected by the new resolutions.
Comments suppressed due to low confidence (2)

package.json:154

  • This resolution allows immutable 5.1.8, but the lockfile currently resolves 5.1.9 (the patched version referenced in the PR description). Consider bumping the minimum to ^5.1.9 so a future re-resolution can’t fall back to 5.1.8.
    "immutable": "^5.1.8",

package.json:158

  • This resolution range permits markdown-it 14.2.x, but the lockfile resolves 14.3.0 (the patched version referenced in the PR description). Setting the minimum to ^14.3.0 makes the security bump durable across future lockfile regenerations.
    "markdown-it": "^14.2.0",

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

Comment thread package.json Outdated
Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
@jonathannorris
jonathannorris marked this pull request as ready for review July 27, 2026 17:06
@jonathannorris
jonathannorris enabled auto-merge July 27, 2026 17:06

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Around line 173-174: Update the js-yaml override entry in package.json to use
the exact descriptor js-yaml@npm:4.1.0 so it matches markdownlint-cli2@0.17.2;
retain the existing caret-descriptor entry only if another dependency explicitly
requires it.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9bcdccc7-f912-4383-a024-1809502851d6

📥 Commits

Reviewing files that changed from the base of the PR and between 27d0fcf and 974a10a.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • package.json

Comment thread package.json
Comment on lines +173 to +174
"markdownlint-cli2/js-yaml": "^4.3.0",
"js-yaml@npm:^4.1.0": "^4.3.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

yarn install --immutable
yarn why js-yaml
rg -n -A8 -B2 '^"markdownlint-cli2@|^"js-yaml@npm:' yarn.lock

Repository: open-feature/openfeature.dev

Length of output: 637


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "== packageManager and overrides lines =="
node - <<'JS'
const fs = require('fs');
const pkg = JSON.parse(fs.readFileSync('package.json','utf8'));
console.log('packageManager:', pkg.packageManager);
console.log('overrides:', pkg.resolutions || pkg.overrides || null);
const text = fs.readFileSync('package.json','utf8').split('\n');
for (let i=Math.max(0, 168); i<Math.min(text.length, 180); i++) {
  console.log(`${i+1}: ${text[i]}`);
}
JS

echo
echo "== lockfile descriptor sections =="
rg -n -A12 -B1 '^(| "\[workspace-root\]"\]| \[".*"\]| \["[^"]+ js-yaml@npm| \["[^"]+ markdownlint-cli2@)"' yarn.lock || true

echo
echo "== git status around lock =="
git diff --stat package.json yarn.lock || true
git diff -- package.json yarn.lock | sed -n '1,240p' || true

Repository: open-feature/openfeature.dev

Length of output: 50385


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "== packageManager and relevant override keys =="
node - <<'JS'
const fs = require('fs');
const pkg = JSON.parse(fs.readFileSync('package.json','utf8'));
console.log(pkg.packageManager);
for (const key of pkg.resolutions || pkg.overrides || {}) console.log(`${key} => ${pkg.resolutions[item] ?? pkg.overrides[item]}`);
const text = fs.readFileSync('package.json','utf8').split('\n');
for (let i=Math.max(0, 168); i<Math.min(text.length, 180); i++) console.log(`${i+1}: ${text[i]}`);
JS

echo
echo "== exact js-yaml lockfile descriptor header =="
grep -n -n '^"js-yaml@npm:4.1.0":$\|^"js-yaml@npm:^4.1.0":$\|^"js-yaml@npm:4.1.0,\|^"js-yaml@npm:^4.1.0,' yarn.lock || true
sed -n '/^"js-yaml@npm:/,/^$/p' yarn.lock | head -200

echo
echo "== markdownlint-cli2 lockfile descriptor header =="
sed -n '/^"markdownlint-cli2@npm:4.1.0":$/,/^$/p' yarn.lock | head -120

echo
echo "== package.json and yarn.lock references =="
python3 - <<'PY'
from pathlib import Path
pkg = Path('package.json').read_text().splitlines()
for i,l in enumerate(pkg,1):
    if 'markdownlint-cli2/js-yaml' in l or '"js-yaml@npm:^4.1.0"' in l:
        print(f'package.json:{i}: {l}')
text = Path('yarn.lock').read_text()
for key in ('js-yaml@npm:4.1.0', 'js-yaml@npm:^4.1.0', 'markdownlint-cli2@npm:'):
    print(f'-- {key} matches --')
    for i,l in enumerate(text.splitlines(),1):
        if key in l:
            print(f'yarn.lock:{i}: {l}')
PY

Repository: open-feature/openfeature.dev

Length of output: 1135


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "== packageManager and relevant override keys =="
node - <<'JS'
const fs = require('fs');
const pkg = JSON.parse(fs.readFileSync('package.json','utf8'));
console.log(pkg.packageManager);
for (const [key, value] of Object.entries(pkg.resolutions || pkg.overrides || {})) {
  console.log(`${key} => ${value}`);
}
const text = fs.readFileSync('package.json','utf8').split('\n');
for (let i=Math.max(0, 168); i<Math.min(text.length, 180); i++) console.log(`${i+1}: ${text[i]}`);
JS

echo
echo "== exact js-yaml lockfile descriptor header =="
grep -n '^"js-yaml@npm:4.1.0":$\|^"js-yaml@npm:^4.1.0":$\|^"js-yaml@npm:4.1.0,\|^"js-yaml@npm:^4.1.0,' yarn.lock || true
sed -n '/^"js-yaml@npm:/,/^$/p' yarn.lock | head -200

echo
echo "== markdownlint-cli2 lockfile descriptor header =="
sed -n '/^"markdownlint-cli2@npm:4.1.0":$/,/^$/p' yarn.lock | head -120

echo
echo "== package.json and yarn.lock references =="
python3 - <<'PY'
from pathlib import Path
lines = Path('package.json').read_text().splitlines()
for i, l in enumerate(lines, 1):
    if 'markdownlint-cli2/js-yaml' in l or '"js-yaml@npm:^4.1.0"' in l:
        print(f'package.json:{i}: {l}')
text = Path('yarn.lock').read_text()
for key in ('js-yaml@npm:4.1.0', 'js-yaml@npm:^4.1.0', 'markdownlint-cli2@npm:'):
    print(f'-- matches for literal {key!r} --')
    for i, l in enumerate(text.splitlines(), 1):
        if key in l:
            print(f'yarn.lock:{i}: {l}')
PY

Repository: open-feature/openfeature.dev

Length of output: 2980


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "== package managers =="
command -v yarnpkg || true
corepack --version || true
corepack enable --install-directory ~/.local/bin 2>/tmp/corepack-enable.log || { cat /tmp/corepack-enable.log; exit 0; }
corepack use yarn@4.12.0 || true
yarnpkg --version || true

echo
echo "== yarn why with yarnpkg =="
yarnpkg why js-yaml || true

echo
echo "== yarn.lock markdownlint and js-yaml excerpt =="
sed -n '12330,12360p' yarn.lock
sed -n '12360,12395p' yarn.lock

echo
echo "== lockfile package descriptor context for caret js-yaml =="
rg -n -A12 -B2 'js-yaml@npm:\^4.1.0|js-yaml@npm:\^\^4.3.0|# js-yaml@npm:\^4.1.0' yarn.lock || true

echo
echo "== package scripts/config =="
python3 - <<'PY'
from pathlib import Path
pkg = __import__('json').loads(Path('package.json').read_text())
for k in ('packageManager','resolutions','scripts','dependencies','devDependencies'):
    if k in pkg:
        v = pkg[k]
        if k in ('dependencies','devDependencies'):
            v = {key: value for key, value in v.items() if 'markdownlint' in key or 'markdownit' in key or k in (value if isinstance(value,str) else value)}
        print(f'--- {k} ---')
        print(__import__('json').dumps(v, indent=2, sort_keys=True)[:5000])
PY

Repository: open-feature/openfeature.dev

Length of output: 1100


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "== lockfile markdownlint and js-yaml excerpt =="
sed -n '12330,12355p' yarn.lock
sed -n '12360,12395p' yarn.lock

echo
echo "== yarn.lock caret js-yaml descriptor context =="
rg -n -A12 -B2 'js-yaml@npm:\^4\.1\.0|js-yaml@npm:4\.1\.0|js-yaml@npm:\^4\.3\.0|# js-yaml@npm:\^4\.1\.0' yarn.lock || true

echo
echo "== package metadata relevant sections =="
python3 - <<'PY'
from pathlib import Path
import json
pkg = json.loads(Path('package.json').read_text())
for k in ('packageManager','scripts','dependencies','devDependencies'):
    if k in pkg:
        print(f'--- {k} ---')
        value = pkg[k]
        if k in ('dependencies','devDependencies'):
            value = {key: value for key, value in value.items() if 'markdownlint' in key.lower() or 'markdownit' in key.lower() or k in (value if isinstance(value,str) else value)}
        print(json.dumps({k: value}, indent=2, sort_keys=True)[:5000])
PY

Repository: open-feature/openfeature.dev

Length of output: 4091


Use the exact markdownlint js-yaml descriptor.

markdownlint-cli2@0.17.2 resolves js-yaml@npm:4.1.0, so the targeted override should be js-yaml@npm:4.1.0. The current js-yaml@npm:^4.1.0 descriptor targets a different package descriptor and may not apply. Keep the existing entry only if another dependency requires the exact caret descriptor.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` around lines 173 - 174, Update the js-yaml override entry in
package.json to use the exact descriptor js-yaml@npm:4.1.0 so it matches
markdownlint-cli2@0.17.2; retain the existing caret-descriptor entry only if
another dependency explicitly requires it.

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>

@toddbaert toddbaert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Added one small change to fix local dev.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@makefile`:
- Around line 8-9: Update the SETUP command to configure Git safe.directory with
the resolved mounted checkout path instead of the wildcard '*'. Preserve
corepack enable and Git’s ownership protection for all unrelated repositories.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 081e7465-db98-4d50-9c05-0327ebb17d80

📥 Commits

Reviewing files that changed from the base of the PR and between 974a10a and 964996e.

📒 Files selected for processing (1)
  • makefile

Comment thread makefile
Comment on lines +8 to +9
# container runs as root while repo is owned by host user; allow git to run here
SETUP := git config --global --add safe.directory '*' && corepack enable

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Scope Git trust to the mounted checkout

safe.directory '*' disables Git’s dubious-ownership protection for every repository path in the container, although this setup only needs to trust the host-mounted checkout. Use the checkout’s resolved path instead, preserving the ownership check for unrelated or attacker-controlled repositories.

Proposed fix
-SETUP := git config --global --add safe.directory '*' && corepack enable
+SETUP := git config --global --add safe.directory \"$$(pwd)\" && corepack enable
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@makefile` around lines 8 - 9, Update the SETUP command to configure Git
safe.directory with the resolved mounted checkout path instead of the wildcard
'*'. Preserve corepack enable and Git’s ownership protection for all unrelated
repositories.

@toddbaert
toddbaert disabled auto-merge July 30, 2026 19:05
@toddbaert
toddbaert merged commit 79c0185 into main Jul 30, 2026
10 checks passed
@toddbaert
toddbaert deleted the chore/dependabot-alerts branch July 30, 2026 19:05
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