Skip to content

Add direct Microsoft Sentinel STIX publishing - #950

Open
adulau wants to merge 1 commit into
mainfrom
codex/sentinel-direct-publish
Open

adulau wants to merge 1 commit into
mainfrom
codex/sentinel-direct-publish

Conversation

@adulau

@adulau adulau commented Oct 18, 2026

Copy link
Copy Markdown
Member

Existing export_sentinel workflows require a local MISP2Sentinel/MISP2Defender installation and provide only a boolean result. This adds native Microsoft Sentinel publishing through the current STIX objects upload API, available as mode=direct in export_sentinel and as a dedicated blocking sentinel_publish action. Existing wrapper mode remains the default.

The direct publisher converts supplied IDS-marked event and object attributes into STIX 2.1 indicators, authenticates with server-side Entra client credentials, and sends batches of up to 100 objects to an explicit workspace. It supports credential-free dry runs, confidence and expiry, deterministic source-revision identities, source references and TLP markings. HTTP 200 indexed validation errors are mapped back to individual indicators; uncertain batch outcomes halt later uploads without automatic retries. Requests verify TLS, reject redirects and use fixed commercial-cloud endpoints.

Wrapper failures now surface a top-level workflow error, empty wrapper parameters apply the existing defaults, and script output is no longer copied into service logs. Both actions reject filtered/extracted payloads because the previous wrapper advertised filter support without applying it. The usage guide documents setup, supported inputs, partial publication, API limits and lifecycle semantics: updated source revisions receive new IDs, and older revisions are not automatically revoked. Existing MISP objects suffice; no object-template changes are needed.

Validation:

  • 103 Sentinel tests covering STIX validation, real MISP objects, OAuth/upload wire contracts with mocked HTTP transport, batching, partial errors, input validation, credential handling, workflow discovery/query endpoints and wrapper compatibility, including a harmless local subprocess.
  • 632 related tests passed across Sentinel, SentinelOne, CrowdStrike, QRadar, Elastic ECS and Splunk modules.
  • Black, isort, flake8 and git diff --check passed for the changed code.

No live Azure workspace was used. The target API is 2024-02-01-preview; deployment still requires valid Entra credentials, workspace permissions and preview API availability.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 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-18T19:48:25.148968Z 176b25b PR opened
🔒 Security Review ✅ Completed 2026-10-18T19:50:06.122121Z 176b25b PR opened
ℹ️ 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: 176b25bcfb

ℹ️ 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 +142 to +147
for tag in _records(container, key):
tag = tag.get("Tag", tag)
if isinstance(tag, dict) and isinstance(tag.get("name"), str):
tag["name"].encode("utf-8")
if tag["name"]:
names.add(tag["name"])

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 Exclude local tags from outbound STIX objects

When an EventTag or AttributeTag record has local=true, this code unwraps the nested Tag and adds its name without checking the association flag, after which the name is sent to Azure as a STIX label or TLP marking. MISP defines local tags as instance-only and states that they are never exported or synchronized (MISP User Guide), so publishing a tagged event can disclose private routing or classification labels; filter local tag associations before aggregating names.

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
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