Skip to content

Add credential vault commands and preview CLI binaries - #252

Merged
rgarcia merged 13 commits into
mainfrom
hypeship/vault-credentials
Sep 15, 2026
Merged

rgarcia merged 13 commits into
mainfrom
hypeship/vault-credentials

Conversation

@rgarcia

@rgarcia rgarcia commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

summary

  • Add credential create/update from bounded file/stdin JSON and collection operations using the public Go SDK v0.105.0. Share fill execution and strict outcome validation between card and credential items; accept --params or --spec-file, with type-specific field/URL/format validation.
  • Direct agents not to store, collect, or fill credit card data through credential items; use wallet and card item types instead. Include this steering in help, human-readable credential output, and the README. This is guidance, not PAN detection or rejection.
  • Make the flow discoverable through vaults, credentials, items, invoke, and browser help. Steer description toward the recognizable site name and usernames/emails toward explicit sensitive: false; document empty-string updates as clears. Preserve readiness/version metadata while omitting stored credential values. Redact credential write errors and disable SDK retries.
  • Adapt card PATCH to the typed SDK request without changing provider behavior.
  • Build Linux/macOS/Windows amd64/arm64 preview archives and checksums in Actions. No stable release, npm, or Homebrew publication. See PREVIEW.md for download instructions.

SDK dependency

Uses the public github.com/kernel/kernel-go-sdk v0.105.0 release. The temporary private SDK replacement and token setup are removed; fork tests and Go caching are enabled again. Request types are updated for the released SDK while preserving card PATCH and advertised-operation payloads.

Vault SDK coverage

  • Add prepare_checkout with strict checkout JSON validation, advertised-operation checks, optional approval-page opening, and no automatic retries.
  • Preserve preparation metadata and event IDs in safe JSON; display readiness and submission deadlines in human output.
  • Add --expected-item-id to credential updates alongside the required version precondition.
  • Cover initial values/TOTP, null and empty-string updates, replacement conflicts, preparation outcomes, redaction, and no-retry behavior with HTTP contract tests.
  • Reviewed vault changes from SDK 0.103 through 0.105. No managed-auth or WebMCP command changes.

validation

  • After the public SDK upgrade and vault additions: make test, targeted race tests, the local Linux build, and help inspection pass. The local six-platform build was blocked by disk space; CI preview builds pass for all six targets on the latest commit.

  • make test (vet and all repository tests): pass.

  • Vault/credential/browser-binding tests under the race detector: pass.

  • Local CLI build and help inspection: pass.

  • actionlint for changed workflows and bash syntax validation: pass.

  • SDK HTTP contract tests cover typed requests, null and empty-string clearing, collection URLs, both fill input modes/item types, credential fields named expiration, safe outcomes, redaction, and no retries. Subprocess tests verify valid JSON and exit status for credential and card outcomes.

  • CI tests, six-target preview builds, security checks, and Bugbot pass on c17fb9d. Live browser fill and live checkout preparation have not been exercised.

try the preview

Download the CI preview binaries (GitHub login required, 14-day retention). Includes Linux/macOS/Windows on amd64 and arm64. Extraction and API configuration instructions are in PREVIEW.md.

@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.

Stale Bugbot comment from a previous run.

Comment thread cmd/vaults_output.go
@rgarcia
rgarcia requested a review from hiroTamada September 14, 2026 16:06
@socket-security

socket-security Bot commented Sep 15, 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.102.0 ⏵ v0.105.073 +1100100100100

View full report

@kernel-internal

Copy link
Copy Markdown
Contributor

🔧 CI Fix Available

I've pushed a fix for the CI failure.

What failed: both test and build (Preview CLI binaries) failed at go mod download:

go: github.com/kernel/kernel-go-sdk@v0.102.0 (replaced by github.com/kernel/kernel-go-sdk-staging@v0.86.1-0.20260913234358-ea40d26657db): version "v0.86.1-0.20260913234358-ea40d26657db" invalid: unknown revision ea40d26657db

Root cause: the staging SDK revision pinned by the replace directive in go.mod is no longer resolvable. This is not a regression from the code in this PR — fd5a2ae passed yesterday with the same pin, and the latest commit only merged main without touching go.mod. The pinned revision has since disappeared from the staging repository.

The fix applies the transition that PREVIEW.md and the release workflow's "Reject preview SDK dependencies" guard already call for. The credential vault API is now in the released SDK, so the preview pin is no longer needed:

  • Dropped the kernel-go-sdk-staging replace directive and pinned the released github.com/kernel/kernel-go-sdk v0.104.0.
  • Updated the two vault item update call sites to the released union field names (OfCardVaultItemUpdateRequest, OfCredentialVaultItemUpdateRequest).
  • Set Type: "card" explicitly on the card update body, since in the released SDK that field is a plain string with omitzero rather than an elidable constant, matching the credential path which already sets its type.
  • Switched the authorize body to AuthorizeVaultItemOperationRequestParam, which made the shared/constant import unused.

make test (go vet + go test ./...) passes, and scripts/build-preview.sh cross-compiles cleanly for all six targets.

Total change is 4 files, +6/−9.

Worth noting as follow-up for you rather than something I changed: PREVIEW.md also asks to remove the temporary SDK-auth steps and restore fork testing and Go caching once the pin is gone. Those steps are harmless now that dependencies resolve publicly, so I left the workflows alone to keep this fix minimal.

👉 Click here to create a PR with the fix

@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.

Stale Bugbot comment from a previous run.

Comment thread cmd/vaults_operation_params.go

@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 default 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 6758ec9. Configure here.

Comment thread cmd/vaults_output.go Outdated
@rgarcia
rgarcia merged commit de979fc into main Sep 15, 2026
8 checks passed
@rgarcia
rgarcia deleted the hypeship/vault-credentials branch September 15, 2026 19:10
kernel-internal Bot added a commit that referenced this pull request Sep 15, 2026
Update github.com/kernel/kernel-go-sdk to aac4d0c
(v0.105.1-0.20260915195748-aac4d0c60651). The only API change is a new
nullable `intent` response field on config-registry analyses, and every
/config-registry endpoint carries x-cli-skip, so no command or flag
changes were needed. A full enumeration of api.md against the CLI
command tree found no other coverage gaps.

Repair the fallout from merging main (#252, #253) into this branch. Git
auto-merged two independent variants of the vault credential work into
code that did not parse (an orphaned `case "credential":` after an `if`,
a duplicate `preparation` map key) and into call sites that referenced
functions from the other variant. Main's reviewed versions supersede the
bot-authored drafts, so the vault subsystem is taken from main verbatim,
along with its README sections. Branch-only work that main lacks is kept:
auth connections login regained its dropped TelemetryCdpExclude input
field, the `--interaction-id` submit flag stays documented, and the
items invoke table row keeps its prepare_checkout/collect coverage.

Tested: go build ./..., go test ./... (all green), plus live API smoke
tests of vaults create, vaults credentials create/update --spec-file,
vaults items get/get -o json/events/delete, vaults delete, browsers
list, and auth connections login --telemetry-cdp-exclude validation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

2 participants