security(block-producer): allowlist device_info on public /block/producers (keep endpoints public)#6755
Merged
Merged
Conversation
…ucers
Per Scott's call, /block/slot, /block/producers, and /api/wallet stay PUBLIC
(proof-of-antiquity consensus transparency the explorer/dashboard depend on;
no secrets/IPs/keys are exposed). The only hardening kept after tri-brain review:
expose device_info through an explicit field allowlist
(arch/family/model/year/enroll_weight) so a future column added to device_info
(e.g. an IP/hostname) can never leak through this unauthenticated endpoint.
Output is unchanged for current data; a non-dict/None row degrades to {} instead
of raising. is_my_turn and the balance summary are intentionally left as-is to
avoid breaking the public API contract.
Supersedes #6715 (which admin-gated these public endpoints and would have broken
the explorer). Tri-brain reviewed (Codex/Grok; GPT-OSS offline) — earlier
over-broad changes (removing is_my_turn, capping balance) were reverted as
regressions.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
✅ BCOS v2 Scan Results
What does this mean?The BCOS (Beacon Certified Open Source) engine scans for:
BCOS v2 Engine - Free & Open Source (MIT) - Elyan Labs |
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.
Per the decision to keep
/block/slot,/block/producers,/api/walletpublic (PoA consensus transparency; explorer/dashboard depend on them; no secrets exposed), this applies the one safe hardening from tri-brain review:device_infois exposed via an explicit field allowlist so a future column (e.g. an IP/hostname) can't leak through the unauthenticated endpoint. Output is unchanged for current data; non-dict rows degrade to{}instead of 500.is_my_turn+ balance summary kept intact (no API-contract break). 4 producer tests green. Supersedes #6715 (which admin-gated these and would break the explorer).🤖 Generated with Claude Code