Move redux-logger and debug to devDependencies
Summary
app/package.json lists redux-logger and debug in dependencies. Move them to devDependencies and guard usage so production Tauri builds cannot log JWTs / API responses / chat messages.
Problem / Context
Confirmed in app/package.json:
"debug": "^4.4.3"underdependencies"redux-logger": "^3.0.6"underdependencies
redux-logger logs every Redux action + state change; debug exposes namespaced console output. Even with Vite tree-shaking, runtime-deps placement is a correctness/audit smell. CWE-532.
Identified by audit #2575 (M-2).
Scope
-
Move both to
devDependencies. -
Wrap any
redux-loggermiddleware import behindimport.meta.env.DEV:const middleware = [ ...(import.meta.env.DEV ? [require('redux-logger').default] : []), ]; -
Verify the production bundle (
pnpm build, then grepapp/dist) no longer references either package.
Acceptance criteria
- [ ]
redux-logger+debugindevDependenciesonly - [ ] Production bundle does not reference either package (grep smoke)
- [ ] Dev still gets verbose redux logging
- [ ] Diff coverage ≥ 80%
Related
- Parent: #2575
- CWE-532 — Insertion of Sensitive Information into Log File
Closing — superseded by #2625.
Audit M-2 partially overstated the finding:
redux-loggeris already gated byIS_DEVinapp/src/store/index.ts:175-178. Moving it todevDependenciesis still correctness/audit-smell cleanup, so the scoped change tracked in #2625.debugis load-bearing in production code (CoreStateProvider,ChatRuntimeProvider, voice/mascot features,tauriCommands/common.ts, ~10+ call sites). Moving it todevDependencieswould break production builds. Leaving it independencies.