fix: clear AssistSupport security alerts#116
Conversation
Validate YouTube hosts with URL parsing. Randomize crypto test passphrases and avoid fixed seed buffers. Update OpenSSL lockfile entries to patched releases. Tests: focused frontend, Rust, audit, and security regression checks passed.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a156ec6036
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let mut key = vec![0; KEY_LEN]; | ||
| argon2 | ||
| .hash_password_into(passphrase.as_bytes(), salt, &mut key) | ||
| .map_err(|e| SecurityError::KeyDerivation(e.to_string()))?; | ||
|
|
||
| Ok(key) | ||
| key.try_into() |
There was a problem hiding this comment.
Zeroize the derived key buffer before deallocation
When passphrase-derived keys are generated, this now stores the Argon2 output in a heap Vec and immediately consumes it with try_into(). In every passphrase wrap/unwrap/export path, that drops the original heap allocation without zeroizing it, so the KEK can remain in freed heap memory even though the callers only zeroize the returned array and the surrounding docs say the derived key is zeroized after use. Please derive into a fixed [u8; KEY_LEN] as before or wrap the temporary buffer in a zeroizing type before converting it.
Useful? React with 👍 / 👎.
Add component-level coverage for URL rejection and ingest success paths. Tests: YouTube ingest test, frontend coverage, diff coverage, lint, and typecheck passed.
What
Why
How
URLparsing plus exact/subdomain host checks for YouTube ingest.Testing
pnpm vitest run src/components/Ingest/YouTubeIngest.test.tspnpm buildpnpm lintpnpm typecheckpnpm exec tsc --noEmit && pnpm exec eslint src/components/Ingest/YouTubeIngest.tsx src/components/Ingest/YouTubeIngest.test.tscargo test --manifest-path src-tauri/Cargo.toml security --testscargo test --manifest-path src-tauri/Cargo.toml --test securitypnpm test:security:audit:rustpnpm test:security-regressiongit diff --checkPerformance impact
Risk / Notes
http:YouTube URLs to preserve existing ingest behavior.Screenshots (UI only)
Lockfile rationale (if lockfile changed)
Cargo.lockwas updated only for OpenSSL packages to remediate OSV-reported OpenSSL advisories.