Skip to content

Throw if using secret key#458

Open
cameron-morrow-toptal wants to merge 2 commits intomasterfrom
FENCE-2407/add-assertion-crash-for-using-secret-key-in-intialize
Open

Throw if using secret key#458
cameron-morrow-toptal wants to merge 2 commits intomasterfrom
FENCE-2407/add-assertion-crash-for-using-secret-key-in-intialize

Conversation

@cameron-morrow-toptal
Copy link
Contributor

Copilot AI review requested due to automatic review settings August 25, 2025 19:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds validation to prevent the use of secret keys during Radar SDK initialization. The change ensures that only publishable keys are accepted by throwing an IllegalArgumentException when a secret key (containing "sk") is provided.

Key changes:

  • Added secret key validation in the Radar.initialize() method
  • Added comprehensive test coverage for the new validation logic

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
sdk/src/main/java/io/radar/sdk/Radar.kt Added validation to throw exception when secret key is detected
sdk/src/test/java/io/radar/sdk/RadarTest.kt Added test cases to verify secret key validation and exception handling

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.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