-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbloodhound-opengraph.schema.json
More file actions
260 lines (260 loc) · 12.3 KB
/
bloodhound-opengraph.schema.json
File metadata and controls
260 lines (260 loc) · 12.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
{
"$schema": "https://json-schema.org/draft-07/schema#",
"$id": "https://bloodhound.specterops.io/schema/v8",
"title": "BloodHound OpenGraph Schema",
"description": "A schema for representing BloodHound OpenGraph data.",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"description": "The URL of the schema that this document conforms to."
},
"metadata": {
"title": "Metadata",
"description": "Optional metadata about the ingest payload",
"type": "object",
"properties": {
"source_kind": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
},
"graph": {
"type": "object",
"properties": {
"nodes": {
"type": "array",
"items": {
"title": "Generic Ingest Node",
"description": "A node used in a generic graph ingestion system. Each node must have a unique identifier (`id`) and at least one kind describing its role or type. Nodes may also include a `properties` object containing custom attributes.",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"properties": {
"type": [
"object",
"null"
],
"description": "A key-value map of node attributes. Values must not be objects. If a value is an array, it must contain only primitive types (e.g., strings, numbers, booleans) and must be homogeneous (all items must be of the same type).",
"additionalProperties": {
"type": [
"string",
"number",
"boolean",
"array"
],
"items": {
"not": {
"type": "object"
}
}
}
},
"kinds": {
"type": [
"array"
],
"items": {
"type": "string"
},
"minItems": 0,
"maxItems": 3,
"description": "An array of kind labels for the node. The first element is treated as the node's primary kind and is used to determine which icon to display in the graph UI. This primary kind is only used for visual representation and has no semantic significance for data processing."
}
},
"required": [
"id",
"kinds"
],
"examples": [
{
"id": "user-1234",
"kinds": [
"Person"
]
},
{
"id": "device-5678",
"properties": {
"manufacturer": "Brandon Corp",
"model": "4000x",
"isActive": true,
"rating": 43.50
},
"kinds": [
"Device",
"Asset"
]
},
{
"id": "location-001",
"properties": null,
"kinds": [
"Location"
]
}
]
}
},
"edges": {
"type": "array",
"items": {
"title": "Generic Ingest Edge",
"description": "Defines an edge between two nodes in a generic graph ingestion system. Each edge specifies a start and end node using either a unique identifier (id) or a name-based lookup. A kind is required to indicate the relationship type. Optional properties may include custom attributes. You may optionally constrain the start or end node to a specific kind using the kind field inside each reference.",
"type": "object",
"properties": {
"start": {
"type": "object",
"properties": {
"match_by": {
"type": "string",
"enum": [
"id",
"name"
],
"default": "id",
"description": "Whether to match the start node by its unique object ID or by its name property."
},
"value": {
"type": "string",
"description": "The value used for matching — either an object ID or a name, depending on match_by."
},
"kind": {
"type": "string",
"description": "Optional kind filter; the referenced node must have this kind."
}
},
"required": [
"value"
]
},
"end": {
"type": "object",
"properties": {
"match_by": {
"type": "string",
"enum": [
"id",
"name"
],
"default": "id",
"description": "Whether to match the start node by its unique object ID or by its name property."
},
"value": {
"type": "string",
"description": "The value used for matching — either an object ID or a name, depending on match_by."
},
"kind": {
"type": "string",
"description": "Optional kind filter; the referenced node must have this kind."
}
},
"required": [
"value"
]
},
"kind": {
"type": "string"
},
"properties": {
"type": [
"object",
"null"
],
"description": "A key-value map of edge attributes. Values must not be objects. If a value is an array, it must contain only primitive types (e.g., strings, numbers, booleans) and must be homogeneous (all items must be of the same type).",
"additionalProperties": {
"type": [
"string",
"number",
"boolean",
"array"
],
"items": {
"not": {
"type": "object"
}
}
}
}
},
"required": [
"start",
"end",
"kind"
],
"examples": [
{
"start": {
"match_by": "id",
"value": "user-1234"
},
"end": {
"match_by": "id",
"value": "server-5678"
},
"kind": "has_session",
"properties": {
"timestamp": "2025-04-16T12:00:00Z",
"duration_minutes": 45
}
},
{
"start": {
"match_by": "name",
"value": "alice",
"kind": "User"
},
"end": {
"match_by": "name",
"value": "file-server-1",
"kind": "Server"
},
"kind": "accessed_resource",
"properties": {
"via": "SMB",
"sensitive": true
}
},
{
"start": {
"value": "admin-1"
},
"end": {
"value": "domain-controller-9"
},
"kind": "admin_to",
"properties": {
"reason": "elevated_permissions",
"confirmed": false
}
},
{
"start": {
"match_by": "name",
"value": "Printer-007"
},
"end": {
"match_by": "id",
"value": "network-42"
},
"kind": "connected_to",
"properties": null
}
]
}
}
},
"required": [
"nodes",
"edges"
]
}
},
"additionalProperties": false
}