Repository navigation
Add VirusTotal Sample Downloader expansion module - #980
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Download an existing file from VirusTotal by hash.
Requires a VirusTotal API key with file download entitlement. Uses GET /api/v3/files/{hash}/download. Streams at most max_size_mb (default 50, range 1-100) and verifies the downloaded file against the requested hash. Signed HTTPS redirects are followed without forwarding the API key. Returns raw bytes as a MISP attachment in a file object with MD5, SHA-1 and SHA-256 hashes; no sample is executed or submitted.
The module validates inputs and configuration, preserves the source attribute and its UUID, sets new enrichment attributes to
to_ids=false, and returns actionable HTTP and response errors without including API credentials. Configuration and example requests are documented indocumentation/expansion/virustotal_downloader.md.Validation:
32 passed, 1 warning in 1.27sfrompytest tests/test_virustotal_downloader.py, plus flake8, import/discovery and documentation metadata rendering checks. Provider responses are mocked; authenticated live API requests have not been exercised.