Skip to content

Retain SafeUrl across internal APIs - #2767

Closed
zaniebot wants to merge 1 commit into
zaniebot/safe-url-policies-20261014from
zaniebot/safe-url-audit-20261015
Closed

zaniebot wants to merge 1 commit into
zaniebot/safe-url-policies-20261014from
zaniebot/safe-url-audit-20261015

Conversation

@zaniebot

Copy link
Copy Markdown
Collaborator

Wheel metadata errors from range requests can expose credentials because a SafeUrl is passed to a helper as Url. Retain SafeUrl through that path and other internal APIs so URL formatting uses redaction. Keep full-URL hashing for remote script cache keys.

Stacked on #2711.

@astral-automations-bot astral-automations-bot Bot added bug Something isn't working security labels Oct 15, 2026
@zaniebot
zaniebot deployed to automations October 15, 2026 15:20 — with GitHub Actions Active
@zaniebot
zaniebot deployed to automations October 15, 2026 15:24 — with GitHub Actions Active
Comment on lines +1431 to +1433
#[test]
fn remote_wheel_metadata_error_redacts_url() {
let context = uv_test::test_context!("3.12");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[P3] Gate the regression test on test-python

The network module is included unconditionally, and test_context!("3.12") immediately locates Python 3.12 and creates a virtual environment. This new test therefore requires that interpreter even when test-python is disabled, potentially failing during setup before exercising redaction. Add #[cfg(feature = "test-python")] to honor the feature boundary.

@zaniebot
zaniebot force-pushed the zaniebot/safe-url-audit-20261015 branch from d7ab378 to b3fed36 Compare October 15, 2026 15:28
@zaniebot
zaniebot deployed to automations October 15, 2026 15:30 — with GitHub Actions Active
@zaniebot
zaniebot force-pushed the zaniebot/safe-url-policies-20261014 branch from 3b9c144 to 5656488 Compare October 15, 2026 15:44
@zaniebot
zaniebot force-pushed the zaniebot/safe-url-audit-20261015 branch from b3fed36 to cec615b Compare October 15, 2026 15:44
@zaniebot
zaniebot deployed to automations October 15, 2026 15:45 — with GitHub Actions Active
@codspeed

codspeed Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 8 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 69 untouched benchmarks
⏩ 35 skipped benchmarks1


Comparing zaniebot/safe-url-audit-20261015 (7c2c27a) with zaniebot/safe-url-policies-20261014 (5656488)2

Open in CodSpeed

Footnotes

  1. 35 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on zaniebot/safe-url-policies-20261014 (3dff9d7) during the generation of this report, so 1c6b6d4 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@zaniebot
zaniebot force-pushed the zaniebot/safe-url-policies-20261014 branch from 5656488 to 3dff9d7 Compare October 15, 2026 16:49
@zaniebot
zaniebot force-pushed the zaniebot/safe-url-audit-20261015 branch from cec615b to 7c2c27a Compare October 15, 2026 16:50
@zaniebot
zaniebot deployed to automations October 15, 2026 16:51 — with GitHub Actions Active
@zanieb
zanieb marked this pull request as ready for review October 15, 2026 17:40
@astral-automations-bot

Copy link
Copy Markdown

Promoted to #22601.

This branch was successfully deployed

1 active deployment
automations — 7c2c27af Deployed Oct 15, 2026 by zaniebot via review-code-quality / code quality review #10413
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant