Skip to content

CLI: Update SDK to v0.85.0 and add proxy CA bundle flags - #210

Open
kernel-internal[bot] wants to merge 2 commits into
mainfrom
cli-coverage-update
Open

CLI: Update SDK to v0.85.0 and add proxy CA bundle flags#210
kernel-internal[bot] wants to merge 2 commits into
mainfrom
cli-coverage-update

Conversation

@kernel-internal

@kernel-internal kernel-internal Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

This PR updates the Go SDK to e6dff4a41334b0008f7d0469bf83477905cdc589 (v0.85.0) and adds CLI flags for the new SDK param field.

SDK Update

  • Updated kernel-go-sdk to e6dff4a41334b0008f7d0469bf83477905cdc589 (v0.85.0)
  • Previous version on this branch: v0.84.0

Coverage Analysis

This PR was generated by performing a full enumeration of SDK methods and CLI commands.

  • All 127 SDK methods in api.md were enumerated and matched against the full CLI command tree. No missing commands.
  • api.md is unchanged between v0.84.0 and v0.85.0, so v0.85.0 adds no new endpoints.
  • The one endpoint marked x-cli-skip: true in openapi.yaml (POST /auth/connections/{id}/exchange) is also x-stainless-skip, so it is absent from the SDK.
  • The only coverage gap was a new param field: ProxyNewParamsConfigCustom.CaBundle (from "Add encrypted per-proxy CA bundle for BYO MITM proxies"), plus its has_ca_bundle response counterpart.

New Flags

  • --ca-bundle for ProxyNewParamsConfigCustom.CaBundle on kernel proxies create — inline PEM-encoded CA certificate bundle
  • --ca-bundle-file on kernel proxies create — read the bundle from a file (- for stdin)

The two flags are mutually exclusive. Input is rejected early if it is not PEM-encoded, and a warning is printed (value ignored) when passed with a non-custom proxy type, matching the existing --zip/--asn handling for mobile proxies.

Response Surface

has_ca_bundle is write-only on the API side, so the CLI now reports it everywhere the custom proxy config is rendered:

  • kernel proxies get / kernel proxies checkHas CA Bundle row
  • kernel proxies listCA bundle marker in the Config column
  • kernel proxies create — confirms the bundle was stored

Tests

  • Real API: kernel proxies create --type custom --ca-bundle-file ... reaches server-side ca_bundle validation. An oversized bundle returns ca_bundle must be 65536 bytes or less, got 80569 (exactly the byte count the CLI sent), confirming the field is transmitted and read. A valid-size bundle passes that check and then fails only the live proxy connection test, since no reachable MITM proxy is available from CI. No resources were leaked.
  • Local mock API: verified the wire request body carries the full PEM as config.ca_bundle for inline, file, and stdin inputs, and that has_ca_bundle renders correctly in create/get/list/check output.
  • Flag errors: mutual exclusion, non-PEM input, missing file, and the non-custom warning all verified.
  • 6 new unit tests in cmd/proxies/create_test.go; go build ./..., go vet ./..., and go test ./... all pass.

Triggered by: kernel/kernel-go-sdk@e6dff4a
Reviewer: @stainless-app[bot]

🤖 Generated with Claude Code


Note

Low Risk
CLI-only changes (new optional flags and table columns) with validation and tests; no auth or payment logic changes.

Overview
Bumps kernel-go-sdk to v0.85.0 and wires two API surfaces into the CLI.

Auth connections: kernel auth connections timeline adds a Telemetry column from telemetry_captured when the event has a browser session and the API reports the field (yes/no); otherwise -. Unit tests decode JSON so “field present” is distinguished from absent.

Proxies: Custom proxies can supply a PEM CA bundle for TLS-terminating (MITM) setups via --ca-bundle or --ca-bundle-file (mutually exclusive; - reads stdin). Inline/file content is trimmed and validated for PEM before send; non-custom types get a warning if those flags are set. Has CA Bundle is shown on create (write-only confirmation), get, check, and list config summaries. README and command help include a MITM example.

