Skip to content

Redact public peers API topology details - #17

Merged
NateIsern merged 1 commit into
mainfrom
codex/fix-public-peers-endpoint-vulnerability
Jun 25, 2026
Merged

Redact public peers API topology details#17
NateIsern merged 1 commit into
mainfrom
codex/fix-public-peers-endpoint-vulnerability

Conversation

@NateIsern

Copy link
Copy Markdown
Member

Motivation

  • The public /api/peers endpoint returned raw getpeerinfo output (addresses, client strings, timing, byte counts, ban score, sync state), which exposes the node's live network topology and private peers.

Description

  • Update the /api/peers route in server/index.ts to redact sensitive per-peer details by replacing raw addr with stable placeholder labels and zeroing or blanking client/timing/traffic/sync fields while preserving the inbound boolean and the JSON response shape expected by the UI.

Testing

  • Ran bun run typecheck which completed successfully, and ran bun test which executed the test suite but reported unrelated frontend i18n test failures due to localStorage being undefined in the current test environment (server-side tests ran and the change did not introduce new server failures).

Codex Task

@NateIsern
NateIsern merged commit 507042f into main Jun 25, 2026
1 check passed
@NateIsern
NateIsern deleted the codex/fix-public-peers-endpoint-vulnerability branch June 25, 2026 19:19
NateIsern added a commit that referenced this pull request Jun 25, 2026
Document the merged hardening PRs and bump version:
- restrict trusted proxy headers via TRUSTED_PROXY_CIDRS (#16)
- redact public peer topology from /api/peers (#17)
- single bounded price-history query (no findOne fan-out) (#15)

Also note the TRUSTED_PROXY_CIDRS deployment requirement in the README.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant