sentinel-xdr-detection-validator
Skill6.2k starsChanged 16 days agoMITView on GitHub
Validate generated XDR Detection YAML structurally and validate source and converted KQL through official Microsoft Sentinel Triage MCP tools first, with direct API fallback.
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 7 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Use the sentinel-xdr-migration CLI for deterministic planning, structural validation, fallback execution, and reporting.
- Distinctive: line 59
Before any live query, confirm the exact persisted Log Analytics workspace and/or Defender tenant, and verify the required read permissions …
- Distinctive: line 78
Ask before launching interactive authentication.
- Very specific: line 85
Stop if structural errors remain.
- Very specific: line 97
Use advertised official Triage MCP tools first for every supported sentinelQuery and advancedHuntingQuery.
- Very specific: line 155
If Triage cannot complete an entire query family for a provider-level reason, create a run-local provider-gap-<family>.json recording the …
- Distinctive: line 188
If and only if Triage has an Advanced Hunting provider-level failure, run the complete Advanced Hunting batch through Graph with the same …
- Very specific: line 214
Do not change contentProvenance.conversion.status to validated unless both queries execute and the entity output has been reviewed.
- Distinctive: line 228
Never use workspace table-management inventory as query-availability proof.
- Distinctive: line 229
Never scan other workspaces after the workflow workspace is selected.
- Distinctive: line 233
Do not say a table is unavailable "in every accessible workspace" unless the user explicitly requested a multi-workspace audit.
- Distinctive: line 248
Run and report those tests against the exact hash-bound queries, retaining the assumption as pending human review.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Validate XDR Detection YAML
Offline validation requires contentProvenance.requiredWorkloads records
(workload, dataTypes) and contentProvenance.requiredDataConnectors records
(connectorId, dataTypes). Missing fields, malformed/unknown workloads and
dependencyReviewRequired: true block validation. Use
sentinel-xdr-dependency-helper to review unresolved prerequisites against an
explicitly approved lab. Conversion never calls or requires Log Analytics.
Reviewed empty connector arrays are valid for native XDR-only content.
Live source validation requests Prefer: include-dataSources=true, retains
input metadata, and compares it with authored workload/connector declarations.
It uses API metadata for 1-10 distinct tables; successful missing metadata or
more than 10 tables falls back to the conservative scanner. Failed or partial
queries never become empty successful dependencies. Source connector
declarations are compared without inventing connectors from shared tables.
Authoring can use the helper's explicitly approved lab reads and offline
metadata import without enabling the Qualification-only SDK execution route.
Use the sentinel-xdr-migration CLI for deterministic planning, structural
validation, fallback execution, and reporting. Runtime query execution prefers:
- Microsoft Sentinel Triage MCP for every query operation supported by the
connected server:
https://sentinel.microsoft.com/mcp/triage. - Native Azure Monitor Query SDK for complete original Sentinel-query execution after a Triage provider failure, or when the CLI path is explicitly selected.
- Log Analytics CLI/API results remain importable as a legacy original Sentinel-query fallback.
- Microsoft Graph Advanced Hunting through the CLI as the Advanced Hunting fallback.
Provider fallback policy
Inspect the connected Triage MCP tools and use a suitable advertised tool first. Do not invent a tool name or assume a capability. Fall back to the corresponding direct provider only when Triage cannot act as a provider, including:
- the MCP server or the required query tool is unavailable;
- authentication, consent, or permission fails;
- the request times out or the MCP service returns a transient/provider error;
- a provider failure prevents completion of the full solution batch.
Original Sentinel queries fall back to the Azure Monitor Query SDK (or imported legacy Log Analytics CLI/API results). Advanced Hunting queries fall back to Graph. Do not fall back when Triage successfully executes the request and returns a real KQL semantic/runtime error. That is a detection failure, not an MCP failure. Do not combine providers within one query-family report; if Triage fails mid-batch, rerun that complete batch through its direct provider.
Before any live query, confirm the exact persisted Log Analytics workspace and/or Defender tenant, and verify the required read permissions for that provider. Never choose another workspace to recover from a failure. Do not launch authentication without first asking. Structural validation, runtime execution, schema binding, and qualification are separate outcomes; a provider fallback or successful query never marks a rule validated or proves parity.
For partial publication, do not weaken this rule-level evidence contract.
package-selection-plan counts only unique, current source IDs represented by
eligible deployable Custom Detections against the complete original Sentinel
rule inventory; the partial threshold is strictly over 50%. Qualification may
use only the fresh applied selected subset and must keep excluded item failures
visible. Never relabel a partial selected-query result as full-inventory
Validation or Qualification.
Workflow
- Run
sentinel-xdr-migration doctor. - On first run, run
sentinel-xdr-migration setup --non-interactive. - Ask before launching interactive authentication. Never block offline conversion.
Run:
sentinel-xdr-migration validate --solution "<solution-path>"- Stop if structural errors remain. Each detection requires its own top-level
version(major.minor.patch) in[3.1.0, 4.0.0), separate fromschemaVersion: 1.0.0. Source Sentinel1.xversions remain valid provenance and must not be promoted to satisfy this check. For older files without the XDR version, report the reconversion guidance rather than changing provenance or accepting Data/solution version fallbacks. Generate the complete runtime plan:
sentinel-xdr-migration validation-plan --solution "<solution-path>"Use advertised official Triage MCP tools first for every supported
sentinelQueryandadvancedHuntingQuery. For Advanced Hunting, invokeRunAdvancedHuntingQuery. If the connected MCP does not advertise a suitable original Sentinel workspace-query tool, either run the toolkit's native SDK provider for the full family or use the legacy Log Analytics CLI/API import path without treating that capability gap as a KQL failure.The native source-query runner requires an existing Qualification run and its locked target. It verifies the active Azure CLI tenant and subscription without signing in, sends each exact persisted source KQL string directly to
LogsQueryClient.query_workspace(timespan=None), and records full returned schemas and rows in the ignored run-local SDK report:sentinel-xdr-migration validate-sentinel-sdk ` --solution "<solution-path>" ` --run-id "<qualification-run-id>"Defaults bound each request to 90 seconds and the complete source family to 30 minutes, with at most two transient retries per query. The complete recursive source inventory must map one-to-one to current generated detections. Authentication, authorization, query, transport and partial result failures are retained distinctly. Zero returned rows indicate query execution only, not parity.
Normalize Advanced Hunting results into a JSON file containing exactly one entry per detection and the returned target-query output
schemaarray when custom details are present. CopyquerySha256from the matchingadvancedHuntingQuerySha256in the runtime plan; it must hash the exact KQL sent to the provider:{ "results": [ { "detection": "Example.yaml", "status": "passed", "statusCode": 200, "rowCount": 0, "querySha256": "<exact advancedHuntingQuery SHA-256 from validation-plan>", "schema": [{"Name": "DeviceId"}, {"Name": "Timestamp"}], "error": null } ] }Allowed statuses are
passed,failed, andblocked. Then record the provider results:sentinel-xdr-migration record-runtime-validation ` --solution "<solution-path>" ` --provider triage-mcp ` --results "<normalized-results.json>"If Triage cannot complete an entire query family for a provider-level reason, create a run-local
provider-gap-<family>.jsonrecording the advertised tool name (orunavailable), exact target reference, one approved reason code (tool-unavailable,authentication,authorization,timeout,transient-provider-error, orbatch-provider-failure), a concise reason,batchComplete: true,scopeVerified: true,permissionsVerified: true, andkqlError: false. Do not use a gap record for a real KQL error. The CLI rejects incomplete, cross-family, wrong-provider, or unscoped fallback evidence.For original Sentinel queries, rerun that complete family against the exact locked workspace. Prefer the native SDK command above; pass the run-local provider-gap evidence if Triage failed:
sentinel-xdr-migration validate-sentinel-sdk ` --solution "<solution-path>" ` --run-id "<qualification-run-id>" ` --provider-gap-evidence "<run-local-provider-gap-sentinel.json>"For externally imported provider results, normalize one result per detection and include
querySha256from that rule'ssentinelQuerySha256plan entry, then record it with the gap evidence:sentinel-xdr-migration record-runtime-validation ` --solution "<solution-path>" ` --provider log-analytics-cli ` --results "<complete-sentinel-results.json>" ` --provider-gap-evidence "<run-local-provider-gap-sentinel.json>"If and only if Triage has an Advanced Hunting provider-level failure, run the complete Advanced Hunting batch through Graph with the same kind of run-local evidence:
sentinel-xdr-migration validate-advanced-hunting ` --solution "<solution-path>" ` --provider-gap-evidence "<run-local-provider-gap-advanced-hunting.json>"- Runtime providers create JSON and self-contained HTML reports under
Solutions\<solution>\Logs\sentinel-xdr-migration\<run-id>. Treatblockedas an environment gap, not a conversion failure. - For every rule:
- execute the original
sentinelQuery; - execute the
advancedHuntingQuery; - record whether each query binds and executes;
- compare returned entity columns when representative rows exist.
Imported
passedSentinel results without a matchingquerySha256are blocked. Graph results bind automatically to the exact Advanced Hunting query executed by the validator. A query rewrite invalidates old evidence; rerun the complete Sentinel and Advanced Hunting families for the current artifact before the workflow can pass runtime validation.
- execute the original
- Zero rows are not proof of behavioral parity. Record them as execution success with data validation still pending. A table probe that executes and returns zero rows proves the table binds on that query surface.
- Do not change
contentProvenance.conversion.statustovalidatedunless both queries execute and the entity output has been reviewed.
Query-surface isolation
Defender Advanced Hunting and Sentinel Log Analytics are separate query surfaces even when the Defender portal shows a selected Sentinel workspace. A table name resolving in Advanced Hunting does not prove that the same name resolves through the Log Analytics workspace API, and vice versa.
- Probe the original
sentinelQueryonly against the exact persisted Log Analytics workspace. - Probe the converted
advancedHuntingQueryonly through Defender Advanced Hunting. - Never use workspace table-management inventory as query-availability proof.
- Never scan other workspaces after the workflow workspace is selected.
- Report the surface explicitly, for example:
IdentityInfo unavailable through log-analytics-workspace; available through defender-advanced-hunting. - Do not say a table is unavailable "in every accessible workspace" unless the user explicitly requested a multi-workspace audit.
For an Authoring profile, an environment-only runtime block does not prevent
V3.1 packaging when structural validation passed. Complete validation as passed
with runtimeStatus=environment-blocked only when no current exact-query
KQL/runtime failure exists, preserve the provider error and query surface, and
do not claim the detection is runtime-qualified. For a
Qualification profile, the same runtime block remains blocking until the
selected lab environment satisfies the required query surfaces.
Return a per-rule result and an overall pass/needs-review summary.
Best-effort entity-mapping assumptions recorded by conversion do not prevent read-only Sentinel/Advanced Hunting execution or output-schema binding tests. Run and report those tests against the exact hash-bound queries, retaining the assumption as pending human review. A successful query or custom-detail schema binding is not approval, entity correlation, or alert parity. Keep technical failures and other unresolved review findings blocking as applicable; do not package or deploy while an entity-mapping review remains pending.
For unresolved table/schema or conversion assumptions, use provider-owned
evidence: standard-table and schema documentation, live query schema from the
selected provider, or the custom connector's DCR/table metadata. Do not
substitute customer research or invent a schema. Present each proposed
assumption with its exact scope, source/query hash, evidence, and accept or
reject choice; no decision is automatic. Accepted assumptions still require
reconversion and the normal structural/runtime checks. If content hashes change,
re-review rather than reusing an earlier decision.
Trending
More talk lately.about the whole repository
Who's talking about Azure/Azure-Sentinel
- @github-trending.bsky.social“📦 Azure / Azure-Sentinel ⭐ 4,774 (+3) 🗒 Python Cloud-native SIEM for intelligent security analytics for …”Bluesky · Feb 12, 2025 · 2 likes
- pulumi/pulumi-cloud-requests“Logs automated export into Azure Storage Account and/or Log Analytics Workspace”GitHub · Aug 9, 2024 · 2 reactions
- octocat/Spoon-Knife“**Describe the bug**”GitHub · Jun 11, 2022 · 2 reactions
- redaliscbe/Azure-Sentinel“Feature 1”GitHub · Jul 8, 2026 · 1 reactions
- Stack Overflow“How do I search through the in Sentinel Workbooks stored queries?”Stack Overflow · Aug 12, 2024 · 1 votes
The biggest 5 of 57 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 57
Talked about on GitHub, Stack Overflow and Bluesky (57 times).
On GitHub · 43
- Aug 9, 2024Logs automated export into Azure Storage Account and/or Log Analytics Workspace — pulumi/pulumi-cloud-requests2 reactions · 1 comment
- Jun 11, 2022**Describe the bug** — octocat/Spoon-Knife2 reactions
- Jul 8, 2026Feature 1 — redaliscbe/Azure-Sentinel1 reaction
- Dec 3, 2020Updat the Entity eum to include all the new types — wortell/AZSentinel1 reaction
- Oct 29, 2026Daily catalog: Iwatobi, SCuBA, AI scanning, and GCP detections — amcamillo/Cybersecurity_Tools0 reactions
38 more on GitHub
- Oct 15, 2026Support reviewed workbook updates with clean public artifacts and local audit evidence — oferInbar/Azure-Sentinel0 reactions
- Sep 28, 2026Mxdr 5375 v1 sentinel ccf multitenant — V1ManagedServices/Azure-Sentinel0 reactions
- Sep 22, 2026Main to master — idoshabi07/Azure-Sentinel0 reactions
- Sep 22, 2026Main — idoshabi07/Azure-Sentinel0 reactions
- Sep 15, 2026Release/3.75.0 — ccx-mss/Azure-Sentinel0 reactions
- Sep 14, 2026Release/3.75.0 — ccx-mss/Azure-Sentinel0 reactions · 1 comment
- Sep 9, 2026Create connector-builder-agent configuration — fuqing04/Azure-Sentinel0 reactions
- Aug 16, 2026Add dual-signal containment gate community plugin — Azure/Security-Copilot0 reactions
- Aug 16, 2026Add dual_signal_containment_gate custom function — phantomcyber/playbooks0 reactions
- Aug 10, 2026Semperis Lightning 4.1.0: merge CCF into existing offer (Function App + CCF) — MitchellGulledge3/Azure-Sentinel0 reactions · 5 comments
- Aug 10, 2026RFPD-77178: log ingestion api (v3.0) — recordedfuture/Azure-Sentinel0 reactions
- Jun 4, 2026Change api — adutt-commvault/Azure-Sentinel0 reactions
- May 21, 2026Update README with contribution guidelines and resources — vikorium/Azure-Sentinel0 reactions
- May 18, 2026Add weekly Azure Sentinel connector report workflow — fuqing04/sentinel-agent-runner0 reactions
- Mar 17, 2026Feat sar 46819 — sonraisecurity/Azure-Sentinel0 reactions
- Feb 27, 2026Update requirements.txt — daneshelias01/Azure-Sentinel0 reactions
- Jan 20, 2026test — BC-47/Azure-Sentinel0 reactions
- Jan 16, 2026Add new entry to ExclusionListForASimTests.csv — v-sabiraj/Azure-Sentinel0 reactions
- Mar 13, 2025Create Cholitas — GravityFallsInc/GravityFalls_Sentinel0 reactions
- Sep 10, 2024Patch-1 — mpmisha/Azure-Sentinel0 reactions
- Jul 11, 2024 - added metadata tags to incident description — synack/Azure-Sentinel0 reactions
- Jan 12, 2024Added local changes for test — SmitR01/Azure-Sentinel0 reactions
- Nov 9, 2023Create dsdsadasda — aviatam/Azure-Sentinel0 reactions · 1 comment
- Aug 24, 2023Praveenthepro patch 1 1 — praveenthepro/Azure-Sentinel0 reactions
- Jul 31, 2023seraphic security connector — LihiAtzmoni1/Azure-Sentinel0 reactions · 1 comment
- Jun 1, 2023Automation test — cohesity/Azure-Sentinel0 reactions
- May 4, 2023Just a demo branch to show right structure of the installation and co… — cohesity/Azure-Sentinel0 reactions
- Dec 6, 2022Cmmc2.0 — cwling75/AzureSentinel0 reactions
- Dec 2, 2022Just initialize this new branch for Cohesity internal collaboration/r… — cohesity/Azure-Sentinel0 reactions · 4 comments
- Aug 5, 2022Create intrigus-lgtm.txt — intrigus-lgtm/Azure-Sentinel0 reactions
- Jun 7, 2022Yaronfr/log4j 1 — qusaiismail/Sentinel0 reactions
- May 30, 2022test new script — sivanguetta/Azure-Sentinel0 reactions · 1 comment
- May 30, 2022test — sivanguetta/Azure-Sentinel0 reactions · 1 comment
- May 26, 2022Run ASIM testers on 'eco-connector-test' workspace — sivanguetta/Azure-Sentinel0 reactions · 1 comment
- May 19, 2022Run ASIM testers on 'eco-connector-test' workspace — sivanguetta/Azure-Sentinel0 reactions · 1 comment
- May 2, 2022[Asim] test kqlFuncYaml2Arm on ASimProcessEvent folder — sivanguetta/Azure-Sentinel0 reactions · 1 comment
- Apr 26, 2022Test GitHub action that generates ARM templates from KQL — sivanguetta/Azure-Sentinel0 reactions
- Feb 14, 2022Google Workspace connector: Don't use pickle — r4vi/Azure-Sentinel0 reactions
On Stack Overflow · 13
- Aug 12, 2024How do I search through the in Sentinel Workbooks stored queries?1 vote
- Apr 3, 2019Azure log analytics: monitoring successful sign-ins following repeated sign-in failures1 vote
- Sep 29, 2024KQL for exfiltration of files/data ...almost there but slightly wrong0 votes · 1 answer
- Aug 8, 2024How do I search through the in Sentinel Workbooks stored queries?0 votes
- May 1, 2024Trying to set Azure Activity Log from Tenant Root(all subscriptions) getting Resource Provider Error0 votes · 1 answer
8 more on Stack Overflow
- Apr 11, 2024Azure Sentinel Incident Trigger in Logic Apps Automation Delay0 votes
- Nov 17, 2023Need Assistance with collecting O365 Audit Logs with function app and directing them to Event Hub0 votes · 1 answer
- Oct 21, 2022Azure Sentinel Sample data CSV0 votes · 1 answer
- Oct 12, 2022AZURE sentinel query to log off Azure remote session for user0 votes
- Feb 4, 2022Integration issues with Microsoft Sentinel and ServiceNow and Get Etag0 votes
- Dec 13, 2021How to detect when a security incident occurs0 votes
- Jul 1, 2021Download multiple file from GitHub public repos without git0 votes
- Feb 13, 2020Creating a Pull Request in Azure sentinel Repository0 votes · 1 answer
On Bluesky · 1
- Feb 12, 2025📦 Azure / Azure-Sentinel ⭐ 4,774 (+3) 🗒 Python Cloud-native SIEM for intelligent security analytics for your entire enterprise. — @github-trending.bsky.social2 likes and reposts
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- Tools/Microsoft-Sentinel-Classic-CLv1-Tables-Impact-Assessment/.github/copilot-instructions.mdCopilot instructions
- .cursor/rules/sentinel-xdr-migration.mdcCursor rule
- sentinel-xdr-migrationSkill
- asim-parser-create-parameter-parserSkill
- asim-parser-create-parserSkill
- asim-parser-creator-orchestratorSkill
- asim-parser-filter-validatorSkill
- asim-parser-github-pr-packagerSkill
- asim-parser-la-deployerSkill
- asim-parser-pr-reviewerSkill
- asim-parser-user-prompterSkill
- asim-parser-validatorSkill
- az-cli-command-runnerSkill
- azure-monitor-logs-ingestionSkill
- log-analytics-workspace-queryerSkill
- run-solution-analyzerSkill
- sentinel-solution-mock-data-generationSkill
- sentinel-solution-optional-testingSkill
- sentinel-xdr-alert-parity-validatorSkill
- sentinel-xdr-dependency-helperSkill
- sentinel-xdr-end-to-end-orchestratorSkill
- sentinel-xdr-migration-orchestratorSkill
- sentinel-xdr-rule-converterSkill
- sentinel-xdr-solution-deployerSkill
- sentinel-xdr-solution-packagerSkill
- solution-release-notes-updaterSkill
- update-solution-analyzerSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

