Skip to content

fix: address security findings on path traversal, hardening - #2

Merged
ma-04 merged 2 commits into
mainfrom
fix/security-audit-findings
Aug 20, 2026
Merged

fix: address security findings on path traversal, hardening#2
ma-04 merged 2 commits into
mainfrom
fix/security-audit-findings

Conversation

@ma-04

@ma-04 ma-04 commented Aug 20, 2026

Copy link
Copy Markdown
Owner
  • Contain screenmemory:// and screenshot IPC paths inside the storage root (src/main/path-containment.ts) instead of an unchecked path.join
  • Encrypt the stored AI API key via safeStorage, expose it to the renderer only as an ai.hasApiKey flag (src/main/secret-store.ts, db/repositories/settings.ts)
  • Allowlist and validate every settings key/value pair before persisting, including an AI base-URL host allowlist (src/main/settings-validation.ts)
  • Add navigation, window-open, and permission-request guards plus a session-wide CSP (src/main/security.ts), replacing the CSP meta tag
  • Redact likely secrets out of OCR text before it reaches the AI prompt (src/main/redact.ts)
  • Drop risky mac entitlements, gate DevTools/reload to unpackaged builds, and SHA-pin third-party GitHub Actions
  • Fix a settings-input rollback race and delete unused dead code that still returned the decrypted API key

ma-04 added 2 commits August 20, 2026 10:38
…web hardening

- Contain screenmemory:// and screenshot IPC paths inside the storage root
  (src/main/path-containment.ts) instead of an unchecked path.join
- Encrypt the stored AI API key via safeStorage, expose it to the renderer
  only as an ai.hasApiKey flag (src/main/secret-store.ts, db/repositories/settings.ts)
- Allowlist and validate every settings key/value pair before persisting,
  including an AI base-URL host allowlist (src/main/settings-validation.ts)
- Add navigation, window-open, and permission-request guards plus a
  session-wide CSP (src/main/security.ts), replacing the CSP meta tag
- Redact likely secrets out of OCR text before it reaches the AI prompt
  (src/main/redact.ts)
- Drop risky mac entitlements, gate DevTools/reload to unpackaged builds,
  and SHA-pin third-party GitHub Actions
- Fix a settings-input rollback race and delete unused dead code that
  still returned the decrypted API key

Verified against security-issues.md in security-issues-verified.md.
@ma-04
ma-04 merged commit 2cabcfb into main Aug 20, 2026
2 checks passed
@ma-04
ma-04 deleted the fix/security-audit-findings branch August 20, 2026 04:41
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