Repository navigation
feat(MBL-2543): reject secret keys and pick region from key - #925
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sample app builds 📱Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #925 +/- ##
============================================
+ Coverage 69.07% 74.75% +5.68%
- Complexity 838 2477 +1639
============================================
Files 149 287 +138
Lines 4601 13599 +8998
Branches 628 2333 +1705
============================================
+ Hits 3178 10166 +6988
- Misses 1189 2596 +1407
- Partials 234 837 +603 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Build available to test |
📏 SDK Binary Size Comparison Report
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ny prefix Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mahmoud-elmorabea
left a comment
There was a problem hiding this comment.
Looks good overall! 💯
One small inconsistency: Right now the usage of a secret key will leave init call at an invalid state and crash at builder.
I think we should align them: either crash or log.
I have always been in favor of SDKs never crashing if something is wrong, I think that's the way to go here as well. However, I do see that leaking a secret key here might be worth breaking that rule but not generalizing it for other cases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Module accessors like ModuleLocation.instance() no longer throw after a refused key; their calls do nothing because the modules are not set up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#926) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2f677a0. Configure here.
| // Drop the modules registered while disabled so only the new config's modules get set up | ||
| SDKComponent.modules.clear() | ||
| instance = null | ||
| } |
There was a problem hiding this comment.
Stale DataPipeline after disabled release
High Severity
releaseDisabledInstance clears the static CustomerIO instance but not the DataPipeline entry in SDKComponent’s singleton map. The disabled instance registered in init stays cached, so a later initialize with a valid pk_ key leaves modules reading the old pipeline (cdpApiKey "disabled") instead of the new SDK.
Reviewed by Cursor Bugbot for commit 2f677a0. Configure here.
## [4.25.0](4.24.0...4.25.0) (2026-10-21) ### Features * **MBL-2543:** reject secret keys and pick region from key ([#925](#925)) ([b5bc060](b5bc060))


Block sk_ keys in apps and grab the region from the new key prefix.