Repository navigation
fix(client): verify TLS certificates on Workflow Registry RPC connections - #622
Merged
Merged
Conversation
…ions seth dials RPC URLs through NewLoggingTransport, which always sets InsecureSkipVerify. Every onchain command (workflow deploy/activate/ pause/delete, account link-key/unlink-key, secrets) therefore talked to the RPC node without certificate checks. Dial the RPC ourselves with go-ethereum's default transport and pass it to seth via WithEthClient. Restore the client URL and revert tracer that seth only sets up when it dials the URL itself. DEVSVCS-6732 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chris-gilbert
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.
Fixes DEVSVCS-6732
Problem
When seth is given an RPC URL (
WithRpcUrl), it dials throughNewLoggingTransport(). That transport always setsTLSClientConfig: &tls.Config{InsecureSkipVerify: true}. As a result, every command that talks to the Workflow Registry onchain skipped certificate checks:workflow deploy/activate/pause/delete,account link-key/unlink-keyandsecrets *. Someone who can intercept the traffic could return false contract state or inflated gas prices, or read RPC API keys that are part of the URL.Change
In
NewSethClientWithSimulated, the RPC connection is now dialed withrpc.DialOptionsand go-ethereum's default transport, which verifies certificates. It is passed to seth withWithEthClient.RPCHeadersfrom a seth config file are still sent.Seth only sets up two things when it dials the URL itself, so
restoreRPCURLputs them back afterBuild():client.URL, which is used in debug logging.reverted. Without a tracer,Decodewould hit a nil pointer on any reverted transaction.seth.NewTracerdials with the default transport, so it verifies certificates too.Other details:
Tests
cmd/client/eth_client_tls_test.go:httptest.NewTLSServerwith a self-signed certificate must cause a certificate error, and no request may reach the handler. I ran this test against the old code and it failed: the old code connected without complaint.URLandTracerare set.go test ./cmd/client/... ./cmd/workflow/... ./cmd/secrets/... ./cmd/account/...passes. I couldn't run golangci-lint locally, because none of the installed versions supports Go 1.27.3.🤖 Generated with Claude Code