Skip to content

[DEVSVCS-6732] seth: verify TLS certificates of RPC endpoints by default - #2874

Merged
skudasov merged 3 commits into
mainfrom
claude/devsvcs-6732-upstream-326b64
Oct 21, 2026
Merged

skudasov merged 3 commits into
mainfrom
claude/devsvcs-6732-upstream-326b64

Conversation

@j-nowak

@j-nowak j-nowak commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

NewLoggingTransport() always set TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, regardless of SETH_LOG_LEVEL. Every RPC connection created via WithRpcUrl therefore 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 clones http.DefaultTransport, so TLS certificates are verified (and proxy env / default timeouts are honoured).
  • New opt-in SETH_INSECURE_SKIP_VERIFY=true restores the old behaviour for testing environments with self-signed certificates; a warning is logged when it's used.
  • SETH_LOG_LEVEL=trace request/response logging is unchanged and wraps the verified transport.
  • Regression test with httptest.NewTLSServer (untrusted cert rejected by default, accepted with opt-in, both log levels).
  • Docs + changeset 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 vet passes.
  • New test not run locally (sandbox blocked local port binding): cd seth && SKIP_MAIN_CONFIG=1 go test -run TestNewLoggingTransport -count=1 -v .

🤖 Generated with Claude Code

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>
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

✅ API Diff Results - github.com/smartcontractkit/chainlink-testing-framework/seth

✅ Compatible Changes (3)

./ (1)
  • InsecureSkipVerifyEnvVar — ➕ Added
(*ClientBuilder) (1)
  • WithInsecureSkipVerify — ➕ Added
Network (1)
  • InsecureSkipVerify — ➕ Added

📄 View full apidiff report

@j-nowak
j-nowak marked this pull request as ready for review October 21, 2026 12:39
@j-nowak
j-nowak requested a review from a team as a code owner October 21, 2026 12:39
@skudasov
skudasov merged commit 3670a15 into main Oct 21, 2026
73 checks passed
@skudasov
skudasov deleted the claude/devsvcs-6732-upstream-326b64 branch October 21, 2026 17:12
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.

2 participants