Repository navigation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd989023ec
ℹ️ 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".
| for kind in ("md5", "sha1", "sha256"): | ||
| file_object.add_attribute(kind, value=hashlib.new(kind, content).hexdigest(), to_ids=False) |
There was a problem hiding this comment.
Allow non-security hashes on FIPS hosts
On hosts enforcing FIPS restrictions, hashlib.new("md5", content) raises ValueError, so every otherwise successful attachment analysis is discarded and returned as a generic error; malware-sample requests fail earlier for the same reason at the direct hashlib.md5 call. These hashes identify the file rather than protect security, so pass usedforsecurity=False as the existing binGraph module does.
Useful? React with 👍 / 👎.
| if not isinstance(attribute, dict) or not all( | ||
| isinstance(attribute.get(k), str) and attribute[k] for k in ("type", "value", "uuid") | ||
| ): | ||
| raise ModuleError("An attribute containing type, value and uuid is required.") |
There was a problem hiding this comment.
Reject malformed UUIDs before invoking Manalyze
When a direct module request supplies any nonempty string as attribute.uuid, this validation accepts it, runs the potentially expensive analyzer, and emits ObjectReference entries targeting that invalid identifier. The resulting payload is not valid misp_standard data and cannot reliably be merged into MISP; validate the value as a UUID before analysis and return an input error otherwise.
Useful? React with 👍 / 👎.
Closes #203.
Adds a local Manalyze expansion module for
attachmentandmalware-sampleattributes. It runs static PE analysis with an explicit set of offline plugins, returns file hashes, preserves each plugin's independent verdict inmalware-analysisobjects, and attaches the complete JSON report through anannotationobject. Existing MISP object templates cover the results, so no template change is needed.Supports MISP ZIP samples with the
infectedpassword and verifies the extracted MD5. Provides configurable executable, timeout and sample size limits, temporary-file cleanup, and errors for invalid inputs or analyzer failures. Includes installation/configuration documentation and a README entry. Reports over 20 MiB are rejected after analysis; operating-system resource quotas remain the deployment's responsibility.Validation:
tests/test_manalyze.pyandtests/test_bingraph.py.git diff --checkpass for the changed code.v1.0.0Linux release asset (its executable identifies as Manalyze 0.9) and upstreamtest/testfiles/manatest.exe.Samples remain local; the module does not upload to Manalyzer.org or select the VirusTotal plugin.