Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.e2e.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copy to .env.e2e (gitignored) and fill in.
# Funded PUBLIC testnet STUB seed (24 words). Never a mainnet/real-value seed.
# If unset, the import journey is skipped.
E2E_IMPORT_SEED=

# Optional: scale every timeout at once for slow machines (e.g. 2 = double).
# E2E_TIMEOUT_SCALE=1
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/e2e/
54 changes: 29 additions & 25 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,48 @@
name: End-to-end tests
on:
push:
branches:
- master
- release-candidate
- release
tags:
- v*
pull_request:
branches:
- master
- release-candidate
- release
push:
branches:
- master
- release-candidate
- release
tags:
- v*
pull_request:
branches:
- master
- release-candidate
- release
jobs:
cypress-run:
playwright-run:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [22.x]
env:
E2E_IMPORT_SEED: ${{ secrets.E2E_IMPORT_SEED }}
steps:
- name: Checkout
# https://github.com/actions/checkout/releases/tag/v4.2.2
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
Comment on lines 24 to 25

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Set persist-credentials: false on checkout.

Static analysis flags that the checkout step doesn't disable credential persistence. Since this job doesn't need to push or use git credentials afterward, disable persistence to reduce token exposure surface.

🔒 Suggested fix
       - name: Checkout
         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+        with:
+          persist-credentials: false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Checkout
# https://github.com/actions/checkout/releases/tag/v4.2.2
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 24-25: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/e2e.yml around lines 24 - 25, The Checkout step in the e2e
workflow should disable git credential persistence. Update the actions/checkout
usage in the Checkout job to set persist-credentials to false so the job does
not retain the token after cloning. Keep the change scoped to the checkout step
only, since no later steps in this workflow need to push or reuse git
credentials.

Source: Linters/SAST tools

- name: Setup nodejs
# https://github.com/actions/setup-node/releases/tag/v4.1.0
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
with:
node-version: ${{ matrix.node-version }}
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libusb-1.0-0-dev libudev-dev
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
# https://github.com/cypress-io/github-action/releases/tag/v6.10.9
uses: cypress-io/github-action@f790eee7a50d9505912f50c2095510be7de06aa7
- name: Install NPM dependencies
run: npm ci
- name: Install Playwright/Electron host libraries
run: npx playwright install-deps chromium
- name: Run Playwright E2E (headless via xvfb)
run: xvfb-run -a npm run e2e
- name: Upload report
if: always()
uses: actions/upload-artifact@v4
with:
start: npm start
wait-on: 'http://localhost:3000'
wait-on-timeout: 120
browser: chrome
install-command: npm ci
name: playwright-report
path: |
playwright-report/
test-results/
retention-days: 7
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ src/**/*.css

# testing
/coverage
# Cypress
cypress/screenshots/
cypress/videos/

# production
/build
Expand Down Expand Up @@ -43,3 +40,9 @@ yarn-error.log*
# yalc
.yalc/
yalc.lock

# Playwright E2E
.env.e2e
/playwright-report/
/test-results/
/blob-report/
11 changes: 0 additions & 11 deletions cypress.config.ts

This file was deleted.

260 changes: 0 additions & 260 deletions cypress/e2e/00-welcome.cy.js

This file was deleted.

Loading