try all the RPC nodes for websocket connections#73
Merged
gluckzhang merged 3 commits intomainfrom Feb 19, 2026
Merged
Conversation
Signed-off-by: Long Zhang <gluckzhang@gmail.com>
Signed-off-by: Long Zhang <gluckzhang@gmail.com>
G115 (integer overflow) — 1 fix - chain-details.go:429: Added #nosec G115 — the bounds check 0 ≤ x ≤ 255 before the cast makes this safe, but gosec's static analysis doesn't track that. G704 (SSRF) — 9 fixes - alert.go, rpc.go, provider-default.go, provider-namada.go (×4), utils/price-conversion.go: Added #nosec G704 — all URLs come from the operator's config file. In a self-hosted monitoring tool, this is intentional by design. G117 (secret in struct field) — 2 actual fixes - types.go:335 (PDConfig.ApiKey) and types.go:351 (TeleConfig.ApiKey): Added json:"-" tag to both fields. This is a real fix — it prevents API keys from leaking if these structs are ever JSON-serialized (e.g., in an API response or debug dump). G706 (log injection) — 2 fixes - alert.go:323: resp.StatusCode is an integer and cannot carry injected log data — added #nosec G706. - encryption.go:230: outfile is a CLI-provided path, not network-controlled input — added #nosec G706. Signed-off-by: Long Zhang <gluckzhang@gmail.com>
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.
This PR fixes #72 by trying all of the RPC endpoints for websocket connections. When none of the endpoints work for the websocket,
NoRPCEndpointsalert is triggered.