Skip to content

starknet_transaction_prover: redact URL credentials in logs and add startup banner#14164

Merged
avi-starkware merged 1 commit into
mainfrom
avi/prover-v3/redact-banner
May 26, 2026
Merged

starknet_transaction_prover: redact URL credentials in logs and add startup banner#14164
avi-starkware merged 1 commit into
mainfrom
avi/prover-v3/redact-banner

Conversation

@avi-starkware
Copy link
Copy Markdown
Collaborator

Adds redact_url_host which collapses a URL to scheme://host[:port],
dropping userinfo, path, and query. The CLI-override logs for
rpc_node_url and blocking_check_url and a new startup banner all
route through it so credentials embedded in those URLs cannot reach a log
sink.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

@cursor
Copy link
Copy Markdown

cursor Bot commented May 24, 2026

PR Summary

Low Risk
Logging-only hardening with no change to RPC behavior, config validation, or how URLs are stored or used at runtime.

Overview
Introduces redact_url_host, which logs URLs as scheme://host[:port] only—stripping userinfo, path, query, and fragment—and uses <invalid url> when parsing fails so raw strings never hit logs.

Startup now emits a structured banner (version, git SHA, chain id, redacted RPC host, fee-validation and blocking-check flags, OHTTP) instead of risking full URLs or other sensitive config in log sinks.

CLI override messages for rpc_node_url and blocking_check_url route through the helper; empty default RPC URL is shown as <unset> rather than a misleading invalid placeholder. Unit tests cover credentials, paths, queries, fragments, and invalid/empty input.

Reviewed by Cursor Bugbot for commit 170c535. Bugbot is set up for automated code reviews on this repo. Configure here.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

@avi-starkware avi-starkware force-pushed the avi/prover-v3/health branch from c26d49f to 962afc1 Compare May 26, 2026 08:43
@avi-starkware avi-starkware force-pushed the avi/prover-v3/redact-banner branch 3 times, most recently from 0df4834 to 1f5f854 Compare May 26, 2026 12:17
@avi-starkware avi-starkware changed the base branch from avi/prover-v3/health to graphite-base/14164 May 26, 2026 12:58
@avi-starkware avi-starkware force-pushed the avi/prover-v3/redact-banner branch from 1f5f854 to abc893a Compare May 26, 2026 12:58
@avi-starkware avi-starkware force-pushed the graphite-base/14164 branch from 962afc1 to 435cc58 Compare May 26, 2026 12:58
@avi-starkware avi-starkware changed the base branch from graphite-base/14164 to main May 26, 2026 12:58
Copy link
Copy Markdown
Contributor

@einat-starkware einat-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

@einat-starkware reviewed 5 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on avi-starkware).

…tartup banner

Adds `redact_url_host` which collapses a URL to `scheme://host[:port]`,
dropping userinfo, path, and query. The CLI-override logs for
`rpc_node_url` and `blocking_check_url` and a new startup banner all
route through it so credentials embedded in those URLs cannot reach a log
sink.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@avi-starkware avi-starkware force-pushed the avi/prover-v3/redact-banner branch from abc893a to 170c535 Compare May 26, 2026 16:14
Copy link
Copy Markdown
Collaborator Author

@avi-starkware avi-starkware left a comment

Choose a reason for hiding this comment

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

@avi-starkware reviewed 1 file and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on avi-starkware).

@avi-starkware avi-starkware added this pull request to the merge queue May 26, 2026
Merged via the queue into main with commit 889c170 May 26, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants