fix(deps): clear Dependabot advisories across example stacks - #2979
Merged
Merged
Conversation
Dependabot had 118 open alerts, concentrated in the example stacks' lock
files. Every manifest below was re-resolved and then audited package by
package against the OSV database; all five ecosystems now come back clean.
examples/stacks/django (pip)
Django 4.2.29 -> 5.2.17. The 4.2 series is end-of-life, so the ASGI
header spoofing and DATA_UPLOAD_MAX_MEMORY_SIZE bypass alerts are the
last ones it will ever get a fix for; seven further advisories are only
patched on 5.2/6.0. Moving to the current LTS clears all of them.
sqlparse 0.5.4 -> 0.6.0 for the two quadratic-parsing DoS advisories,
plus asgiref and psycopg2 to satisfy Django 5.2 and stay current.
USE_L10N was dropped because Django 5.0 removed the setting.
examples/stacks/rails (RubyGems)
rails 7.2.3.1 -> 7.2.3.2 (Active Storage arbitrary file read / RCE),
rack-session 2.1.2 (secretless session forgery), rack 3.2.7, erb 6.0.7,
concurrent-ruby 1.3.8, websocket-driver 0.8.2 and nokogiri 1.19.4.
puma and sqlite3 needed their Gemfile constraints widened before the
fixes were reachable: puma's PROXY protocol advisories are only fixed
in 7.2.1, and sqlite3's use-after-free only in 2.9.5. Active Record
7.2 declares sqlite3 >= 1.4, so the 2.x line is supported.
examples/stacks/drupal (Composer)
drupal/core 10.5.6 -> 10.6.16 (SQL injection, object injection, XSS and
the 2026 core advisories), twig/twig 3.28.0 for the sandbox escapes and
`{% use %}` code injection, guzzlehttp/guzzle 7.15.5. All within the
existing ^10.3.14 constraint, so composer.json is unchanged.
go.mod
klauspost/compress 1.18.1 -> 1.18.7 for the s2 out-of-bounds read.
testscripts/shellenv/node
less 4.4.2 -> 4.9.1, which drops the optional dependencies carrying the
image-size infinite-loop and picomatch ReDoS advisories.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01183ZJp5f4BGGQTKGvJNSbC
The flake reads ./vendor-hash as buildGoModule's vendorHash, so bumping klauspost/compress in go.mod invalidated it and Test Flake Build failed with "If this fails, you probably have to run 'devbox run update-hash'". Regenerated the same way `devbox run update-hash` does — `go mod vendor` into a temp dir, then the SRI sha256 NAR hash of that tree. Nix isn't available in this environment, so the hash was computed with an equivalent NAR serializer, validated by reproducing the previous vendor-hash exactly from the pre-bump tree. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01183ZJp5f4BGGQTKGvJNSbC
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
The shellenv/node fixture pins nodejs@18, but `npm update` had resolved less-watch-compiler to 1.19.9, which requires Node >=22.12.0 and depends on commander ^15 — an ESM-only package. Requiring it under Node 18 threw ERR_REQUIRE_ESM and failed the project-tests-only shard. 1.19.4 is the newest release still declaring node >=18; it uses the CommonJS commander ^8 and, like 1.19.9, no longer pulls the fast-glob -> micromatch -> picomatch chain that carried the ReDoS advisory. less stays at 4.9.1 (node >=18), which is what drops the image-size advisories. npm cannot express "newest version satisfying engines" in a range, so the version is pinned exactly rather than left to float back onto a release this fixture's Node cannot load. Verified against Node 18.20.8 with npm 10.8.2, matching CI: npm ci installs with no EBADENGINE warnings, npm run run_test exits 0, and less-out/style.css is byte-identical. The lockfile still audits clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01183ZJp5f4BGGQTKGvJNSbC
Resolves conflicts in go.mod, go.sum and vendor-hash by taking main's side. #2977 bumped klauspost/compress for the same advisory this branch targeted (GHSA-259r-337f-4rfw) and went further — v1.20.0 against the v1.18.7 here — while also bumping go.jetify.com/pkg, renameio and oauth2. The bump here is superseded, so all three files are now byte-identical to main and this branch no longer touches Go at all. Verified after resolving: go mod tidy is a no-op, main's vendor-hash reproduces exactly from the merged tree, and the example-stack changes are untouched by the merge. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01183ZJp5f4BGGQTKGvJNSbC
mikeland73
added a commit
that referenced
this pull request
Sep 16, 2026
…de-extension (#2980) ## Summary Follow-up to #2979. Clears the last **10 open Dependabot alerts** (8 medium, 2 low) — the repo now has zero open alerts. Each manifest was re-locked using the toolchain its own `devbox.json` provides (via `devbox shellenv`), then every package in every touched lockfile was audited against [OSV](https://osv.dev): **283 unique packages, 0 advisories**. | Location | Change | Alerts cleared | | --- | --- | --- | | `examples/development/python/poetry/poetry-demo` | pytest `7.4.4` → `9.1.1`; python constraint `^3.8` → `^3.10` | #438, #368 | | `examples/development/python/poetry/poetry-pyproject-subdir/service` | pytest `7.4.4` → `9.1.1`; python constraint `^3.8` → `^3.10` | #439, #367 | | `examples/development/python/pipenv` | lock-only: pytest → `9.1.1` (grpcio `1.84.0`, etc. moved along) | #366 | | `examples/data_science/pytorch/basic-example` | lock-only: torch `2.7.1` → `2.14.0`, setuptools `80.10.2` → `84.0.0` (transitive) | #453, #440, #403, #402 | | `vscode-extension` | lock-only: serialize-javascript `7.0.4` → `7.1.1` | #383 | ### Notes **pytest needed the Python floor raised.** The tmpdir fix (GHSA-6w46-j5rx-g56g) only exists in 9.0.3+, and pytest 9 requires Python ≥ 3.10, so the two poetry examples' `python = "^3.8"` constraint had to move to `^3.10` for the fix to be reachable. Both examples' `devbox.json` already install `python@latest`, so nothing changes for anyone running them through devbox. `pytest = "^7.2.2"` → `"^9.0.3"` is the only other manifest edit in the PR. **torch moved to CUDA 13 wheels.** `torch = "^2.7.0"` already admitted 2.14.0, so `pyproject.toml` is untouched, but the Linux extras in the lock shifted from `nvidia-*-cu12` to CUDA 13 packages (`cuda-toolkit 13.0.3`, `nvidia-cudnn-cu13`, etc.). The wheels bundle their own runtime, so this matters only for driver version on Linux hosts (CUDA 13 needs a 580+ driver). The nix `cudatoolkit` pinned in that example's `devbox.lock` is 11.7 from an old nixpkgs and was already mismatched with the previous cu12 wheels — I left it alone as it's unrelated to the advisories. **Pre-existing, not fixed here:** the pytorch example's `poetry install` fails on main because `pyproject.toml` declares `packages = [{include = "devbox_cuda_dev"}]` and that directory doesn't exist. `poetry install --no-root` works; I verified torch 2.14.0 imports and runs on CPU that way. **vscode-extension:** the `resolutions` entry already allowed `^7.0.0`, so only `yarn.lock` moved. While there, `yarn audit` flagged `ajv 6.12.6` (GHSA-2g4f-4pwh-qvx6) and `diff 5.2.0` (GHSA-73rr-hh4g-fpgx); both patches fall inside existing ranges so they were refreshed too. `yarn audit --level low` is now clean. ## How was it tested? - `devbox run test` (poetry-demo) and `devbox run run_test` (poetry-pyproject-subdir): 1 passed each. - `devbox run run_test` (pipenv): runs `main.py` successfully. - pytorch example: `poetry install --no-root` + import/matmul smoke test → `torch 2.14.0, numpy 1.26.4, setuptools 84.0.0`. - vscode-extension: `yarn install --frozen-lockfile`, `yarn compile`, `yarn lint`, `yarn audit --level low` → 0 vulnerabilities. - OSV batch query over every package in all five lockfiles → 0 advisories. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dependabot had 118 open alerts (4 critical, 23 high), almost all of them in the example stacks' lock files. Rather than take the alerts one at a time, each affected manifest was re-resolved with its own package manager and then audited package-by-package against the OSV database. Every ecosystem below now comes back with zero advisories.
examples/stacks/drupal10.5.6→10.6.16, twig/twig3.28.0, guzzlehttp/guzzle7.15.5examples/stacks/rails7.2.3.2, puma7.2.1, sqlite32.9.6, rack3.2.7, rack-session2.1.2, erb6.0.7, concurrent-ruby1.3.8, websocket-driver0.8.2, nokogiri1.19.4examples/stacks/django4.2.29→5.2.17, sqlparse0.5.4→0.6.0, asgiref, psycopg2testscripts/shellenv/node4.4.2→4.9.1, less-watch-compiler pinned to1.19.4Notes on the less-obvious bumps
Django needed a major-version move, not a patch.
4.2.30would have cleared the two HIGH alerts (ASGI header spoofing,DATA_UPLOAD_MAX_MEMORY_SIZEbypass), but the 4.2 series is end-of-life and seven further advisories against it are only ever patched on 5.2/6.0. Moving to the current LTS clears all nine.USE_L10Nwas dropped fromsettings.pybecause Django 5.0 removed the setting.Two Rails fixes were unreachable behind Gemfile constraints, so those two constraints were widened — every other gem moved on its own via
bundle lock --update:puma "~> 6.0"→"~> 7.2". The PROXY protocol v1 memory-exhaustion and repeated-header advisories are only fixed in 7.2.1; there is no 6.x patch.sqlite3 "~> 1.4"→"~> 2.9". The use-after-free is only fixed in 2.9.5. Active Record 7.2 declaresgem "sqlite3", ">= 1.4"(verified in the 7.2.3.2 gem), so the 2.x line is supported.Every gem pulled in requires Ruby ≤ 3.2, well under the Gemfile's declared 4.0.6. Note
BUNDLED WITHalso moved 2.6.9 → 4.0.9, written by the bundler that did the resolve — incidental to the security fixes, and worth a glance.Drupal needed no manifest edit.
10.6.16and twig3.28.0both fall inside the existing^10.3.14constraint, so onlycomposer.lockchanged. Reaching 10.6.13+ matters: theDRUPAL-CORE-2026-010/-012advisories have no fix on the 10.5 branch.The node fixture needs both a move forward and a ceiling.
less 4.9.1is what drops the optional dependencies carrying theimage-sizeandpicomatchadvisories. But this fixture pinsnodejs@18, andless-watch-compiler1.19.6+ requires Node ≥ 22.12 and depends on the ESM-onlycommander@15— which throwsERR_REQUIRE_ESMunder Node 18. 1.19.4 is the newest release still declaringnode >=18, and it drops the vulnerablepicomatchchain just as 1.19.9 does. npm has no way to express "newest version satisfying engines" in a range, so it is pinned exactly rather than left to float back onto a release this fixture's Node cannot load.How was it tested?
CI was green on
12a69ed(28/28 checks) before the merge from main; it is re-running on the merge commit. Each ecosystem was also re-audited against OSV after the update — all clean:composer validatepasses and all 81 locked packages audit clean. The test runner skips Drupal, so it was verified separately: re-resolving withconfig.platform.php = 8.1.0(the version the example pins) reports "Nothing to modify in lock file", confirming this lock is exactly the PHP 8.1 solution and not an artifact of a newer local PHP.bundle lock --updateresolves successfully; all 90 gems in the resultingGemfile.lockaudit clean. Covered by theproject-tests-onlyshards, which pass.requirements.txtin a clean venv;manage.py checkreports no issues,makemigrations --checkdetects no changes (so the existing migration is still valid under 5.2),migrateapplies cleanly, andmanage.py testruns green. Note the example has norun_testscript, so CI does not exercise it.npm ciinstalls with noEBADENGINEwarnings,npm run run_testexits 0, andless-out/style.cssis byte-identical.go mod tidyis a no-op,go build ./...passes, and main'svendor-hashreproduces exactly from the merged vendor tree (checked with a NAR serializer equivalent tonix hash path).Not verified:
psycopg2could not be compiled in this container (nopg_config/libpq headers), so the Django example's Postgres connection was exercised against SQLite instead. The version chosen is the current 2.9.x release and the pin's shape is unchanged.Community Contribution License
All community contributions in this pull request are licensed to the project
maintainers under the terms of the
Apache 2 License.
By creating this pull request, I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 License as stated in
the
Community Contribution License.
🤖 Generated with Claude Code
https://claude.ai/code/session_01183ZJp5f4BGGQTKGvJNSbC