Menu

How uv add silently downgraded my pypdf security patch (and how I fixed it)
📰

How uv add silently downgraded my pypdf security patch (and how I fixed it)

DEV Community: github·Priyanshu Kumari·12 days ago
#6k73OBB7
#devtogithub#technology#devto#dev#pypdf
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.