Repository navigation
feat: [anyrun_lookup] add threat intelligence lookups - #1058
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: 881a338478
ℹ️ 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".
| obj = _object(event, attribute, "file" if kind in ("md5", "sha1", "sha256") else "domain-ip") | ||
| relation = "ip" if kind in ("ip-src", "ip-dst") else kind | ||
| obj.add_attribute(relation, value=value, to_ids=False) |
There was a problem hiding this comment.
Use the URL object for URL pivots
When ANY.RUN returns a relatedURLs entry, kind == "url" is routed through the domain-ip template and given a url relation. The standard domain-ip template has no such relation and requires an IP, domain, or hostname, whereas the URL template is intended for this data; these responses therefore produce nonconforming objects that can fail validation when imported into MISP. Select the url template for URL pivots.
Useful? React with 👍 / 👎.
| obj = _object(event, attribute, "sandbox-report") | ||
| obj.add_attribute("sandbox-type", value=moduleinfo["name"], to_ids=False) | ||
| obj.add_attribute("results", value=json.dumps(payload, sort_keys=True), to_ids=False, disable_correlation=True) |
There was a problem hiding this comment.
Populate the sandbox report's required provider relation
Whenever the response contains sourceTasks, this creates a sandbox-report containing only sandbox-type, results, and permalink. The standard sandbox-report template additionally requires one of web-sandbox, on-premise-sandbox, or saas-sandbox, so every source-task object is template-invalid and can be rejected during import; add the appropriate ANY.RUN provider relation and use a corresponding web or saas sandbox type.
Useful? React with 👍 / 👎.
Analysts can search existing ANY.RUN observations by hash, domain, hostname, IP or URL. Results retain provider summaries and bounded related domains, URLs, IPs, files and task references. Query values are escaped and this module does not submit sandbox tasks.
Includes a usage guide and focused adapter tests.
Validation:
19 passed, 1 warning in 0.75swithpytest -q tests/test_anyrun_lookup.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: Use URL objects for URL pivots, normalize source values before deduplication, and classify ANY.RUN reports as SaaS with the provider relation.
Updated validation: 21 passed, 1 warning in 0.60s; module lint passed. Combined regression validation passed 409 tests.
Companion provider suggestions: MISP/misp-objects#552. The adapters use the existing sandbox-report relations.