Skip to content

chore(deps): update keyring module to maintained fork#466

Merged
majd merged 5 commits intomainfrom
build/ios
Apr 14, 2026
Merged

chore(deps): update keyring module to maintained fork#466
majd merged 5 commits intomainfrom
build/ios

Conversation

@majd
Copy link
Copy Markdown
Owner

@majd majd commented Apr 14, 2026

Summary by cubic

Switches to the maintained github.com/byteness/keyring fork and upgrades to Go 1.25 to restore iOS builds. CI now uses Node 20 actions, native Linux runners, and CGO settings to fix build and release failures.

  • Dependencies

    • Replace github.com/99designs/keyring with github.com/byteness/keyring; update imports and refresh golang.org/x/*; add maintained platform keychain and 1Password libs (e.g., github.com/byteness/go-keychain, github.com/byteness/go-libsecret, github.com/danieljoos/wincred).
    • Set go 1.25.0 in go.mod; update workflows to actions/checkout@v4, actions/setup-go@v5, and bump golangci/golangci-lint-action@v8 to version: v2.9.
    • Fix CGO-related CI failures from byteness/keyring: run Linux builds on native runners (ubuntu-24.04-arm, ubuntu-latest), enable CGO_ENABLED=1 for macOS dry builds, and split Linux release builds into a dedicated job.
  • Refactors

    • Replace deprecated golang.org/x/net/context with context and use a typed context key (interactiveKey) to satisfy lint rules.

Written for commit 4ac3168. Summary will update on new commits.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 12 files

Confidence score: 4/5

  • This PR is likely safe to merge, with the main risk being dependency surface area rather than a confirmed runtime bug.
  • In go.mod, switching to the byteness/keyring fork appears to introduce many additional indirect packages (including observability/runtime SDK stacks), which can increase build, maintenance, and supply-chain exposure.
  • Given the reported severity (5/10) and no explicit functional breakage noted, this looks like a moderate caution item instead of a merge blocker.
  • Pay close attention to go.mod - the expanded transitive dependency graph from the keyring fork should be reviewed for necessity and downstream impact.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="go.mod">

<violation number="1" location="go.mod:7">
P2: The `byteness/keyring` fork pulls in ~17 additional indirect dependencies (Wasm runtime, 1Password SDKs, OpenTelemetry, Jaeger tracing, protobuf, etc.) compared to the original `99designs/keyring`. This significantly increases binary size and supply-chain surface for a CLI tool. Consider whether a lighter-weight fork or a pinned feature set of this fork (without optional backends) is available.</violation>
</file>
Architecture diagram
sequenceDiagram
    participant User as User / CLI
    participant App as ipatool (cmd)
    participant KC as pkg/keychain
    participant KR as CHANGED: byteness/keyring (Fork)
    participant OS as OS Secure Store (Keychain/WinCred/SecretService)

    Note over App,OS: Credential Management Flow

    User->>App: Executes command (e.g. auth login)
    App->>KC: Set(key, data)
    
    KC->>KR: CHANGED: Open(serviceName)
    KR-->>KC: keyring instance
    
    KC->>KR: CHANGED: Set(item)
    
    Note right of KR: Fork restores compatibility<br/>for iOS and Go 1.25
    
    KR->>OS: NEW: Platform-specific syscalls<br/>(via byteness/go-keychain or wincred)
    
    alt Success
        OS-->>KR: OK
        KR-->>KC: Success
        KC-->>App: Success
    else Access Denied / Platform Error
        OS-->>KR: Error
        KR-->>KC: Wrapped Error
        KC-->>App: Return Error
    end

    Note over App,OS: Data Retrieval Flow

    App->>KC: Get(key)
    KC->>KR: CHANGED: Get(key)
    KR->>OS: Request Item
    OS-->>KR: Encrypted Data
    KR-->>KC: Decrypted bytes
    KC-->>App: Data
Loading

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread go.mod
Copy link
Copy Markdown
Owner Author

majd commented Apr 14, 2026

@cubic-dev-ai Your task is to investigate the failed GitHub workflows, fix the issues that caused them to fail, then update the pull request with a new commit that contains those fixes.

@cubic-dev-ai
Copy link
Copy Markdown

cubic-dev-ai bot commented Apr 14, 2026

The CI failures were caused by outdated GitHub Actions that use deprecated Node.js runtimes:

  • actions/checkout@v2 uses Node 12 (end-of-life), which GitHub Actions runners no longer support
  • actions/setup-go@v3 uses Node 16 (deprecated), and its version manifest likely doesn't include Go 1.25.0

I've updated all 5 workflow files:

  • actions/checkout@v2actions/checkout@v4 (Node 20)
  • actions/setup-go@v3actions/setup-go@v5 (Node 20, with Go 1.25.0 support)

✅ All tests passing (build, vet, 124 unit tests across 7 packages)

Pushed commits to build/ios.

Update actions/checkout from v2 to v4 and actions/setup-go from v3 to
v5 across all workflow files. The old versions use deprecated Node 12/16
runtimes that are no longer supported by GitHub Actions runners, causing
CI failures.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

0 issues found across 5 files (changes from recent commits).

Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.

Two issues with the CI:

1. golangci-lint v2.1 was built with Go 1.24 and cannot lint a project
   targeting Go 1.25.0. Update to v2.9, which is the first release built
   with Go 1.25.

2. byteness/keyring imports 1password/onepassword-sdk-go, which intentionally
   fails compilation when CGO is disabled on linux/darwin targets
   (client_builder_no_cgo.go, //go:build !cgo && (darwin || linux)).
   Cross-compiling for Linux from macOS disables CGO by default, triggering
   this error. Fix by:
   - Switching Linux dry-builds and release builds to native Linux runners
     (ubuntu-latest for amd64, ubuntu-24.04-arm for arm64) where CGO works
     without a cross-compiler.
   - Adding CGO_ENABLED: 1 to macOS dry-builds (already set in release.yml).
   - Splitting Linux release builds into a dedicated build_linux job.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

0 issues found across 3 files (changes from recent commits).

Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.

Switch cmd/root.go to use the standard library context package.
Define a typed context key (contextKey) to satisfy SA1029, which
flags plain string literals as context.WithValue keys.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
@majd majd enabled auto-merge (squash) April 14, 2026 18:35
@majd majd merged commit 1858ad7 into main Apr 14, 2026
14 checks passed
@majd majd deleted the build/ios branch April 14, 2026 18:39
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