Repository navigation
[DEVSVCS-6732] seth: verify TLS certificates of RPC endpoints by default - #2874
Merged
Merged
Conversation
NewLoggingTransport always set InsecureSkipVerify, so every RPC connection created via WithRpcUrl skipped certificate verification. Certificates are now verified by default; SETH_INSECURE_SKIP_VERIFY=true restores the old behaviour for testing environments with self-signed certificates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ API Diff Results -
|
skudasov
approved these changes
Oct 21, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
NewLoggingTransport()always setTLSClientConfig: &tls.Config{InsecureSkipVerify: true}, regardless ofSETH_LOG_LEVEL. Every RPC connection created viaWithRpcUrltherefore skipped certificate verification, allowing a MITM (corporate TLS proxy, hostile Wi-Fi) to return fake chain state, inflate gas price suggestions, or read API keys embedded in RPC URLs. Downstream impact: cre-cli Workflow Registry calls (DEVSVCS-6732).Change
NewLoggingTransport()now cloneshttp.DefaultTransport, so TLS certificates are verified (and proxy env / default timeouts are honoured).SETH_INSECURE_SKIP_VERIFY=truerestores the old behaviour for testing environments with self-signed certificates; a warning is logged when it's used.SETH_LOG_LEVEL=tracerequest/response logging is unchanged and wraps the verified transport.httptest.NewTLSServer(untrusted cert rejected by default, accepted with opt-in, both log levels).v1.51.8.Behaviour change
Users connecting to HTTPS RPC endpoints with self-signed certificates must now set
SETH_INSECURE_SKIP_VERIFY=true.Testing
go vetpasses.cd seth && SKIP_MAIN_CONFIG=1 go test -run TestNewLoggingTransport -count=1 -v .🤖 Generated with Claude Code