feat: add VirusTotal process scan via SHA-256 hash#198
Open
IslamAbdelslam wants to merge 1 commit intoAbdenasser:mainfrom
Open
feat: add VirusTotal process scan via SHA-256 hash#198IslamAbdelslam wants to merge 1 commit intoAbdenasser:mainfrom
IslamAbdelslam wants to merge 1 commit intoAbdenasser:mainfrom
Conversation
Adds on-demand security scanning for any running process by: - Hashing the process executable (SHA-256 via /proc/<pid>/exe) - Querying the VirusTotal v3 API with the computed hash - Displaying a colour-coded verdict in a dedicated modal ## Backend (Rust) - New `virustotal` module with `hash_executable()` and `check_virustotal()` functions - Two new Tauri commands: `hash_process` and `check_virustotal_hash` - Graceful error handling: permission denied, rate limits (429), invalid API key (401), file not in database (404) - Reads executable in 64 KiB chunks to avoid loading large binaries fully into memory ## Frontend (Svelte) - New `VirusTotalModal` component with three phases: idle → loading (hashing / querying) → result - Colour-coded verdict badge using existing CSS palette: green (clean), red (malicious), yellow (suspicious), grey (unknown) - SHA-256 hash display + per-engine stats grid - API key persisted to localStorage; never sent to the backend at rest - "View on VirusTotal" opens the system browser via the shell plugin - New teal shield button added to per-row action buttons ## Tests - 9 new unit tests covering: SHA-256 format, determinism, invalid PIDs, empty/whitespace API key rejection, VTReport JSON serialisation, and all four verdict values - All 13 tests (including pre-existing ones) pass Closes #<issue-number>
e0cd601 to
5118c1a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds on-demand security scanning for any running process by:
Backend (Rust)
virustotalmodule withhash_executable()andcheck_virustotal()functionshash_processandcheck_virustotal_hashFrontend (Svelte)
VirusTotalModalcomponent with three phases: idle → loading (hashing / querying) → resultTests