Feat: Changelly integration#6028
Open
peachbits wants to merge 2 commits into
Open
Conversation
Decodes strings stored as arrays of XOR-masked char codes, with a scripts/obfuscateString.ts helper to generate the arrays for env.json. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Enable the changelly swap plugin, with API credentials supplied via initOptions and stored XOR-obfuscated in env.json. Co-authored-by: Changelly <changelly@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| asObject({ | ||
| // Arrays of XOR-masked char codes; see asObfuscatedString. | ||
| apiKey: asOptional(asObfuscatedString, ''), | ||
| secret: asOptional(asObfuscatedString, '') |
There was a problem hiding this comment.
🔒 Agentic Security Review
Severity: HIGH
CHANGELLY_INIT.secret is being accepted as an XOR-obfuscated client value (asObfuscatedString). This is reversible by anyone with app/bundle access, so it does not protect a partner API secret and effectively ships the secret to end users.
Impact: The exposed credential can be extracted and reused for unauthorized Changelly API usage (quota/billing abuse and integration impersonation).
Reviewed by Cursor Security Reviewer for commit b4e9343. Configure here.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Replaces #5988, reordered so the obfuscation utility lands first:
scripts/obfuscateString.tsto generate the arrays.CHANGELLY_INITapiKey/secret stored obfuscated in env.json and passed to the plugin via initOptions (see Feat: Changelly integration edge-exchange-plugins#449).🤖 Generated with Claude Code
Note
Medium Risk
Introduces a new swap provider and decodes API credentials at runtime; obfuscation is not cryptographic protection but follows the same pattern as other env secrets.
Overview
Enables the Changelly centralized swap provider by wiring
CHANGELLY_INITintoswapPluginsand validatingapiKey/secretthrough env config (decoded at runtime for the exchange plugin).Adds
asObfuscatedStringso those credentials can live inenv.jsonas XOR-masked char-code arrays instead of plain strings, plusscripts/obfuscateString.tsto generate the arrays. Changelly also gets swap UI polish: CDN icon inpluginIdIconsand KYC/terms links inSwapVerifyTermsModal.Reviewed by Cursor Bugbot for commit b4e9343. Bugbot is set up for automated code reviews on this repo. Configure here.