Repository navigation
[SDK-7618] fix(security): send the CLI launch token on every gRPC call - #319
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
|
E2E verification (SDK-7618) against a packaged binary built from browserstack-binary#1984 (head Framework: wdio v9 mocha,
Unix socket |
|
🔴 SDK PR Review gate is red. Pending:
It turns green once the SDK PR Review Agent has run on the current head commit (any verdict — the gate only requires that the review ran). A native reviewer approval is separately required by branch protection before merge. |
|
🔴 SDK PR Review gate is red. Pending:
It turns green once the SDK PR Review Agent has run on the current head commit (any verdict — the gate only requires that the review ran). A native reviewer approval is separately required by branch protection before merge. |
|
✅ Good to go
Change map (generated deterministically from the diff)graph LR
subgraph nwdio_service["wdio-service"]
npackages_browserstack_service_src_cli_grpcClient_ts["⚠ grpcClient.ts<br/>~13 lines"]
n_changeset_pr_319_md["pr-319.md<br/>~5 lines"]
npackages_browserstack_service_src_cli_index_ts["index.ts<br/>~5 lines"]
npackages_browserstack_service_src_constants_ts["constants.ts<br/>~2 lines"]
npackages_browserstack_service_src_grpc_index_ts["⚠ index.ts<br/>~2 lines"]
end
↻ This verdict comment is the review anchor — it's updated in place on each run (the gate posts its status separately). — SDK PR Review Agent |
|
🟢 SDK PR Review gate is green — the SDK PR Review Agent has run on the current head commit (verdict: This gate confirms a review ran on the latest commit. The verdict itself is advisory — read the findings and use your judgement; it does not block merge. A native GitHub reviewer approval is still separately required by branch protection before this PR can merge. |
1 similar comment
|
🟢 SDK PR Review gate is green — the SDK PR Review Agent has run on the current head commit (verdict: This gate confirms a review ran on the latest commit. The verdict itself is advisory — read the findings and use your judgement; it does not block merge. A native GitHub reviewer approval is still separately required by branch protection before this PR can merge. |
…switch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🔴 SDK PR Review gate is red. Pending:
It turns green once the SDK PR Review Agent has run on the current head commit (any verdict — the gate only requires that the review ran). A native reviewer approval is separately required by branch protection before merge. |
|
Removed the Re-tested against the browserstack-binary#1984 build with the patched
|
|
🟢 SDK PR Review gate is green — the SDK PR Review Agent has run on the current head commit (verdict: This gate confirms a review ran on the latest commit. The verdict itself is advisory — read the findings and use your judgement; it does not block merge. A native GitHub reviewer approval is still separately required by branch protection before this PR can merge. |
1 similar comment
|
🟢 SDK PR Review gate is green — the SDK PR Review Agent has run on the current head commit (verdict: This gate confirms a review ran on the latest commit. The verdict itself is advisory — read the findings and use your judgement; it does not block merge. A native GitHub reviewer approval is still separately required by branch protection before this PR can merge. |
|
RUN_TESTS |
|
[SDK Wdio Test] TRA build state: passed | Stability 100% — verdict: success. Passed: 53, Failed: 0, Aggregate: 53. TRA: https://observability.browserstack.com/builds/mtbz6kbktxwpqato3fxxiwfil7xz151mr4d31ioo |
What is this about?
Protects the service's local gRPC connection to the BrowserStack CLI binary with a per-launch token (SDK-7618, CWE-306). Paired with browserstack-binary#1984, which rejects calls without it.
BrowserstackCLI.start()generates a token (randomBytes(32), hex) and setsBROWSERSTACK_CLI_AUTH_TOKENinprocess.envbefore spawning the binary, so the binary and every wdio worker inherit it.GrpcClient.connect()passes one grpc-js interceptor to theSDKClientstub that addsx-browserstack-cli-tokento every call.BROWSERSTACK_CLI_ENV=development) generates nothing, because it connects to a separately started binary.Older binaries ignore the extra header, so this can release before or after the binary. Sibling SDK PRs: #326 (v8 port), https://github.com/browserstack/browserstack-python-sdk/pull/1353, https://github.com/browserstack/browserstack-node-agent/pull/2780, https://github.com/browserstack/browserstack-ruby-sdk/pull/221, https://github.com/browserstack/browserstack-javaagent/pull/2363, https://github.com/browserstack/browserstack-csharp-sdk/pull/1429
Related Jira task/s
Release (mandatory for every PR — required for the
ready-for-reviewlabel)Version bump: (required — tick exactly one)
Release notes type: (optional)
Release notes (customer-facing): (optional but encouraged)
Release notes (internal): (required — engineer-facing; what actually changed / why)
BROWSERSTACK_CLI_AUTH_TOKENper binary spawn and sendsx-browserstack-cli-tokenon every RPC; enforced by browserstack-binary#1984, ignored by older binaries. CWE-306 (SDK-7618).Checklist
PR Validations
Run Tests: Comment RUN_TESTS to trigger sanity tests.
🤖 Generated with Claude Code