-
Notifications
You must be signed in to change notification settings - Fork 5.2k
/
Copy pathSqlVulnerabilityAssessmentScanResult.json
521 lines (521 loc) · 21.7 KB
/
SqlVulnerabilityAssessmentScanResult.json
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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
{
"swagger": "2.0",
"info": {
"version": "2023-02-01-preview",
"title": "SqlManagementClient",
"description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities."
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults": {
"get": {
"tags": [
"SqlVulnerabilityAssessmentScanResult"
],
"description": "Gets a vulnerability assessment scan record of a database.",
"operationId": "SqlVulnerabilityAssessmentScanResult_ListByScan",
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"name": "vulnerabilityAssessmentName",
"in": "path",
"description": "The name of the SQL Vulnerability Assessment.",
"required": true,
"type": "string",
"enum": [
"default"
],
"x-ms-enum": {
"name": "SqlVulnerabilityAssessmentName",
"modelAsString": true
}
},
{
"name": "scanId",
"in": "path",
"description": "The scan id of the SQL Vulnerability Assessment scan to retrieve result from.",
"required": true,
"type": "string"
},
{
"name": "systemDatabaseName",
"in": "query",
"description": "The SQL vulnerability assessment system database name.",
"required": true,
"type": "string",
"enum": [
"master"
],
"x-ms-enum": {
"name": "VulnerabilityAssessmentSystemDatabaseName",
"modelAsString": false
}
},
{
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved SQL Vulnerability Assessment scan results.",
"schema": {
"$ref": "#/definitions/SQLVulnerabilityAssessmentScanListResult"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later."
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"List system database SQL Vulnerability Assessment scan results for scan id": {
"$ref": "./examples/SqlVulnerabilityAssessmentListScansResults.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults/{scanResultId}": {
"get": {
"tags": [
"SqlVulnerabilityAssessmentScanResult"
],
"description": "Gets a vulnerability assessment scan record of a database.",
"operationId": "SqlVulnerabilityAssessmentScanResult_Get",
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"name": "vulnerabilityAssessmentName",
"in": "path",
"description": "The name of the SQL Vulnerability Assessment.",
"required": true,
"type": "string",
"enum": [
"default"
],
"x-ms-enum": {
"name": "SqlVulnerabilityAssessmentName",
"modelAsString": true
}
},
{
"name": "scanId",
"in": "path",
"description": "The scan id of the SQL Vulnerability Assessment scan to retrieve result from.",
"required": true,
"type": "string"
},
{
"name": "scanResultId",
"in": "path",
"description": "The scan result id of the specific result to retrieve.",
"required": true,
"type": "string"
},
{
"name": "systemDatabaseName",
"in": "query",
"description": "The SQL vulnerability assessment system database name.",
"required": true,
"type": "string",
"enum": [
"master"
],
"x-ms-enum": {
"name": "VulnerabilityAssessmentSystemDatabaseName",
"modelAsString": false
}
},
{
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved SQL Vulnerability Assessment scan results for id.",
"schema": {
"$ref": "#/definitions/SqlVulnerabilityAssessmentScanResults"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later."
}
},
"x-ms-examples": {
"Get a system database SQL Vulnerability Assessment scan result for scan id and scan result id": {
"$ref": "./examples/SqlVulnerabilityAssessmentScansResults.json"
}
}
}
}
},
"definitions": {
"Baseline": {
"description": "SQL Vulnerability Assessment baseline Details",
"type": "object",
"properties": {
"expectedResults": {
"description": "SQL Vulnerability Assessment baseline expected results",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"readOnly": true
},
"updatedTime": {
"format": "date-time",
"description": "SQL Vulnerability Assessment baseline update time (UTC)",
"type": "string",
"readOnly": true
}
}
},
"BaselineAdjustedResult": {
"description": "SQL Vulnerability Assessment baseline adjusted results",
"type": "object",
"properties": {
"baseline": {
"$ref": "#/definitions/Baseline",
"description": "SQL Vulnerability Assessment baseline details",
"readOnly": true
},
"status": {
"description": "SQL Vulnerability Assessment baseline status",
"enum": [
"NonFinding",
"Finding",
"InternalError"
],
"type": "string",
"readOnly": true,
"x-ms-enum": {
"name": "RuleStatus",
"modelAsString": true
}
},
"resultsNotInBaseline": {
"description": "SQL Vulnerability Assessment results that are not in baseline",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"readOnly": true
},
"resultsOnlyInBaseline": {
"description": "SQL Vulnerability Assessment results that are in baseline.",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"readOnly": true
}
}
},
"BenchmarkReference": {
"description": "SQL Vulnerability Assessment benchmark reference",
"type": "object",
"properties": {
"benchmark": {
"description": "SQL Vulnerability Assessment benchmark name",
"type": "string",
"readOnly": true
},
"reference": {
"description": "SQL Vulnerability Assessment benchmark reference.",
"type": "string",
"readOnly": true
}
}
},
"QueryCheck": {
"description": "SQL Vulnerability Assessment query check object.",
"type": "object",
"properties": {
"query": {
"description": "SQL Vulnerability Assessment rule query.",
"type": "string",
"readOnly": true
},
"expectedResult": {
"description": "SQL Vulnerability Assessment query expected result.",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"readOnly": true
},
"columnNames": {
"description": "SQL Vulnerability Assessment column names of query expected result.",
"type": "array",
"items": {
"type": "string"
},
"readOnly": true
}
}
},
"Remediation": {
"description": "SQL Vulnerability Assessment remediation Details.",
"type": "object",
"properties": {
"description": {
"description": "SQL Vulnerability Assessment remediation description.",
"type": "string",
"readOnly": true
},
"scripts": {
"description": "SQL Vulnerability Assessment remediation script.",
"type": "array",
"items": {
"type": "string"
},
"readOnly": true
},
"automated": {
"description": "SQL Vulnerability Assessment is remediation automated.",
"type": "boolean",
"readOnly": true
},
"portalLink": {
"description": "SQL Vulnerability Assessment optional link to remediate in Azure Portal.",
"type": "string",
"readOnly": true
}
}
},
"SQLVulnerabilityAssessmentScanListResult": {
"description": "A list of vulnerability assessment scan results.",
"type": "object",
"properties": {
"value": {
"description": "Array of results.",
"type": "array",
"items": {
"$ref": "#/definitions/SqlVulnerabilityAssessmentScanResults"
},
"readOnly": true
},
"nextLink": {
"description": "Link to retrieve next page of results.",
"type": "string",
"readOnly": true
}
}
},
"SqlVulnerabilityAssessmentScanResultProperties": {
"description": "SQL Vulnerability Assessment scan result properties for a single rule.",
"type": "object",
"properties": {
"ruleId": {
"description": "SQL Vulnerability Assessment rule Id.",
"type": "string",
"readOnly": true
},
"status": {
"description": "SQL Vulnerability Assessment rule result status.",
"enum": [
"NonFinding",
"Finding",
"InternalError"
],
"type": "string",
"readOnly": true,
"x-ms-enum": {
"name": "RuleStatus",
"modelAsString": true
}
},
"errorMessage": {
"description": "SQL Vulnerability Assessment error message.",
"type": "string",
"readOnly": true
},
"isTrimmed": {
"description": "SQL Vulnerability Assessment is the query results trimmed.",
"type": "boolean",
"readOnly": true
},
"queryResults": {
"description": "SQL Vulnerability Assessment query results that was run.",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"readOnly": true
},
"remediation": {
"$ref": "#/definitions/Remediation",
"description": "SQL Vulnerability Assessment the remediation details.",
"readOnly": true
},
"baselineAdjustedResult": {
"$ref": "#/definitions/BaselineAdjustedResult",
"description": "SQL Vulnerability Assessment rule result adjusted with baseline.",
"readOnly": true
},
"ruleMetadata": {
"$ref": "#/definitions/VaRule",
"description": "SQL Vulnerability Assessment rule metadata.",
"readOnly": true
}
}
},
"SqlVulnerabilityAssessmentScanResults": {
"type": "object",
"allOf": [
{
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"
}
],
"properties": {
"systemData": {
"$ref": "../../../common/v1/types.json#/definitions/systemData",
"description": "SystemData of AdvancedThreatProtectionResource.",
"readOnly": true
},
"properties": {
"$ref": "#/definitions/SqlVulnerabilityAssessmentScanResultProperties",
"description": "Resource properties.",
"x-ms-client-flatten": true
}
}
},
"VaRule": {
"description": "SQL Vulnerability Assessment rule metadata details.",
"type": "object",
"properties": {
"ruleId": {
"description": "SQL Vulnerability Assessment rule Id.",
"type": "string",
"readOnly": true
},
"severity": {
"description": "SQL Vulnerability Assessment rule severity.",
"enum": [
"High",
"Medium",
"Low",
"Informational",
"Obsolete"
],
"type": "string",
"readOnly": true,
"x-ms-enum": {
"name": "RuleSeverity",
"modelAsString": true
}
},
"category": {
"description": "SQL Vulnerability Assessment rule category.",
"type": "string",
"readOnly": true
},
"ruleType": {
"description": "SQL Vulnerability Assessment rule type.",
"enum": [
"Binary",
"BaselineExpected",
"PositiveList",
"NegativeList"
],
"type": "string",
"readOnly": true,
"x-ms-enum": {
"name": "RuleType",
"modelAsString": true
}
},
"title": {
"description": "SQL Vulnerability Assessment rule title.",
"type": "string",
"readOnly": true
},
"description": {
"description": "SQL Vulnerability Assessment rule description.",
"type": "string",
"readOnly": true
},
"rationale": {
"description": "SQL Vulnerability Assessment rule rationale.",
"type": "string",
"readOnly": true
},
"queryCheck": {
"$ref": "#/definitions/QueryCheck",
"description": "SQL Vulnerability Assessment rule query details.",
"readOnly": true
},
"benchmarkReferences": {
"description": "SQL Vulnerability Assessment benchmark references.",
"type": "array",
"items": {
"$ref": "#/definitions/BenchmarkReference"
},
"readOnly": true
}
}
}
},
"parameters": {
"ServerNameParameter": {
"name": "serverName",
"in": "path",
"description": "The name of the server.",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
}
},
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"description": "Azure Active Directory OAuth2 Flow",
"flow": "implicit",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
}
}