Skip to content

Only expose __REDUX_STORE__ in test mode - #3648

Open
legoktm wants to merge 1 commit into
mainfrom
hide-redux-store
Open

Only expose __REDUX_STORE__ in test mode#3648
legoktm wants to merge 1 commit into
mainfrom
hide-redux-store

Conversation

@legoktm

@legoktm legoktm commented Jul 27, 2026

Copy link
Copy Markdown
Member

We only need it there, so this reduces our attack surface slightly. Flagged by Claude 5 Opus.

Test plan

  • visual review is sufficient, just grep that it's not used anywhere outside the server test

Checklist

This change accounts for:

  • testing changes on Qubes as needed (especially changes related to cryptography, export, disposable VM use, or complex UI changes)
  • any needed updates to the AppArmor profile for files beyond the application code
  • any needed self-contained database migrations (including testing against a clean test database from main)

We only need it there, so this reduces our attack surface slightly.
Flagged by Claude 5 Opus.
@legoktm
legoktm requested a review from a team as a code owner July 27, 2026 21:42
@legoktm legoktm added this to the 1.7.0 milestone Jul 27, 2026
@legoktm legoktm moved this to Ready For Review in SecureDrop Jul 27, 2026
@legoktm legoktm moved this from Ready For Review to Next sprint candidates in SecureDrop Jul 27, 2026
// Expose store to window for testing
if (typeof window !== "undefined") {
// Expose store to window for server tests
if (import.meta.env.MODE === "test") {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We don't need the typeof window check anymore (or ever really) because the very next line invokes window.electronAPI...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Next sprint candidates

Development

Successfully merging this pull request may close these issues.

1 participant