Remove SideShift privateKey from env config#6024
Conversation
The SideShift affiliate account was compromised. SideShift confirmed the swap integration works identically without the privateKey, so stop validating and injecting it (it was sent as the x-sideshift-secret header). Account rotation to a new affiliateId is handled operationally.
|
Verification note (testing followup, no code change) Confirmed this change is safe: removing the SideShift Direct SideShift API check from the test host, with and without the old secret header, returned identical results:
The plugin already guards the header with A real in-app SideShift swap could not be driven to the success scene from this test slot because SideShift hard-blocks shift creation from US IPs (createShift:false; the ACCESS_DENIED page lists the United States as a blocked country). This is a US geo-restriction independent of this change, not a regression. The app was built from this branch (with privateKey absent from env.json) and drove a live BTC->ETH swap quote with the confirm slider, so the swap flow itself is functional with the change. |


CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneDescription
SideShift hack followup. The SideShift affiliate account was compromised, so we
stop sending the affiliate secret. This removes the
privateKeyfield that wasadded to
SIDESHIFT_INITin env config by #5369. The SideShift swap pluginsends that value as the
x-sideshift-secretheader; with the field gone theheader is omitted. SideShift confirmed the integration works identically without
it (the
affiliateIdquery param is what tracks affiliate commission). Rotatingto a new affiliate account/
affiliateIdand removing the secret from theproduction env are handled operationally, outside this repo.
Asana: https://app.asana.com/0/1215088146871429/1214800712844381
Verification.
tsc --noEmitandverify-repo(eslint + jest) pass.sideshiftcore plugininitializes (the modified
SIDESHIFT_INITcleaner validates at startup) andthe in-app SideShift swap path (BTC -> AVAX) is reachable. See screenshots.
x-sideshift-secretheader):GET https://sideshift.ai/api/v2/pair/btc-bitcoin/eth-ethereumreturns HTTP 200 with a valid rate, confirming SideShift accepts header-less
requests. Driving the on-chain swap to settlement was skipped (real funds plus
debug-build keypad instability); the change is behavior-neutral.
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Note
Low Risk
Narrow config/schema change aligned with a security incident; swap behavior is intended to be unchanged aside from omitting the secret header.
Overview
Removes the compromised SideShift affiliate secret from app configuration after the affiliate account was compromised.
SIDESHIFT_INITinenvConfig.tsno longer accepts aprivateKeyfield—only optionalaffiliateIdremains. That value was passed into the SideShift swap plugin as thex-sideshift-secretheader; without it, requests omit the header whileaffiliateIdstill tracks commissions, per SideShift. The unreleased CHANGELOG entry documents the behavior change.Reviewed by Cursor Bugbot for commit e09cc5d. Bugbot is set up for automated code reviews on this repo. Configure here.