I merged two PRs to fix my dependency alerts on GitHub. Both had empty diffs.
GitHub kept showing 11 open Dependabot alerts (10 high, 1 moderate). It was right, and I was wrong.
When I dug into my terminal, I saw this:
text
pypdf==6.21.4
pypdf==6.21.1 My security patch was silently downgraded. Here is exactly why it happened and how to fix it.
Why did uv add downgrade my package?
I was working on CivicAI, an open-source PII redaction pipeline. I ran uv add presidio-analyzer presidio-anonymizer to add a new feature.
However, my local main branch was 5 commits behind origin/main.
pyproject.toml said "pypdf>=4.0".
My local uv.lock was stale and had pypdf 6.21.1 cached.
The resolver saw that 6.21.1 satisfied >=4.0, so it silently kept the vulnerable version.
I pushed the code. The tests passed.…