Skip to content

fix(deps): clear Dependabot advisories across example stacks - #2979

Merged
mikeland73 merged 4 commits into
mainfrom
claude/sleepy-einstein-x1ulij
Sep 16, 2026
Merged

mikeland73 merged 4 commits into
mainfrom
claude/sleepy-einstein-x1ulij

Conversation

@mikeland73

@mikeland73 mikeland73 commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

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.

Stack Change Alerts cleared
examples/stacks/drupal drupal/core 10.5.610.6.16, twig/twig 3.28.0, guzzlehttp/guzzle 7.15.5 36
examples/stacks/rails rails 7.2.3.2, puma 7.2.1, sqlite3 2.9.6, rack 3.2.7, rack-session 2.1.2, erb 6.0.7, concurrent-ruby 1.3.8, websocket-driver 0.8.2, nokogiri 1.19.4 25
examples/stacks/django Django 4.2.295.2.17, sqlparse 0.5.40.6.0, asgiref, psycopg2 9 Django + 5 sqlparse
testscripts/shellenv/node less 4.4.24.9.1, less-watch-compiler pinned to 1.19.4 4

Note on Go: this branch originally also bumped klauspost/compress (v1.18.1 → v1.18.7) with a regenerated vendor-hash. #2977 has since landed on main fixing the same advisory (GHSA-259r-337f-4rfw) and going further — v1.20.0 — alongside go.jetify.com/pkg, renameio and oauth2. That supersedes the bump here, so on merging main in, go.mod, go.sum and vendor-hash were resolved to main's side and are now byte-identical to it. This PR no longer touches Go at all.

Notes on the less-obvious bumps

Django needed a major-version move, not a patch. 4.2.30 would have cleared the two HIGH alerts (ASGI header spoofing, DATA_UPLOAD_MAX_MEMORY_SIZE bypass), 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_L10N was dropped from settings.py because 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 declares gem "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 WITH also 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.16 and twig 3.28.0 both fall inside the existing ^10.3.14 constraint, so only composer.lock changed. Reaching 10.6.13+ matters: the DRUPAL-CORE-2026-010/-012 advisories have no fix on the 10.5 branch.

The node fixture needs both a move forward and a ceiling. less 4.9.1 is what drops the optional dependencies carrying the image-size and picomatch advisories. But this fixture pins nodejs@18, and less-watch-compiler 1.19.6+ requires Node ≥ 22.12 and depends on the ESM-only commander@15 — which throws ERR_REQUIRE_ESM under Node 18. 1.19.4 is the newest release still declaring node >=18, and it drops the vulnerable picomatch chain 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:

  • Drupalcomposer validate passes and all 81 locked packages audit clean. The test runner skips Drupal, so it was verified separately: re-resolving with config.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.
  • Railsbundle lock --update resolves successfully; all 90 gems in the resulting Gemfile.lock audit clean. Covered by the project-tests-only shards, which pass.
  • Django — installed the new requirements.txt in a clean venv; manage.py check reports no issues, makemigrations --check detects no changes (so the existing migration is still valid under 5.2), migrate applies cleanly, and manage.py test runs green. Note the example has no run_test script, so CI does not exercise it.
  • Node fixture — verified against Node 18.20.8 with npm 10.8.2, matching CI rather than the newer local toolchain: npm ci installs with no EBADENGINE warnings, npm run run_test exits 0, and less-out/style.css is byte-identical.
  • Merge resolution — after taking main's Go files: go mod tidy is a no-op, go build ./... passes, and main's vendor-hash reproduces exactly from the merged vendor tree (checked with a NAR serializer equivalent to nix hash path).

Not verified: psycopg2 could not be compiled in this container (no pg_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

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
@claude

claude Bot commented Sep 15, 2026

Copy link
Copy Markdown

Code review

No 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 mikeland73 changed the title fix(deps): clear Dependabot advisories across example stacks and go.mod fix(deps): clear Dependabot advisories across example stacks Sep 15, 2026
@mikeland73
mikeland73 merged commit 5fbfe6c into main Sep 16, 2026
28 checks passed
@mikeland73
mikeland73 deleted the claude/sleepy-einstein-x1ulij branch September 16, 2026 00:04
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants