Skip to content

chore: stop using -r include in requirements-dev.txt - #277

Merged
dholbach merged 1 commit into
mainfrom
chore/dependabot-requirements-split
Jul 28, 2026
Merged

chore: stop using -r include in requirements-dev.txt#277
dholbach merged 1 commit into
mainfrom
chore/dependabot-requirements-split

Conversation

@dholbach

Copy link
Copy Markdown
Owner

Summary

  • All 17 open Dependabot security alerts (Pillow, pypdf) were attributed to requirements-dev.txt, even though requirements.txt already has the patched versions — Dependabot's security-update PR generation doesn't resolve -r requirements.txt includes, so it had no way to actually fix the pin in the file it flagged. This is a known, unfixed limitation upstream (dependabot-core#5339, #15141), not something specific to this repo.
  • Replaced the -r requirements.txt include with the actual pins, duplicated directly into requirements-dev.txt (grouped/commented the same way as the source file). Both files now have a comment pointing at each other so future edits keep them in sync.
  • Verified pip install --dry-run -r requirements-dev.txt inside the running dev container — all packages already satisfied, no conflicts.

Chose this over switching to pip-tools/.in files (the other option discussed) since the dependency count here is small enough that manual sync is low-risk, and it avoids adding a new compile step to the workflow.

Test plan

  • ./dev.py lint passes
  • pip install --dry-run -r requirements-dev.txt inside the container — no conflicts, everything already satisfied
  • After merge: confirm the 17 open Dependabot alerts close on next scan (or are individually fixable now, whichever comes first)

Dependabot's security-update PR generation doesn't resolve `-r
requirements.txt` includes — it can only patch a version pin that's
literally written in the file it's scanning. With the include, every
runtime CVE alert (Pillow, pypdf, etc.) got attributed to
requirements-dev.txt but Dependabot had no way to fix it there, leaving
17 alerts permanently stuck with "cannot update to the required
version" even after requirements.txt was already patched.

Duplicating the pins directly (both files kept in sync by hand, per
the comments added) lets Dependabot patch each file independently, the
same way it already does for the dev-only tools.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dholbach
dholbach merged commit 16c5a61 into main Jul 28, 2026
1 check passed
@dholbach
dholbach deleted the chore/dependabot-requirements-split branch July 28, 2026 10:45
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