fix: guard demo local faucet fetch behind non-PROD build - #884
Open
AntonioVentilii wants to merge 1 commit into
Open
fix: guard demo local faucet fetch behind non-PROD build#884AntonioVentilii wants to merge 1 commit into
AntonioVentilii wants to merge 1 commit into
Conversation
|
✅ No security or compliance issues detected. Reviewed everything up to 756949c. Security Overview
Detected Code Changes
|
AntonioVentilii
force-pushed
the
av/localhost-fetch-security-a86570
branch
from
July 16, 2026 10:17
238d0dd to
a2ffec7
Compare
The 'Get ICP' button issued a browser fetch() to the local-only Juno satellite faucet (localhost:5999) unconditionally. Guard it behind !PROD so the loopback request can never fire from a production build.
AntonioVentilii
force-pushed
the
av/localhost-fetch-security-a86570
branch
from
July 16, 2026 10:19
a2ffec7 to
756949c
Compare
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.
Context
A code-review pass flagged the browser
fetch()tohttp://localhost:5999/ledger/transfer/in the demo's Get ICP button as a web-to-localhost trust-boundary concern.Investigation showed it is not a real vulnerability:
localhost:5999is a local-only Juno satellite Docker container (seedemo/docker-compose.yml) that acts as a test-ICP faucet for local development and E2E. It only exists on a developer's own machine, deals in fake ICP on a local replica, and simply fails to resolve in production.Change
Still worth tidying: the call was issued unconditionally. This guards it behind the existing
PRODflag so the loopback request can never fire from a production build. Two-line, behavior-preserving for local dev/E2E.Test plan
emitstill fires.