Repository navigation
feat: [triage_query] retrieve existing sandbox reports - #1063
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.
ℹ️ 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".
|
|
||
| def _sandbox(event, attribute, payload, link=None): | ||
| obj = _object(event, attribute, "sandbox-report") | ||
| obj.add_attribute("sandbox-type", value=moduleinfo["name"], to_ids=False) |
There was a problem hiding this comment.
Populate a valid sandbox-report classification
Whenever an overview is returned, this assigns the module display name to sandbox-type and adds none of the provider relations. The official sandbox-report template defines sandbox-type as web, saas, or on-premise and requires one of web-sandbox, saas-sandbox, or on-premise-sandbox; consequently every generated report object is nonconformant and can fail template validation or classification by downstream consumers. Emit the appropriate type and matching Triage provider relation.
Useful? React with 👍 / 👎.
|
|
||
| def _pivot(event, attribute, kind, value): | ||
| value = _normalise(kind, value) | ||
| if kind == attribute["type"] and value == attribute["value"]: |
There was a problem hiding this comment.
Normalize the source before suppressing duplicate pivots
When the source hash uses uppercase characters, _normalise lowercases the returned target hash but this comparison still uses the raw source value. The equality check therefore misses the same hash and emits a redundant file object that appears to be new enrichment; compare against the normalized source hash already computed by the handler.
Useful? React with 👍 / 👎.
Analysts can retrieve Triage overview reports from trusted report links or find existing samples by hash. Referenced sandbox reports retain verdict and analysis metadata, with available file hashes and extracted configurations. Public and private API bases are supported; this module performs retrieval without submitting samples.
Includes a usage guide and focused adapter tests.
Validation:
19 passed, 1 warning in 0.80swithpytest -q tests/test_triage_query.py; flake8 passed for the module. The combined enrichment regression check passed 389 tests.Authenticated provider API validation remains pending. Tests use sanitized fixtures; no provider credentials are included.
Review updates: Classify Triage reports as SaaS with the provider relation and suppress duplicate pivots for normalized source hashes.
Updated validation: 21 passed, 1 warning in 0.62s; module lint passed. Combined regression validation passed 409 tests.
Companion provider suggestions: MISP/misp-objects#552. The adapters use the existing sandbox-report relations.