Skip to content

Feat: Changelly integration#6028

Open
peachbits wants to merge 2 commits into
developfrom
matthew/changelly-integration
Open

Feat: Changelly integration#6028
peachbits wants to merge 2 commits into
developfrom
matthew/changelly-integration

Conversation

@peachbits

@peachbits peachbits commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Replaces #5988, reordered so the obfuscation utility lands first:

  1. Add asObfuscatedString cleaner — a codec that decodes strings stored as arrays of XOR-masked char codes, plus scripts/obfuscateString.ts to generate the arrays.
  2. Feat: Changelly integration — enables the changelly swap plugin with CHANGELLY_INIT apiKey/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_INIT into swapPlugins and validating apiKey/secret through env config (decoded at runtime for the exchange plugin).

Adds asObfuscatedString so those credentials can live in env.json as XOR-masked char-code arrays instead of plain strings, plus scripts/obfuscateString.ts to generate the arrays. Changelly also gets swap UI polish: CDN icon in pluginIdIcons and KYC/terms links in SwapVerifyTermsModal.

Reviewed by Cursor Bugbot for commit b4e9343. Bugbot is set up for automated code reviews on this repo. Configure here.

peachbits and others added 2 commits June 10, 2026 14:39
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>
Comment thread src/envConfig.ts
asObject({
// Arrays of XOR-masked char codes; see asObfuscatedString.
apiKey: asOptional(asObfuscatedString, ''),
secret: asOptional(asObfuscatedString, '')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 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).

Fix in Cursor Fix in Web

Reviewed by Cursor Security Reviewer for commit b4e9343. Configure here.

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.

1 participant