Skip to content

Security hardening suggestions (CSP, proxy host allowlist, per-window capabilities, README drift) #66

Description

@Mephistosz

Security read-through before adopting the app (context for #63/#64/#65). Verified OK along the way: no telemetry, cookies in keyring, and all 6 signatures on the updater-channel latest.json match the embedded pubkey key-id (33639f8a45ff00d3) — the update chain is consistent.

Hardening items that need maintainer decisions:

  1. CSP is null (src-tauri/tauri.conf.json). The webview runs Google-supplied JS in the app origin (BotGuard in poToken.ts, iframe_api in AudioEngine.ts, youtubei.js shims) and the session cookie lives in page memory. Suggested starting point: 'self' + https://www.youtube.com + 'unsafe-inline' 'unsafe-eval' (BotGuard requires them) + blob: + http://127.0.0.1:*.

  2. proxy_http_request accepts arbitrary hosts — page JS could probe localhost/LAN through it. Suggest an explicit Google-host allowlist, same approach as security: only forward session cookie to Google media hosts #63 takes for the audio path. (Cookie injection there is already correctly scoped to youtube.com.)

  3. Filesystem commands accept arbitrary paths from the frontend (local_audio_scan, local_audio_read, download_audio_source, download_audio_save). Suggest restricting writes to the configured downloads folder and reads to audio extensions.

  4. One capability set covers both main and mini-player (src-tauri/capabilities/default.json). The mini-player likely needs a fraction of it — suggest splitting per window.

  5. README says the project "DOES NOT offer any downloading functionality", but a functional Downloader plugin ships calling download_audio_save. Intentional ToS positioning or drift? Filed as a question since changing the README's stance is a maintainer call.

None of these are exploitable today without an injection into the webview first — hardening, not active bugs. Happy to implement any of them.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions