Index of every page on this site: llms.txt
All skills
microsoft avatar

/azure-kusto-graph

@147c081 official
Run it yourself

Build and query Kusto graphs from natural language. Covers transient graphs (make-graph), persistent graph models/snapshots, pattern matching (graph-match), shortest paths, connected components, and graph-to-table export. Generates the edges-first thinking: define edges, define node lookups, union, make-graph. WHEN: make-graph, graph-match, graph-shortest-paths, graph-to-table, graph-mark-components, persistent graph, graph model, graph snapshot, build a graph from data, find paths between nodes, pattern matching in graph, connected components, transient graph, Kusto graph, KQL graph.

Use this Skill: https://skilld.dev/gh/microsoft/github-copilot-for-azure/azure-kusto-graph

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesSCENARIOS.md

≈964 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Practical Usage Scenarios

Scenario 1: "Who can reach the database server?"

Start from all users, find any path to a critical asset through authentication and network hops:

let auth_edges = AuthenticationEvents
    | where result == "Successful Login"
    | project Source = username, Target = hostname, edgeType = "LoggedInto";
let net_edges = NetworkFlows
    | where dst_port in (1433, 3306, 5432)  // DB ports
    | project Source = src_host, Target = dst_host, edgeType = "NetworkAccess";
let all_edges = union auth_edges, net_edges;
let nodes = union
    (all_edges | distinct Source | project nodeId = Source),
    (all_edges | distinct Target | project nodeId = Target);
all_edges
| make-graph Source --> Target with nodes on nodeId
| graph-shortest-paths (user)-[path*1..5]->(db)
    where db.nodeId == "DB-SERVER-PROD"
    project
        User = user.nodeId,
        PathLength = array_length(path),
        Route = path.Target
| order by PathLength asc

Scenario 2: "Are there isolated networks?"

Find disconnected clusters in your network flow data -- useful for segmentation validation:

let edges = NetworkFlows
    | summarize Bytes = sum(bytes) by Source = src_ip, Target = dst_ip;
let nodes = union
    (edges | distinct Source | project nodeId = Source),
    (edges | distinct Target | project nodeId = Target);
edges
| make-graph Source --> Target with nodes on nodeId
| graph-mark-components with_component_id = Segment
| graph-to-table nodes
| summarize Hosts = make_list(nodeId), Size = count() by Segment
| order by Size desc

Scenario 3: "Show me the blast radius of a compromised account"

Given a compromised user, find everything reachable within N hops:

let edges = union
    (AuthenticationEvents | project Source = username, Target = hostname),
    (FileCreationEvents | project Source = username, Target = hostname);
let nodes = union
    (edges | distinct Source | project nodeId = Source),
    (edges | distinct Target | project nodeId = Target);
edges
| make-graph Source --> Target with nodes on nodeId
| graph-match (compromised)-[e*1..3]->(reached)
    where compromised.nodeId == "jsmith"
    project
        Depth = array_length(e),
        ReachedEntity = reached.nodeId
| summarize ReachedEntities = make_set(ReachedEntity) by Depth

Scenario 4: "Build a reusable security graph for the SOC team"

Create a persistent graph model so analysts can query without rebuilding:

// Step 1: Define the model (run once, requires Database Admin)
.create-or-alter graph_model SOC_Graph
{
  "Schema": {
    "Nodes": {
      "User": {"username": "string", "role": "string"},
      "Host": {"hostname": "string"},
      "IP":   {"ip": "string"}
    },
    "Edges": {
      "AuthTo": {"result": "string", "timestamp": "datetime"},
      "FromIP": {"timestamp": "datetime"}
    }
  },
  "Definition": {
    "Steps": [
      {"Kind": "AddNodes", "Query": "Employees | project username, role", "NodeIdColumn": "username", "Labels": ["User"]},
      {"Kind": "AddNodes", "Query": "AuthenticationEvents | distinct hostname | project hostname", "NodeIdColumn": "hostname", "Labels": ["Host"]},
      {"Kind": "AddEdges",
       "Query": "AuthenticationEvents | project username, hostname, result, timestamp",
       "SourceColumn": "username",
       "TargetColumn": "hostname",
       "Labels": ["AuthTo"]}
    ]
  }
}

// Step 2: Snapshot (run daily or on-demand) .make graph_snapshot SOC_Graph Daily_2025_07_30

// Step 3: Any analyst can now query without setup graph("SOC_Graph") | graph-match (user)-[auth]->(host) where auth.result == "Failed Login" project User = user.username, Role = user.role, Host = host.hostname, Time = auth.timestamp | summarize FailedLogins = count() by User, Role, Host | order by FailedLogins desc


## MCP Tools Used

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill includes some security considerations such as the generation of local scripts and the handling of user-provided data. While these patterns warrant review, they are used within the skill's intended functionality for querying Azure Kusto and launching management tools. See detailed analysis for context.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 147c081. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 4 months ago
metadata
{
  "author": "Microsoft",
  "version": "0.0.0-placeholder"
}

README badge

README badge for microsoft/github-copilot-for-azure/azure-kusto-graph