Skip to content

Conversation

@sachaservan
Copy link
Member

@sachaservan sachaservan commented Jan 1, 2026

Summary by cubic

Implemented a native Swift EHBP client and test suite, replacing gomobile bindings and updating CI and release workflows.

  • New Features

    • SwiftPM package “EHBP” using swift-crypto, with request and streaming APIs.
    • Added unit tests for nonce computation, key derivation, request encryption/decryption, Go interop, and security (MitM resistance).
    • Added streaming tests for buffer management, fragmented chunk handling, and multi-chunk decryption.
    • CI job on macOS to build and run Swift tests.
  • Refactors

    • Removed gomobile bindings and XCFramework build steps from release workflow.
    • Updated Go module: bumped to Go 1.25.1, upgraded testify, and removed gomobile/tools dependencies.

Written for commit 671e296. Summary will update on new commits.

Copy link

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

2 issues found across 11 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="swift/Tests/EHBPTests/DeriveTests.swift">

<violation number="1" location="swift/Tests/EHBPTests/DeriveTests.swift:339">
P2: The `expectedKeyHex` value is parsed but never actually compared against the derived key. This makes the Go interoperability test incomplete - it only verifies `nonceBase` matches the Go implementation, not the key itself. Consider extracting the key bytes and comparing them, or at minimum remove the unused `expectedKeyHex` variable to avoid confusion.</violation>
</file>

<file name="swift/Tests/EHBPTests/SecurityTests.swift">

<violation number="1" location="swift/Tests/EHBPTests/SecurityTests.swift:33">
P2: The return value of `SecRandomCopyBytes` is discarded. If random number generation fails, the test would continue with zero-filled data, potentially giving false confidence in security properties. Consider checking the return value and failing the test on error.</violation>
</file>

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

@sachaservan sachaservan force-pushed the feat/native-swift branch 2 times, most recently from 4c6957e to 1c1c029 Compare January 1, 2026 12:27
@sachaservan
Copy link
Member Author

@cubic-dev-ai review

@cubic-dev-ai
Copy link

cubic-dev-ai bot commented Jan 1, 2026

@cubic-dev-ai review

@sachaservan I have started the AI code review. It will take a few minutes to complete.

Copy link

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

No issues found across 17 files

@tanyav2 tanyav2 self-requested a review January 5, 2026 07:35
@sachaservan sachaservan merged commit 7163ea0 into main Jan 5, 2026
3 checks passed
@sachaservan sachaservan deleted the feat/native-swift branch January 5, 2026 07:36
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