Skip to content

chore: harden extension privacy defaults and release workflow - #36

Merged
pedrosousa13 merged 3 commits into
mainfrom
fix/security-hardening
Jun 25, 2026
Merged

chore: harden extension privacy defaults and release workflow#36
pedrosousa13 merged 3 commits into
mainfrom
fix/security-hardening

Conversation

@pedrosousa13

@pedrosousa13 pedrosousa13 commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Make window.data exposure opt-in via Settings instead of default-on, and make the page script remove the in-page JSON holder after reading it.
  • Keep broad content-script matching for automatic JSON viewing.
  • Preserve the existing Remember queries & searches control as default-on local storage with a Settings opt-out, and add regression coverage so that behavior does not drift.
  • Remove the release workflow entirely so GitHub Actions only runs checks.

Branch comparison

  • Started from updated origin/main at e48e4df.
  • Cherry-picked the relevant fix/window-data-opt-in commits for the opt-in window.data flow.
  • Skipped unrelated fix/window-data-opt-in contents like planning/store-listing files.

Manual testing

  1. Build and load the extension from dist:
    • Run npm run build.
    • Open Chrome chrome://extensions, enable Developer mode, click Load unpacked, and select this repo's dist folder.
  2. Open a JSON response, for example https://jsonplaceholder.typicode.com/users.
    • Confirm JSON Bonsai replaces the plain JSON page with the viewer.
    • Open DevTools Console and confirm window.data is undefined before opting in.
  3. Open Settings (gear icon).
    • Confirm Expose payload as window.data is unchecked by default.
    • Check it, reload the JSON page, and confirm window.data contains the parsed payload in the page console.
    • In Elements, confirm #jv-json-data does not linger after the page script runs.
    • Uncheck the setting, reload, and confirm window.data is no longer set by JSON Bonsai.
  4. Test the pre-existing query/search persistence option.
    • Confirm Remember queries & searches is checked by default.
    • Run a query and a search, reload the same origin, and confirm the query/search history is restored.
    • Uncheck Remember queries & searches, run a different query/search, reload, and confirm the new query/search is not restored.
  5. Check workflow scope.
    • Confirm .github/workflows/ci.yml is the only workflow file.
    • Confirm CI still runs typecheck, unit tests, build, and E2E checks.
    • Confirm there is no release workflow and no browser-store publishing automation.

Verification

  • npm run typecheck
  • npm test (17 files, 214 tests)
  • npm run build
  • npm run test:e2e (30 tests)
  • npm audit --json (0 vulnerabilities)

@pedrosousa13
pedrosousa13 force-pushed the fix/security-hardening branch 2 times, most recently from e204a5b to 79af0bd Compare June 25, 2026 07:27
@pedrosousa13 pedrosousa13 changed the title Harden extension privacy defaults and release workflow chore: harden extension privacy defaults and release workflow Jun 25, 2026
@pedrosousa13
pedrosousa13 force-pushed the fix/security-hardening branch from 79af0bd to 1507018 Compare June 25, 2026 07:35
@pedrosousa13
pedrosousa13 merged commit ddefa34 into main Jun 25, 2026
2 checks passed
@pedrosousa13
pedrosousa13 deleted the fix/security-hardening branch June 25, 2026 07:40
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