Skip to content

feat: [anyrun_lookup] add threat intelligence lookups - #1058

Merged
adulau merged 2 commits into
mainfrom
codex/enrich-anyrun_lookup
Oct 30, 2026
Merged

adulau merged 2 commits into
mainfrom
codex/enrich-anyrun_lookup

Conversation

@adulau

@adulau adulau commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

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.75s with pytest -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.

@adulau
adulau marked this pull request as ready for review October 29, 2026 22:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T22:12:59.257515Z 881a338 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-29T22:11:56.393736Z 881a338 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +84 to +86
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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +90 to +92
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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@adulau
adulau merged commit 8055eca into main Oct 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant