# sentinelcicd/sentinel-content-2 architecture

> Architecture diagram of the GitHub repository sentinelcicd/sentinel-content-2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sentinelcicd/sentinel-content-2
- Repository: https://github.com/sentinelcicd/sentinel-content-2

## Overview

Based on your file tree and the README (“sentinel-content-2”), you’re working with a repository that serves as a content library for Microsoft Sentinel. In essence, this repository holds the various types of Sentinel-specific artifacts such as detection rules, hunting queries, workbooks, playbooks, and log parsers. The content is organized into dedicated directories—for example, “Detections,” “Hunting,” “Workbooks,” “Parsers,” “Playbooks,” and “Metadata”—with supplementary deployment and conversion scripts (many of which convert YAML definitions to ARM templates) and CI/CD configuration (under .github/workflows).

##### Main Components
- GitHub Repository & CI/CD Pipeline:
– Represent the repository itself as the central “source of truth.”
– Include a node for GitHub Actions (from the .github/workflows directory) that automates ARM deployment (for example, the Azure Sentinel deployment scripts).
- Content Categories (each as separate nodes/components):
– Detections: Contains numerous JSON files representing security correlation rules and alerts.
– Hunting: Contains hunting queries and scripts that help investigate anomalous activities.
– Workbooks: Holds dashboards and visualization definitions to display security data.
– Playbooks: Contains automation workflows (including connectors for third-party integrations like CarbonBlack, PaloAlto, Teams, etc.) to respond to incidents.
– Parsers: Includes log parsing logic for transforming raw logs into structured formats understandable by Sentinel.
– Metadata: Contains configuration and information (like metadata.json) that contextualizes the other modules.
- Conversion and Deployment Scripts:
– Highlight the conversion scripts (e.g., ConvertAnalyticsRuleFromYamlToArm.ps1, ConvertHuntingQueryFromYamlToArm.ps1, ConvertWorkbooksToArm.ps1) that transform human-friendly YAML into ARM templates for deployment.
– Show a deployment path where these ARM templates are then applied into the Sentinel environment.
- External Integrations and Azure Environment:
– Include any external services mentioned in the playbooks (like CarbonBlack, PaloAlto PAN-OS, Teams, etc.) as integration points.

- From the repository, branch out to the major content components (Detections, Hunting, Workbooks, Playbooks, Parsers, and Metadata).
- Link these ARM templates towards the “Azure Sentinel Environment” node, indicating the deployment and integration point.

##### Architectural Patterns & Design Principles
- Separation of concerns: For each type of Sentinel content artifact (detection rules, hunting queries, dashboards, automation playbooks, and parsers) there is a dedicated folder.
- Use of infrastructure-as-code via ARM templates – indicate that conversion scripts take human-editable content (YAML/JSON) and deploy them in a repeatable way using Azure deployment processes.
- CI/CD flow – stress that deployments are automated via GitHub Workflows.

##### Technical Details
- Scripting and conversion tools (e.g., PowerShell scripts for conversion, YAML files for GitHub workflow definitions).
- Integration frameworks (for instance, connectors in playbooks for CarbonBlack, PaloAlto, and Teams).
- Mention that JSON is being extensively used to define artifacts (detection rules, workbooks, queries, etc.).

## Diagram (Mermaid)

```mermaid
graph TD
    Repo["GitHub Repository (Sentinel Content)"]:::repository
    Pipeline["CI/CD Pipeline (.github/workflows)"]:::pipeline
    Azure["Azure Sentinel Environment (ARM Deployment)"]:::azure
    Conversion["Conversion Scripts (YAML->ARM)"]:::conversion
    ARM["ARM Templates"]:::arm
    External["External Services/Integrations"]:::external

    subgraph "Content Modules"
        Detections["Detections - Security Alert Rules"]:::content
        Hunting["Hunting - Investigative Queries"]:::content
        Workbooks["Workbooks - Dashboards & Visualizations"]:::content
        Playbooks["Playbooks - Incident Response Automation"]:::content
        Parsers["Parsers - Log Parsing Logic"]:::content
        Metadata["Metadata - Configuration & Contextual Info"]:::content
    end

    %% Relationships from Repository
    Repo -->|"contains"| Pipeline
    Repo -->|"contains"| Detections
    Repo -->|"contains"| Hunting
    Repo -->|"contains"| Workbooks
    Repo -->|"contains"| Playbooks
    Repo -->|"contains"| Parsers
    Repo -->|"contains"| Metadata

    %% CI/CD to deployment
    Pipeline -->|"deploys via ARM"| Azure

    %% Conversion flow from content modules to ARM templates
    Detections -->|"converts YAML to ARM"| Conversion
    Hunting -->|"converts YAML to ARM"| Conversion
    Workbooks -->|"converts YAML to ARM"| Conversion
    Conversion -->|"produces"| ARM
    ARM -->|"deployed to"| Azure

    %% External integration for Playbooks
    Playbooks -->|"integrates with"| External

    %% Styling classes
    classDef repository fill:#cce5ff,stroke:#333,stroke-width:2px;
    classDef pipeline fill:#d4edda,stroke:#333,stroke-width:2px;
    classDef content fill:#ffcc99,stroke:#333,stroke-width:2px;
    classDef conversion fill:#ffe0b3,stroke:#333,stroke-width:2px;
    classDef arm fill:#e6ccff,stroke:#333,stroke-width:2px;
    classDef azure fill:#f8d7da,stroke:#333,stroke-width:2px;
    classDef external fill:#d1ecf1,stroke:#333,stroke-width:2px;

    %% Click Events
    click Pipeline "https://github.com/sentinelcicd/sentinel-content-2/tree/main/.github/workflows"
    click Detections "https://github.com/sentinelcicd/sentinel-content-2/tree/main/Detections"
    click Hunting "https://github.com/sentinelcicd/sentinel-content-2/tree/main/Hunting"
    click Workbooks "https://github.com/sentinelcicd/sentinel-content-2/tree/main/Workbooks"
    click Playbooks "https://github.com/sentinelcicd/sentinel-content-2/tree/main/Playbooks"
    click Parsers "https://github.com/sentinelcicd/sentinel-content-2/tree/main/Parsers"
    click Metadata "https://github.com/sentinelcicd/sentinel-content-2/blob/main/Metadata/metadata.json"
```
