Skip to content

Comments

try all the RPC nodes for websocket connections#73

Merged
gluckzhang merged 3 commits intomainfrom
72/fix-websocket-retries
Feb 19, 2026
Merged

try all the RPC nodes for websocket connections#73
gluckzhang merged 3 commits intomainfrom
72/fix-websocket-retries

Conversation

@gluckzhang
Copy link
Member

This PR fixes #72 by trying all of the RPC endpoints for websocket connections. When none of the endpoints work for the websocket, NoRPCEndpoints alert is triggered.

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>
@gluckzhang gluckzhang merged commit e011eb8 into main Feb 19, 2026
2 checks passed
@gluckzhang gluckzhang deleted the 72/fix-websocket-retries branch February 19, 2026 15:30
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.

NoRPCEndpoints not triggered when only websocket connection fails

1 participant