Skip to content

smoke_test.sh: --public-ports allows the ports published off loopback on purpose - #165

Merged
Cvicnaire merged 1 commit into
devfrom
164-smoke_testsh-containment-allow-the-ports-deliberately-published-off-loopback
Oct 14, 2026
Merged

Cvicnaire merged 1 commit into
devfrom
164-smoke_testsh-containment-allow-the-ports-deliberately-published-off-loopback

Conversation

@Cvicnaire

Copy link
Copy Markdown
Collaborator

Closes #164. Part of the release in #154.

Since #143 montilab publishes the Shiny port on SHINY_BIND=0.0.0.0 on purpose (accepted knowingly on 2026-10-14: like the other lab apps on that host it is internet-reachable, with Shiny's login as the gate). scripts/smoke_test.sh --containment had no way to say so, failed on 0.0.0.0:8051 and made every staging deploy end red for an intended condition.

What changed. --public-ports 8051,... lists the host ports allowed off 127.0.0.1. Only the port is matched, so 0.0.0.0, a routable address and the IPv6 wildcard are all allowed for a listed port and still caught for any other port; a listed port that is on loopback after all is fine; the pass line names what was allowed. Unlisted publishes behave exactly as before.

Callers. The montilab deploy script (outside this repository, in sigrepo-ops) now derives the flag from SHINY_BIND in .env: anything other than 127.0.0.1 passes --public-ports ${SHINY_PORT:-8051}.

Tests. The ops harness (tests/test_smoke_test.sh in sigrepo-ops) gained seven cases: listed port on 0.0.0.0 and on [::] passes, the pass line names it, an unlisted port alongside is still caught, a listed port still on loopback passes, several ports, and a port that is only a suffix (51 vs 8051) is not matched. 25 of 25 pass against this script.

🤖 Generated with Claude Code

… on purpose

montilab publishes the Shiny port on SHINY_BIND=0.0.0.0 (#142), so the
containment check failed on 0.0.0.0:8051 and every staging deploy ended
red for an intended condition. --public-ports lists host ports allowed off
127.0.0.1; only the port is matched, so any other publish, and any other
port, is still caught, and the pass line names what was allowed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Cvicnaire
Cvicnaire merged commit 82d7eab into dev Oct 14, 2026
4 checks passed
@Cvicnaire
Cvicnaire deleted the 164-smoke_testsh-containment-allow-the-ports-deliberately-published-off-loopback branch October 14, 2026 14:22
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.

1 participant