-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathscan.schema.json
More file actions
205 lines (205 loc) · 5.26 KB
/
Copy pathscan.schema.json
File metadata and controls
205 lines (205 loc) · 5.26 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
{
"$schema": "https://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/microsoft/adoqr/main/schemas/scan.schema.json",
"title": "Azure DevOps Quick Review scan document",
"description": "Canonical JSON document emitted by adoqr when -OutputFormat includes 'json' or 'all'. Mirrors the shape of the Markdown and HTML reports so downstream tools, pipelines, and Copilot/MCP integrations can consume adoqr results in a structured form.",
"type": "object",
"required": [
"schemaVersion",
"meta",
"organization",
"summary",
"controls"
],
"additionalProperties": true,
"properties": {
"$schema": {
"type": "string",
"format": "uri"
},
"schemaVersion": {
"description": "Major.minor of this document's schema. Bumped when the shape changes in a backwards-incompatible way.",
"type": "string",
"const": "1.0"
},
"meta": {
"type": "object",
"required": [
"tool",
"generator",
"generatedAt"
],
"properties": {
"tool": {
"type": "string",
"const": "adoqr"
},
"generator": {
"type": "string",
"description": "Name (and optional version) of the script or module that produced this document."
},
"generatedAt": {
"type": "string",
"format": "date-time",
"description": "ISO-8601 UTC timestamp of when the assessment finished."
},
"elapsedSeconds": {
"type": "number",
"minimum": 0,
"description": "Wall-clock time the assessment took to run, in seconds."
}
}
},
"organization": {
"type": "object",
"required": [
"name",
"url"
],
"properties": {
"name": {
"type": "string",
"description": "ADO organization short name (e.g. 'MyOrg')."
},
"url": {
"type": "string",
"format": "uri",
"description": "ADO organization URL (e.g. 'https://dev.azure.com/MyOrg')."
}
}
},
"projects": {
"type": "array",
"description": "One entry per project that was assessed. Empty when only the org-level scan ran.",
"items": {
"type": "object",
"required": [
"name",
"summary"
],
"properties": {
"name": {
"type": "string"
},
"summary": {
"$ref": "#/definitions/summary"
}
}
}
},
"summary": {
"$ref": "#/definitions/summary",
"description": "Aggregate pass/fail/not-checked counts across the org and every project."
},
"controls": {
"type": "array",
"description": "Flat list of every control evaluated. Use the 'scope' object to attribute each control to the org or a specific project.",
"items": {
"$ref": "#/definitions/control"
}
}
},
"definitions": {
"summary": {
"type": "object",
"required": [
"pass",
"fail",
"notChecked"
],
"properties": {
"pass": {
"type": "integer",
"minimum": 0
},
"fail": {
"type": "integer",
"minimum": 0
},
"notChecked": {
"type": "integer",
"minimum": 0
}
}
},
"control": {
"type": "object",
"required": [
"id",
"status",
"severity",
"category",
"control",
"finding",
"scope"
],
"properties": {
"id": {
"type": "string",
"description": "Control identifier, e.g. 'AUTH-01', 'BUILD-04'."
},
"status": {
"enum": [
"PASS",
"FAIL",
"NOT CHECKED"
]
},
"severity": {
"enum": [
"High",
"Medium",
"Low"
]
},
"category": {
"description": "ADO-native best-practice category. Stable across versions; new categories will only be added in a minor schema bump.",
"enum": [
"Identity & Access",
"Governance",
"Audit Log",
"Pipelines & Actions",
"Secrets & Credentials",
"Repos & Branch Protection",
"Service Connections",
"Resources",
"PAT Hygiene",
"Other"
]
},
"control": {
"type": "string",
"description": "Short human-readable name of the best practice."
},
"finding": {
"type": "string",
"description": "Free-form description of what was found, including counts, names, and remediation hints."
},
"scope": {
"type": "object",
"required": [
"type",
"organization"
],
"properties": {
"type": {
"enum": [
"organization",
"project"
]
},
"organization": {
"type": "string"
},
"project": {
"type": [
"string",
"null"
]
}
}
}
}
}
}
}