agentleFS
Microsoft AzureKnown publisherAzure/Azure-Sentinel/.github/skills/sentinel-xdr-alert-parity-validator/SKILL.md

sentinel-xdr-alert-parity-validator

Skill6.2k starsChanged 16 days agoMITView on GitHub

Perform strict lab-only parity validation between a Microsoft Sentinel Analytic Rule and its migrated Defender XDR Custom Detection.

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill only in a non-production lab after conversion, structural validation, deployment, and mock-data review have succeeded.

    line 8
  2. Distinctive:

    no alert from the benign control records.

    line 20
  3. Distinctive:

    Never use production telemetry or a production workspace.

    line 31
  4. Distinctive:

    Do not wait with fixed sleeps.

    line 32
  5. Very specific:

    Always run complete-alert-parity or abort-alert-parity.

    line 34
  6. Distinctive:

    Use the targeted command for troubleshooting a subset or rerunning one detection.

    line 90
  7. Very specific:

    Prefer suitable tools advertised by the official Sentinel Triage MCP for both capture queries.

    line 102
  8. Distinctive:

    If capture cannot be completed:

    line 154

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Validate Analytic Rule and Custom Detection alert parity

Use this skill only in a non-production lab after conversion, structural validation, deployment, and mock-data review have succeeded.

Acceptance criteria

Parity is strict. For every selected rule, require:

  • the same number of alerts;
  • the same normalized scenario match keys;
  • the same severity and tactics;
  • the same normalized entities;
  • the same decisive matched-event evidence; and
  • no alert from the benign control records.

Any mismatch fails migration validation. Do not silently accept differences caused by schedule, lookback, grouping, suppression, thresholds, or entity mapping. Align those settings or report an explicit platform limitation.

Safety and lifecycle

  • Both rules must be disabled before the test starts.
  • Require a unique marker that occurs in the reviewed mock payload.
  • Enable only explicitly selected converted rules.
  • Never use production telemetry or a production workspace.
  • Do not wait with fixed sleeps. Start the run, then query when the platforms expose the alerts.
  • Always run complete-alert-parity or abort-alert-parity; both force every test rule back to disabled.

Full qualification batch

For internal solution qualification, deploy every reviewed AR/CD pair in the current approved package selection disabled, then prepare one fixture per selected detection. A partial package's selected list is authoritative; do not add excluded detections or let their failures block parity for selected pairs. Retain the plan hash and selected paths with parity evidence, and describe the result as selected-subset parity only. Full-inventory parity is not proven by a partial run.

{
  "fixtures": [
    {
      "detection": "Detection.yaml",
      "contract": "contracts/stream.json",
      "payload": "mocks/detection.json",
      "scenarioMarker": "unique-detection-marker",
      "expectedMatchKeys": ["expected-malicious-key"]
    }
  ]
}

Paths are resolved relative to the batch-plan file. The plan must cover every selected converted detection exactly once.

Start the batch:

sentinel-xdr-migration start-alert-parity-batch `
  --solution "<solution-path>" `
  --workspace-resource-id "<workspace-arm-id>" `
  --plan "<qualification-plan.json>"

The command verifies all ARs and CDs are disabled, enables all reviewed pairs, ingests every fixture, and emits a separate capture plan and expected-key set for each detection. If enablement or any ingestion fails, it disables all rules before returning the failure.

Targeted start

sentinel-xdr-migration start-alert-parity `
  --solution "<solution-path>" `
  --workspace-resource-id "<workspace-arm-id>" `
  --contract "<ingestion-contract>" `
  --payload "<reviewed-mock-json>" `
  --scenario-marker "<unique-marker>" `
  --expected-match-key "<expected-malicious-key>" `
  --detection "<Detection.yaml>"

Use the targeted command for troubleshooting a subset or rerunning one detection. It:

  1. verifies the AR and CD both exist and are disabled;
  2. enables both through Azure Resource Manager and Microsoft Graph;
  3. ingests the payload through azure-monitor-logs-ingestion;
  4. writes Solutions/<solution>/Logs/sentinel-xdr-migration/<run-id>/alert-parity-state.json; and
  5. emits Sentinel and Advanced Hunting capture queries.

Capture alerts

Prefer suitable tools advertised by the official Sentinel Triage MCP for both capture queries. Fall back to Log Analytics CLI/API for SecurityAlert and Microsoft Graph for AlertInfo/AlertEvidence only for provider-level failures. A genuine KQL error is not a reason to change providers.

Normalize each platform result into:

{
  "results": [
    {
      "detection": "Detection.yaml",
      "analyticRule": {
        "alerts": [
          {
            "matchKey": "stable-event-or-correlation-key",
            "severity": "high",
            "tactics": ["Exfiltration"],
            "entities": {},
            "evidence": {}
          }
        ]
      },
      "customDetection": {
        "alerts": []
      }
    }
  ]
}

Platform alert IDs are not comparable. matchKey must be derived from stable mock-event or aggregation keys. Normalize entity names and evidence fields to the same semantic shape before comparison; never remove a differing value to manufacture parity.

The declared expected match-key set is authoritative. If both platforms alert on the same benign control key, parity still fails. Repeat --expected-match-key when multiple malicious alerts are expected; when it is omitted, the scenario marker is the sole expected key.

Complete or abort

sentinel-xdr-migration complete-alert-parity `
  --solution "<solution-path>" `
  --results "<normalized-results.json>"

This writes alert-parity-report.json and disables all selected rules even when parsing or comparison fails.

If capture cannot be completed:

sentinel-xdr-migration abort-alert-parity --solution "<solution-path>"

Download now (ZIP)

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 2 mentionsFeb 2026: 1 mentionMar 2026: 1 mentionApr 2026: 0 mentionsMay 2026: 2 mentionsJun 2026: 1 mentionJul 2026: 1 mentionAug 2026: 4 mentionsSep 2026: 6 mentionsOct 2026: 2 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the Azure/Azure-Sentinel repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about Azure/Azure-Sentinel

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

38 more on GitHub

On Stack Overflow · 13

8 more on Stack Overflow

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.