Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b1a3eadf7f
ℹ️ 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".
| url.port === String(BB_PROD_SERVER_PORT) && | ||
| isLoopbackHostname(url.hostname) |
There was a problem hiding this comment.
Block wildcard addresses that still reach production
When a managed job uses BB_SERVER_URL=http://0.0.0.0:38886 (or http://[::]:38886), this predicate permits mutating requests because isLoopbackHostname rejects wildcard addresses, even though Node on the inspected Linux runtime connects those addresses to the local server. The repository also supports 0.0.0.0 as a server bind host and classifies both wildcard forms as local-only in apps/app/src/lib/loopback-hostname.test.ts, so such a request can still write to the production server this guard is intended to protect; include local wildcard addresses in the blocked target classification.
Useful? React with 👍 / 👎.
|
Validated the wildcard-address bot finding against the approved scope. The full five-panel Slop Cop at
|
Human comments
What was wrong
Managed jobs could send CLI writes to the default production server after environment sanitization removed their target URL. The approved proposal follows the October 20 QA config incident; that script's job ancestry remains unverified.
What changed
This intentionally changes managed-job CLI behavior, including read-like plugin commands transported as POST. Intentional production invocations require
BB_ALLOW_DEFAULT_SERVER_WRITES=1; ordinary non-job invocations retain existing behavior. No daemon protocol or host-care runtime changes.How you verified
Verified head:
b1a3eadf7f20da98d76c227046a02704e864740d.E2E used a fresh data directory and actual host-care jobs. Production-shaped URLs were intercepted and remapped exclusively to the isolated server; every mutation verified its exact dataDir. No test request reached production. The full changed-flow CLI/API pass recorded 50 observations, including identity preflights. Unrelated builtin plugin startup warnings did not affect the dependency-free fixture; app/provider/daemon flows were outside this change.
Scope remains accidental default/loopback routing. Wildcard and unrecognized aliases, redirects, remote production hosts, other production ports, and direct non-CLI clients are outside the guard.
Fixes #5838
BB-Thread-ID: thr_r9se63ek5v