Repository navigation
feat: allow operator-trusted self-hosted account origins - #6307
Closed
toolittlecakes wants to merge 1 commit into
Closed
toolittlecakes wants to merge 1 commit into
toolittlecakes wants to merge 1 commit into
Conversation
2 tasks done
Contributor
Author
|
The only failed check, Windows server-2, timed out downloading frp from GitHub ( |
|
@ymichael wdyt about this contribution? It's something i'd be interested in for bb |
Contributor
|
This is an automated message. We have closed this pull request because it has been open for more than two weeks. |
ymichael
added a commit
that referenced
this pull request
Nov 9, 2026
## Human comments ## What was wrong The nightly stale-PR cleanup (`.github/workflows/close-stale-prs.yml`) measured age from `created_at` only. A PR reopened after its first closure was therefore closed again at the next scheduled run. #6215 was created Oct 24, closed Oct 27, reopened Nov 7, and closed by the bot on Nov 8 with "open for more than two weeks" after less than a day open. ## What changed Before closing a candidate, the job reads the PR's issue events and treats the PR as open since its latest `reopened` event (or `created_at` if never reopened). PRs reopened within the fourteen-day window are skipped and logged as "Recently reopened". The creation-date prefilter is unchanged, so events are fetched only for PRs older than fourteen days. ## How you verified - Ran the embedded script's `open_since` against live data: #6215 resolves to its 2026-11-07T19:42:06Z reopen (so the Nov 8 run would have skipped it); #6307 (never reopened, closed today) still resolves to its creation time. - Preview run (`APPLY=false`) of the full script against `get-bb/bb` completes without errors. - Checked the last five cleanup runs: #6215 is the only reopened PR that was closed. - `pnpm exec oxfmt .github/workflows/close-stale-prs.yml --check`, `git diff --check` > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Human comments
What was wrong
The standalone account plugin accepts only getbb.app and staging in production, so
bb account login --base-url https://bb.example.comand Connect's delegated code redemption cannot use an operator's own account/relay service. Passing a URL is intentionally not sufficient to grant it trust.What changed
BB_ACCOUNT_TRUSTED_ORIGINS, a comma-separated list of additional exact HTTPS origins supplied in the server process environment. Validate the complete list and snapshot trust at account-plugin activation. Keep the existing default site and--base-urlprecedence/selection semantics.--serverorigin before deriving its account origin, while preserving the general URL helper's existing behavior for other consumers.npx bb-app env set ...followed by explicit stop/start, plugin activation/reload behavior, trust implications and sign-out semantics. No database, daemon protocol, native UI, or relay deployment changes.For example, persist
BB_ACCOUNT_TRUSTED_ORIGINS=https://bb.example.comin the server service environment and restart that server; then usebb account login --base-url https://bb.example.comorbb connect --code <code> --base-url https://bb.example.com. The CLI flag itself cannot extend the allowlist. Removing an entry does not revoke a stored pairing;bb account logoutdoes that.How you verified
All four package suites passed: connect-client 28, bb-account 110, Connect 158 and bb-app 216 (512 tests), with all four typechecks and required Turbo tasks (14 successful tasks). Changed TypeScript files passed oxlint; all 18 changed files passed oxfmt and
git diff --check.Integration tests use the default production plugin policy, real local HTTP handlers and a local WebSocket tunnel. They observe configured-origin success, the unchanged official default request URL, valid same-origin browser approval before foreign-link rejection, and zero attempted fetches for unknown/suffix-spoof/HTTP origins through account redemption, browser login.start and both Connect inputs. They also verify strict parsing, activation-time policy capture, no redemption redirect, selected
--base-urlprecedence over an invalid unused--server, and the launcher's actual restart notice without a misleading reload message.A bounded allow-all policy mutation made all 12 targeted denial tests fail across those four entry paths, despite the test egress guard. The original source was byte-for-byte restored before the passing checks. Synthetic HTTPS names are mapped to deterministic loopback HTTP in test transport; public TLS/self-host/native E2E was not performed.
Fixes #5744