Skip to content

Remove SideShift privateKey from env config#6024

Open
j0ntz wants to merge 1 commit into
developfrom
jon/remove-sideshift-private-key
Open

Remove SideShift privateKey from env config#6024
j0ntz wants to merge 1 commit into
developfrom
jon/remove-sideshift-private-key

Conversation

@j0ntz

@j0ntz j0ntz commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

SideShift hack followup. The SideShift affiliate account was compromised, so we
stop sending the affiliate secret. This removes the privateKey field that was
added to SIDESHIFT_INIT in env config by #5369. The SideShift swap plugin
sends that value as the x-sideshift-secret header; with the field gone the
header is omitted. SideShift confirmed the integration works identically without
it (the affiliateId query param is what tracks affiliate commission). Rotating
to a new affiliate account/affiliateId and removing the secret from the
production env are handled operationally, outside this repo.

Asana: https://app.asana.com/0/1215088146871429/1214800712844381

Verification.

  • tsc --noEmit and verify-repo (eslint + jest) pass.
  • App boots on a bundle built with this change; the sideshift core plugin
    initializes (the modified SIDESHIFT_INIT cleaner validates at startup) and
    the in-app SideShift swap path (BTC -> AVAX) is reachable. See screenshots.
  • Direct live-API check of the exact request the plugin now issues (no
    x-sideshift-secret header): GET https://sideshift.ai/api/v2/pair/btc-bitcoin/eth-ethereum
    returns 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:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

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_INIT in envConfig.ts no longer accepts a privateKey field—only optional affiliateId remains. That value was passed into the SideShift swap plugin as the x-sideshift-secret header; without it, requests omit the header while affiliateId still 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.

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.
@j0ntz

j0ntz commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

📸 Test evidence

agent proof 1214800712844381 01 app running new bundle

agent proof 1214800712844381 01 app running new bundle

agent proof 1214800712844381 02 sideshift swap configured

agent proof 1214800712844381 02 sideshift swap configured

Captured by the agent's in-app test run (build-and-test).

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