Reviewed by Cursor Bugbot for commit 7ec80fc. Bugbot is set up for automated code reviews on this repo. Configure here.

… timeline

Updates github.com/kernel/kernel-go-sdk to 65f3b913775353974858c92a6164ae25232ecc81
(v0.84.0).

A full enumeration of api.md methods against the CLI service interfaces found no
missing commands: all 128 SDK methods are covered (the one x-cli-skip endpoint,
POST /auth/connections/{id}/exchange, is correctly absent). The only API surface
change in this SDK bump is a new response field, ManagedAuthTimelineEvent.
TelemetryCaptured, so no new flags were needed.

Surfaces that field as a "Telemetry" column in `kernel auth connections timeline`,
so users can tell which timeline events have browser telemetry available via
`kernel browsers telemetry events`. The column shows "-" when the event has no
browser session or when the API does not report the field, and yes/no otherwise.
JSON output already passes the field through verbatim.

Tested against the live API:
- kernel auth connections timeline <id> --per-page 5 (three connections)
- kernel auth connections timeline <id> --per-page 2 --output json
- kernel auth connections list, kernel browsers list, kernel profiles list
- go build ./... and go test ./... pass

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@socket-security

socket-security Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgolang/​github.com/​kernel/​kernel-go-sdk@​v0.83.1-0.20260724213320-12b3ec62f63e ⏵ v0.85.072 +1100100100100

View full report

Updates github.com/kernel/kernel-go-sdk to
e6dff4a41334b0008f7d0469bf83477905cdc589 (v0.85.0).

Full enumeration of all 127 SDK methods in api.md against the CLI command
tree found no missing commands. The only coverage gap was a new param field
on ProxyNewParamsConfigCustom.

New flags on `kernel proxies create`:
- --ca-bundle: inline PEM-encoded CA certificate bundle
- --ca-bundle-file: read the bundle from a file ('-' for stdin)
The two are mutually exclusive; the bundle is rejected early if it is not
PEM-encoded, and warned about (ignored) for non-custom proxy types.

Surfaces the new has_ca_bundle response field:
- `proxies get` / `proxies check`: "Has CA Bundle" row
- `proxies list`: "CA bundle" marker in the Config column
- `proxies create`: confirms the write-only bundle was stored

Tested:
- Real API: `proxies create --type custom --ca-bundle-file` reaches
  server-side ca_bundle validation ("ca_bundle must be 65536 bytes or less,
  got 80569" for an oversized bundle; a valid bundle passes that check and
  only fails the live proxy connection test, as no reachable MITM proxy is
  available from CI). No resources leaked.
- Local mock API: verified the wire body carries the full PEM as `ca_bundle`
  for inline, file, and stdin inputs, and that has_ca_bundle renders in
  create/get/list/check output.
- Flag errors: mutual exclusion, non-PEM input, missing file, non-custom
  warning.
- go build ./..., go vet ./..., go test ./... all pass (6 new unit tests).

Triggered by: kernel/kernel-go-sdk@e6dff4a

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kernel-internal kernel-internal Bot changed the title CLI: Update SDK to v0.84.0 and surface auth timeline telemetry state CLI: Update SDK to v0.85.0 and add proxy CA bundle flags Jul 29, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7ec80fc. Configure here.

Comment thread cmd/proxies/create.go

if proxyType != kernel.ProxyNewParamsTypeCustom && (in.CaBundle != "" || in.CaBundleFile != "") {
pterm.Warning.Println("--ca-bundle is only supported for custom proxies and will be ignored")
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Wrong flag named in CA warning

Low Severity

The ignored-flag warning always names --ca-bundle, even when only --ca-bundle-file was provided. The condition checks both inputs, so users who pass the file flag get a warning that refers to a different flag.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7ec80fc. Configure here.

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.

0 participants