Skip to content

fix: require auth for non-loopback remote daemons#369

Merged
thymikee merged 3 commits intomainfrom
codex/snyk-remote-daemon-auth
Apr 8, 2026
Merged

fix: require auth for non-loopback remote daemons#369
thymikee merged 3 commits intomainfrom
codex/snyk-remote-daemon-auth

Conversation

@thymikee
Copy link
Copy Markdown
Contributor

@thymikee thymikee commented Apr 8, 2026

Summary

Require daemon auth when AGENT_DEVICE_DAEMON_BASE_URL points to a non-loopback host so remote command execution is not accepted from unauthenticated external URLs.
Update the daemon-client tests and remote-tenancy/config docs to reflect the authenticated-only remote flow. Touched 6 files total, and scope stayed within the remote-daemon client/tests/docs surface.

Validation

  • pnpm check:quick
  • pnpm check:unit

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstackincubator.github.io/agent-device/pr-preview/pr-369/

Built to branch gh-pages at 2026-04-08 11:04 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: da4c460234

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1137 to +1138
if (normalized === 'localhost' || normalized === '::1' || normalized === '[::1]') return true;
return /^127(?:\.\d{1,3}){3}$/.test(normalized);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Treat IPv4-mapped loopback hosts as local

isLoopbackHostname only whitelists localhost, ::1, and 127/8, so a base URL like http://[::ffff:127.0.0.1]:4310 (which Node normalizes to hostname [::ffff:7f00:1]) is treated as non-loopback and rejected without a daemon auth token. That causes local-only daemon endpoints to fail the new trust check even though they are loopback addresses, which is inconsistent with the “non-loopback requires auth” behavior this change is trying to enforce.

Useful? React with 👍 / 👎.

@thymikee thymikee merged commit 9cbba95 into main Apr 8, 2026
16 checks passed
@thymikee thymikee deleted the codex/snyk-remote-daemon-auth branch April 8, 2026 11:45
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