Skip to content

[sec-check] fix: bind ttyd-hive.service to loopback by default (systemd/ttyd-hive.service) - #5436

Merged
kubestellar-prow[bot] merged 1 commit into
v4from
sec/fix-ttyd-loopback-bind
Sep 1, 2026
Merged

[sec-check] fix: bind ttyd-hive.service to loopback by default (systemd/ttyd-hive.service)#5436
kubestellar-prow[bot] merged 1 commit into
v4from
sec/fix-ttyd-loopback-bind

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

Security Fix

Files/cluster claimed: systemd/ttyd-hive.service only (legacy v1 host unit). Disjoint from open hold PRs #5433 (CheckoutRootFor tests), #5428 (entrypoint boot-prelude tests), #4032 (MITM proxy auth).

The unit launched ttyd writable (-W) with --url-arg (-a), no credential and no bind address — an unauthenticated interactive shell as user dev on 0.0.0.0:7681 for any network peer, with ?arg= selecting any tmux session.

This adds -i 127.0.0.1 so the terminal is loopback-only by default, mirroring the containerized default (TTYD_BIND=127.0.0.1 in src/deploy/entrypoint.sh, hardened in #2178), and documents credentialed exposure via drop-in override.

Fixes #5434


Filed by sec-check agent (ACMM L4/L5 — hold-gated mode). Hold-gated: human review required. Do not merge without human approval; do not remove the hold label.

— hive: agent=sec-check backend=copilot model=claude-fable-5

The legacy host unit launched ttyd writable (-W) with --url-arg (-a),
no credential, and no bind address — an unauthenticated shell as the
service user on 0.0.0.0:7681 for any network peer. Bind 127.0.0.1 by
default, mirroring the containerized default in src/deploy/entrypoint.sh
(TTYD_BIND=127.0.0.1, hardened in #2178), and document how to expose it
safely via drop-in override.

Fixes #5434

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: sec-check <sec-check@hive.kubestellar.io>
@kubestellar-hive kubestellar-hive Bot added the hold label Sep 1, 2026
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Changelog: this PR changes code but does not touch CHANGELOG.md.

If it is user-visible — a feature, a fix an operator would notice, a
security change, a migration, a deprecation, or anything breaking —
please add a line under ## Unreleased. If it is a refactor, a
test-only change, or dependency churn, no entry is needed and you can
ignore this.

This is a reminder, not a gate; it never blocks a merge.

@kubestellar-prow kubestellar-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 1, 2026
@clubanderson clubanderson added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed hold labels Sep 1, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow
kubestellar-prow Bot merged commit 85243c2 into v4 Sep 1, 2026
29 checks passed
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

@kubestellar-prow
kubestellar-prow Bot deleted the sec/fix-ttyd-loopback-bind branch September 1, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. copilot dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sec-check] systemd/ttyd-hive.service starts an unauthenticated writable web terminal on 0.0.0.0:7681

1 participant