Skip to content

feat: [triage_query] retrieve existing sandbox reports - #1063

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

adulau merged 2 commits into
mainfrom
codex/enrich-triage_query

Conversation

@adulau

@adulau adulau commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

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

@adulau
adulau marked this pull request as ready for review October 29, 2026 22:10
@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:14:04.047418Z — Draft marked ready
🔒 Security Review ✅ Completed 2026-10-29T22:14:36.037707Z 61895a1 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.

ℹ️ 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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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"]:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

@adulau
adulau merged commit 8bbe2dc 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