Repository navigation
fix(common,op): the download_web spans of RemoteStorage record the source URL with no credentials - #3713
Conversation
The download_web_with_verification_and_caching and download_web_placed spans recorded the raw URL, with its credentials, signed query and fragment. They now skip the argument and record the URL from one shared stripped_url, which op::specs now calls.
|
Important Review skippedBot user detected. Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.
|
|
/arch-review |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to the design. Design principle 7 and the Output conventions say that secrets never appear in any output. Both download_web_* spans now record the URL without its credentials, query and fragment. No other span on this path records the raw URL. The helper now lives in common, and op delegates to it, so one function strips a URL.
Ruled at b2aa4cb against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.
|
Marked ready: arch passed b2aa4cb and CI is green. The verify failure was |
|
Approved: no findings at Nothing to do. Clobber: none. |
There was a problem hiding this comment.
Gate passes at b2aa4cb: minimal-review approved, arch-review PASS, every lane aggregator green, no open threads.
|
/revise Merge main. #3256 changed the source-fetch code in these files (declared-source probing, |
main (#3256) removed download_web_placed and Placement. The span test now checks the one download_web span that is left. common::stripped_url stays the only URL-stripping helper.
|
Round 1 of 10 on a /revise note, pushed as Resolved conflicts in:
Verify Converted to a draft: verify exited 100. A subscriber that records span fields shows https://127.0.0.1:/pkg.tar.gz in the download_web_with_verification_and_caching span for a source URL with user:hunter2@, a signed X-Goog-Signature query and a fragment. The password, the token, the query key and the fragment are not in any span field. Notes from the agent: This round merged main and resolved the conflicts in crates/common/src/lib.rs and crates/common/src/remote_storage.rs. Main (#3256) removed download_web_placed and Placement, so only download_web_with_verification_and_caching carries the skip(url) and fields(url = stripped_url(url)) span now. The test no longer calls download_web_placed. Main's adopt, fetch_to_file, source_hosts and GCS_HOST exports stay as main has them. Main added no URL-stripping helper, so common::stripped_url is the only one, and op's stripped_url calls it. fetch_to_file, fetch_once and source_hosts in main have no tracing::instrument, so they record no URL in a span. cargo clippy -p common -p op --all-targets and cargo fmt --check are clean. The other staged changes in the merge commit come from main unchanged, and that includes the .github/workflows files. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The merge of main keeps the change conformant. Main (#3256) removed download_web_placed, so the merge correctly drops that span edit and its test leg. The remaining URL span records only the stripped URL, as architecture.md line 193 and line 386 require. The PR body still names the removed span in its Proof section. Update that text.
Ruled at bf1fb17 against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.
|
/review |
Follow-up
Fixes #2817
crates/common/src/remote_storage.rscrates/common/src/lib.rscrates/op/src/specs.rsTask marker
Proof
A subscriber that records span fields now shows https://127.0.0.1:/pkg.tar.gz as the url field of both the download_web_with_verification_and_caching span and the download_web_placed span, for a source URL with user:hunter2@, a signed X-Goog-Signature query and a fragment. The password, the token, the query key and the fragment are in no span field.
Notes from the agent: The test uses a small recording tracing::Subscriber written in the test module, because common has no tracing-subscriber dev-dependency and Cargo.toml is not in the layers. T 8000 he span url field is an Option. It is empty when the text is not a URL. RemoteStorage's other #[tracing::instrument] spans (for example download_with_verification_and_caching) are not changed, because they take a bucket and an object, not a URL. op::specs::stripped_url now calls common::stripped_url. I did not run op's existing stripped_url test, but cargo clippy -p common -p op --all-targets is clean.
Tests
cargo test -p common download_web_spans_record_a_stripped_urlVerify
min task run agent-verifyexited 100, so this PR is a draft.