Skip to content

uv audit: adverse status reporting - #19128

Merged
woodruffw merged 3 commits into
mainfrom
ww/adverse
Apr 29, 2026
Merged

woodruffw merged 3 commits into
mainfrom
ww/adverse

Conversation

@woodruffw

@woodruffw woodruffw commented Apr 23, 2026 •

Copy link
Copy Markdown
Member

Summary

Part of #18506. Closes #15254.

With this, we take the PEP 792 project status information (already present in our internal representations per #15254) and use it to produce appropriate adverse status reports (e.g. hackme is quarantined).

To do this we need to make (frequently cached) registry client requests, on top of whatever requests (currently just OSV) that uv audit needs to make for known vulnerabilities/malware.

Test Plan

I've added unit and integration tests, along with some pypi-proxy scaffolding changes to allow us to easily test different project statuses.

@woodruffw woodruffw self-assigned this Apr 23, 2026
@woodruffw woodruffw added enhancement New feature or improvement to existing functionality preview Experimental behavior area:uv-audit Related to uv audit functionality labels Apr 23, 2026
@woodruffw woodruffw mentioned this pull request Apr 23, 2026
4 of 6 tasks
@codspeed

ghost commented Apr 23, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 5 untouched benchmarks


Comparing ww/adverse (3d0152a) with main (4cefd64)

Open in CodSpeed

@woodruffw woodruffw changed the title Initial scaffolding for adverse status reporting uv audit: adverse status reporting Apr 23, 2026
@woodruffw woodruffw mentioned this pull request Apr 23, 2026
22 of 28 tasks
@woodruffw
woodruffw force-pushed the ww/adverse branch 4 times, most recently from 9754807 to d8bc0dd Compare April 27, 2026 17:50
@woodruffw
woodruffw marked this pull request as ready for review April 27, 2026 18:03
Comment on lines +423 to +426
// NOTE: intentional: we don't currently fail if there are any adverse statuses,
// only when there are vulnerabilities. We will likely change this once we allow users
// to ignore adverse statuses and configure policies.
if has_vulnerabilities {

ghost Apr 27, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flagging: I loosened this intentionally, since I don't think we want to suddenly start failing based on adverse statuses here, at least not until we have a config/policy story.

@woodruffw
woodruffw requested review from konstin and zanieb April 27, 2026 18:05
Comment thread crates/uv-resolver/src/lock/mod.rs Resolved
Comment thread crates/uv-resolver/src/lock/mod.rs Resolved
Comment thread crates/uv/src/commands/project/audit.rs Resolved
Comment thread crates/uv/tests/it/audit.rs Outdated
Comment on lines +1756 to +1757
iniconfig is deprecated:
Reason: no-longer-maintained

ghost Apr 28, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about merging those two into one line? iniconfig is deprecated: no-longer-mained

ghost Apr 28, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me -- the original reason I didn't is because (in principle) the reason can be multiple lines or have interior formatting, although in practice PyPI doesn't allow a reason at the moment so that's moot. Putting it on the same line seems fine to me.

Comment thread crates/uv/tests/it/audit.rs Outdated

Adverse statuses:

iniconfig is archived

ghost Apr 28, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like I'm missing some visual outline here, maybe some bullet points?

Comment thread crates/uv/tests/it/audit.rs Resolved
Comment thread crates/uv/tests/it/pypi_proxy.rs Resolved
William Woodruff added 2 commits April 29, 2026 14:15
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:uv-audit Related to uv audit functionality enhancement New feature or improvement to existing functionality preview Experimental behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for PEP 792

2 participants