-
Notifications
You must be signed in to change notification settings - Fork 0
fix(import): converge on replay by checking existence before creating #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: ferriskey/ferriskey-cli
Length of output: 24140
🌐 Web query:
reqwest 0.12 redirect policy Authorization header HTTP HTTPS official documentation💡 Result:
In reqwest 0.12, the client follows a security-conscious redirect policy that automatically strips sensitive headers—including Authorization, Cookie, Proxy-Authorization, and WWW-Authenticate—when a redirect crosses an origin boundary [1][2]. An origin change is defined by a difference in the host, port, or scheme (e.g., redirecting from HTTPS to HTTP) [2][3]. If a redirect occurs between different hosts, ports, or schemes, these headers are removed from the subsequent request to prevent potential credential leakage to third-party services [2][3]. Because this behavior is hardcoded in the client's internal redirect handling, there is no built-in option to keep the Authorization header during cross-origin redirects [4]. If your application requires maintaining these headers across redirects (for example, when redirecting to a trusted CDN), the recommended approach is to disable automatic redirects using Policy::none and implement custom redirect logic [5][6][4]. To handle this manually, you can perform the initial request with redirect following disabled, check the response status for a redirection code (e.g., 301, 302, 307, 308), extract the Location header, and issue a new request manually with the desired headers intact [5][4]. Example of manual redirect handling: let client = Client::builder.redirect(redirect::Policy::none).build?; let mut res = client.get("https://example.com").send.await?; while res.status.is_redirection { if let Some(location) = res.headers.get(header::LOCATION) { let next_url = location.to_str?; res = client.get(next_url).send.await?; } else { break; } }
Citations:
Sensitive Data Exposure (CWE-319): Cleartext Transmission of Sensitive Information
Exploitability: Moderate
Require encrypted transport for bearer-authenticated requests.
FerriskeyClient::newacceptshttp://URLs, andget_jsonsends the bearer token to the configured URL. Reject non-loopback cleartext URLs, or require an explicit development-only exception. Reqwest removesAuthorizationon cross-origin redirects, so no separate redirect change is required.🤖 Prompt for AI Agents