Sql Vulnerability Assessment Scan Results - List
Obtiene una lista de resultados de examen para un único registro de examen.
GET https://management.azure.com/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}/scanResults?workspaceId={workspaceId}&api-version=2023-02-01-preview
Parámetros de identificador URI
Nombre | En | Requerido | Tipo | Description |
---|---|---|---|---|
resource
|
path | True |
string |
Identificador del recurso. |
scan
|
path | True |
string |
Identificador de examen. Escriba "latest" para obtener los resultados del examen más reciente. |
api-version
|
query | True |
string |
La versión de api. |
workspace
|
query | True |
string |
Identificador del área de trabajo. |
Respuestas
Nombre | Tipo | Description |
---|---|---|
200 OK |
Devuelve la lista de resultados del examen. |
|
Other Status Codes |
Respuesta de error que describe por qué se produjo un error en la operación. |
Seguridad
azure_auth
Flujo de OAuth2 de Azure Active Directory
Tipo:
oauth2
Flujo:
implicit
Dirección URL de autorización:
https://login.microsoftonline.com/common/oauth2/authorize
Ámbitos
Nombre | Description |
---|---|
user_impersonation | suplantar la cuenta de usuario |
Ejemplos
List scan results |
List scan results of the latest scan |
List scan results
Solicitud de ejemplo
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/Scheduled-20200623/scanResults?workspaceId=55555555-6666-7777-8888-999999999999&api-version=2023-02-01-preview
Respuesta de muestra
{
"value": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/Scheduled-20200623/scanResults/VA2062",
"name": "VA2062",
"type": "Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults",
"properties": {
"ruleId": "VA2062",
"status": "NonFinding",
"isTrimmed": false,
"queryResults": [],
"remediation": {
"description": "Remove database firewall rules that grant excessive access",
"scripts": [],
"automated": false,
"portalLink": ""
},
"baselineAdjustedResult": null,
"ruleMetadata": {
"ruleId": "VA2062",
"severity": "High",
"category": "SurfaceAreaReduction",
"ruleType": "NegativeList",
"title": "Database-level firewall rules should not grant excessive access",
"description": "The Azure SQL Database-level firewall helps protect your data by preventing all access to your database until you specify which IP addresses have permission. Database-level firewall rules grant access to the specific database based on the originating IP address of each request.\n\nDatabase-level firewall rules for master and user databases can only be created and managed through Transact-SQL (unlike server-level firewall rules which can also be created and managed using the Azure portal or PowerShell). For more details please see: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure\n\nThis check verifies that database-level firewall rules do not grant excessive access.",
"rationale": "Often, administrators add rules that grant excessive access as part of a troubleshooting process - to eliminate the firewall as the source of a problem, they simply create a rule that allows all traffic to pass to the affected database.\n\nGranting excessive access using database firewall rules is a clear security concern, as it violates the principle of least privilege by allowing unnecessary access to your database. In fact, it's the equivalent of placing the database outside of the firewall.",
"queryCheck": {
"query": "SELECT name\n ,start_ip_address\n ,end_ip_address\nFROM sys.database_firewall_rules\nWHERE ( \n (CONVERT(bigint, parsename(end_ip_address, 1)) +\n CONVERT(bigint, parsename(end_ip_address, 2)) * 256 + \n CONVERT(bigint, parsename(end_ip_address, 3)) * 65536 + \n CONVERT(bigint, parsename(end_ip_address, 4)) * 16777216 ) \n - \n (CONVERT(bigint, parsename(start_ip_address, 1)) +\n CONVERT(bigint, parsename(start_ip_address, 2)) * 256 + \n CONVERT(bigint, parsename(start_ip_address, 3)) * 65536 + \n CONVERT(bigint, parsename(start_ip_address, 4)) * 16777216 )\n ) > 255;",
"expectedResult": [],
"columnNames": [
"Firewall Rule Name",
"Start Address",
"End Address"
]
},
"benchmarkReferences": []
}
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/Scheduled-20200623/scanResults/VA2063",
"name": "VA2063",
"type": "Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults",
"properties": {
"ruleId": "VA2063",
"status": "Finding",
"isTrimmed": false,
"queryResults": [
[
"Test",
"0.0.0.0",
"125.125.125.125"
]
],
"remediation": {
"description": "Remove server firewall rules that grant excessive access",
"scripts": [
"EXECUTE sp_delete_firewall_rule N'Test';"
],
"automated": false,
"portalLink": "ReviewServerFirewallRules"
},
"baselineAdjustedResult": {
"baseline": {
"expectedResults": [
[
"Test",
"0.0.0.0",
"125.125.125.125"
]
],
"updatedTime": "2020-02-04T12:49:41.027771+00:00"
},
"status": "NonFinding",
"resultsNotInBaseline": [],
"resultsOnlyInBaseline": []
},
"ruleMetadata": {
"ruleId": "VA2063",
"severity": "High",
"category": "SurfaceAreaReduction",
"ruleType": "NegativeList",
"title": "Server-level firewall rules should not grant excessive access",
"description": "The Azure SQL server-level firewall helps protect your server by preventing all access to your databases until you specify which IP addresses have permission. Server-level firewall rules grant access to all databases that belong to the server based on the originating IP address of each request.\n\nServer-level firewall rules can only be created and managed through Transact-SQL as well as through the Azure portal or PowerShell. For more details please see: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure\n\nThis check verifies that server-level firewall rules do not grant excessive access.",
"rationale": "Often, administrators add rules that grant excessive access as part of a troubleshooting process � to eliminate the firewall as the source of a problem, they simply create a rule that allows all traffic to pass to the affected server.\n\nGranting excessive access using server firewall rules is a clear security concern, as it violates the principle of least privilege by allowing unnecessary access to your databases. In fact, it's the equivalent of placing the server outside of the firewall.",
"queryCheck": {
"query": "SELECT name\n ,start_ip_address\n ,end_ip_address\nFROM sys.firewall_rules\nWHERE ( \n (CONVERT(bigint, parsename(end_ip_address, 1)) +\n CONVERT(bigint, parsename(end_ip_address, 2)) * 256 + \n CONVERT(bigint, parsename(end_ip_address, 3)) * 65536 + \n CONVERT(bigint, parsename(end_ip_address, 4)) * 16777216 ) \n - \n (CONVERT(bigint, parsename(start_ip_address, 1)) +\n CONVERT(bigint, parsename(start_ip_address, 2)) * 256 + \n CONVERT(bigint, parsename(start_ip_address, 3)) * 65536 + \n CONVERT(bigint, parsename(start_ip_address, 4)) * 16777216 )\n ) > 255;",
"expectedResult": [],
"columnNames": [
"Firewall Rule Name",
"Start Address",
"End Address"
]
},
"benchmarkReferences": []
}
}
}
]
}
List scan results of the latest scan
Solicitud de ejemplo
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest/scanResults?workspaceId=55555555-6666-7777-8888-999999999999&api-version=2023-02-01-preview
Respuesta de muestra
{
"value": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/Scheduled-20200623/scanResults/VA2062",
"name": "VA2062",
"type": "Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults",
"properties": {
"ruleId": "VA2062",
"status": "NonFinding",
"isTrimmed": false,
"queryResults": [],
"remediation": {
"description": "Remove database firewall rules that grant excessive access",
"scripts": [],
"automated": false,
"portalLink": ""
},
"baselineAdjustedResult": null,
"ruleMetadata": {
"ruleId": "VA2062",
"severity": "High",
"category": "SurfaceAreaReduction",
"ruleType": "NegativeList",
"title": "Database-level firewall rules should not grant excessive access",
"description": "The Azure SQL Database-level firewall helps protect your data by preventing all access to your database until you specify which IP addresses have permission. Database-level firewall rules grant access to the specific database based on the originating IP address of each request.\n\nDatabase-level firewall rules for master and user databases can only be created and managed through Transact-SQL (unlike server-level firewall rules which can also be created and managed using the Azure portal or PowerShell). For more details please see: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure\n\nThis check verifies that database-level firewall rules do not grant excessive access.",
"rationale": "Often, administrators add rules that grant excessive access as part of a troubleshooting process - to eliminate the firewall as the source of a problem, they simply create a rule that allows all traffic to pass to the affected database.\n\nGranting excessive access using database firewall rules is a clear security concern, as it violates the principle of least privilege by allowing unnecessary access to your database. In fact, it's the equivalent of placing the database outside of the firewall.",
"queryCheck": {
"query": "SELECT name\n ,start_ip_address\n ,end_ip_address\nFROM sys.database_firewall_rules\nWHERE ( \n (CONVERT(bigint, parsename(end_ip_address, 1)) +\n CONVERT(bigint, parsename(end_ip_address, 2)) * 256 + \n CONVERT(bigint, parsename(end_ip_address, 3)) * 65536 + \n CONVERT(bigint, parsename(end_ip_address, 4)) * 16777216 ) \n - \n (CONVERT(bigint, parsename(start_ip_address, 1)) +\n CONVERT(bigint, parsename(start_ip_address, 2)) * 256 + \n CONVERT(bigint, parsename(start_ip_address, 3)) * 65536 + \n CONVERT(bigint, parsename(start_ip_address, 4)) * 16777216 )\n ) > 255;",
"expectedResult": [],
"columnNames": [
"Firewall Rule Name",
"Start Address",
"End Address"
]
},
"benchmarkReferences": []
}
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/Scheduled-20200623/scanResults/VA2063",
"name": "VA2063",
"type": "Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults",
"properties": {
"ruleId": "VA2063",
"status": "Finding",
"isTrimmed": false,
"queryResults": [
[
"Test",
"0.0.0.0",
"125.125.125.125"
]
],
"remediation": {
"description": "Remove server firewall rules that grant excessive access",
"scripts": [
"EXECUTE sp_delete_firewall_rule N'Test';"
],
"automated": false,
"portalLink": "ReviewServerFirewallRules"
},
"baselineAdjustedResult": {
"baseline": {
"expectedResults": [
[
"Test",
"0.0.0.0",
"125.125.125.125"
]
],
"updatedTime": "2020-02-04T12:49:41.027771+00:00"
},
"status": "NonFinding",
"resultsNotInBaseline": [],
"resultsOnlyInBaseline": []
},
"ruleMetadata": {
"ruleId": "VA2063",
"severity": "High",
"category": "SurfaceAreaReduction",
"ruleType": "NegativeList",
"title": "Server-level firewall rules should not grant excessive access",
"description": "The Azure SQL server-level firewall helps protect your server by preventing all access to your databases until you specify which IP addresses have permission. Server-level firewall rules grant access to all databases that belong to the server based on the originating IP address of each request.\n\nServer-level firewall rules can only be created and managed through Transact-SQL as well as through the Azure portal or PowerShell. For more details please see: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure\n\nThis check verifies that server-level firewall rules do not grant excessive access.",
"rationale": "Often, administrators add rules that grant excessive access as part of a troubleshooting process � to eliminate the firewall as the source of a problem, they simply create a rule that allows all traffic to pass to the affected server.\n\nGranting excessive access using server firewall rules is a clear security concern, as it violates the principle of least privilege by allowing unnecessary access to your databases. In fact, it's the equivalent of placing the server outside of the firewall.",
"queryCheck": {
"query": "SELECT name\n ,start_ip_address\n ,end_ip_address\nFROM sys.firewall_rules\nWHERE ( \n (CONVERT(bigint, parsename(end_ip_address, 1)) +\n CONVERT(bigint, parsename(end_ip_address, 2)) * 256 + \n CONVERT(bigint, parsename(end_ip_address, 3)) * 65536 + \n CONVERT(bigint, parsename(end_ip_address, 4)) * 16777216 ) \n - \n (CONVERT(bigint, parsename(start_ip_address, 1)) +\n CONVERT(bigint, parsename(start_ip_address, 2)) * 256 + \n CONVERT(bigint, parsename(start_ip_address, 3)) * 65536 + \n CONVERT(bigint, parsename(start_ip_address, 4)) * 16777216 )\n ) > 255;",
"expectedResult": [],
"columnNames": [
"Firewall Rule Name",
"Start Address",
"End Address"
]
},
"benchmarkReferences": []
}
}
}
]
}
Definiciones
Nombre | Description |
---|---|
Baseline |
Detalles de línea base. |
Baseline |
El resultado de la regla se ajusta con la línea base. |
Benchmark |
Referencias comparativas. |
Cloud |
Respuesta de error común para todas las API de Azure Resource Manager para devolver los detalles de error de las operaciones con errores. (Esto también sigue el formato de respuesta de error de OData). |
Cloud |
Detalle del error. |
Error |
Información adicional sobre el error de administración de recursos. |
Query |
Detalles de la consulta de reglas. |
Remediation |
Detalles de corrección. |
Rule |
Gravedad de la regla. |
Rule |
Estado del resultado de la regla. |
Rule |
Tipo de regla. |
Scan |
Resultado de un examen de evaluación de vulnerabilidades para una sola regla. |
Scan |
Propiedades de resultados del examen de evaluación de vulnerabilidades para una sola regla. |
Scan |
Lista de resultados del examen de evaluación de vulnerabilidades. |
Va |
Detalles de metadatos de la regla de evaluación de vulnerabilidades. |
Baseline
Detalles de línea base.
Nombre | Tipo | Description |
---|---|---|
expectedResults |
string[] |
Resultados esperados. |
updatedTime |
string |
Hora de actualización de línea base (UTC). |
BaselineAdjustedResult
El resultado de la regla se ajusta con la línea base.
Nombre | Tipo | Description |
---|---|---|
baseline |
Detalles de línea base. |
|
resultsNotInBaseline |
string[] |
Los resultados no están en la línea base. |
resultsOnlyInBaseline |
string[] |
Los resultados se encuentran en la línea base. |
status |
Estado del resultado de la regla. |
BenchmarkReference
Referencias comparativas.
Nombre | Tipo | Description |
---|---|---|
benchmark |
string |
Nombre del banco de pruebas. |
reference |
string |
Referencia de la prueba comparativa. |
CloudError
Respuesta de error común para todas las API de Azure Resource Manager para devolver los detalles de error de las operaciones con errores. (Esto también sigue el formato de respuesta de error de OData).
Nombre | Tipo | Description |
---|---|---|
error.additionalInfo |
Información adicional del error. |
|
error.code |
string |
Código de error. |
error.details |
Detalles del error. |
|
error.message |
string |
Mensaje de error. |
error.target |
string |
Destino del error. |
CloudErrorBody
Detalle del error.
Nombre | Tipo | Description |
---|---|---|
additionalInfo |
Información adicional del error. |
|
code |
string |
Código de error. |
details |
Detalles del error. |
|
message |
string |
Mensaje de error. |
target |
string |
Destino del error. |
ErrorAdditionalInfo
Información adicional sobre el error de administración de recursos.
Nombre | Tipo | Description |
---|---|---|
info |
object |
Información adicional. |
type |
string |
Tipo de información adicional. |
QueryCheck
Detalles de la consulta de reglas.
Nombre | Tipo | Description |
---|---|---|
columnNames |
string[] |
Nombres de columna del resultado esperado. |
expectedResult |
string[] |
Resultado esperado. |
query |
string |
Consulta de regla. |
Remediation
Detalles de corrección.
Nombre | Tipo | Description |
---|---|---|
automated |
boolean |
Se automatiza la corrección. |
description |
string |
Descripción de la corrección. |
portalLink |
string |
Vínculo opcional para corregir en Azure Portal. |
scripts |
string[] |
Script de corrección. |
RuleSeverity
Gravedad de la regla.
Nombre | Tipo | Description |
---|---|---|
High |
string |
Alto |
Informational |
string |
Informativo |
Low |
string |
Bajo |
Medium |
string |
Medio |
Obsolete |
string |
Obsoleto |
RuleStatus
Estado del resultado de la regla.
Nombre | Tipo | Description |
---|---|---|
Finding |
string |
Hallazgo |
InternalError |
string |
InternalError |
NonFinding |
string |
NonFinding |
RuleType
Tipo de regla.
Nombre | Tipo | Description |
---|---|---|
BaselineExpected |
string |
BaselineExpected |
Binary |
string |
Binario |
NegativeList |
string |
NegativeList |
PositiveList |
string |
PositiveList |
ScanResult
Resultado de un examen de evaluación de vulnerabilidades para una sola regla.
Nombre | Tipo | Description |
---|---|---|
id |
string |
Identificador de recurso |
name |
string |
Nombre del recurso |
properties |
Propiedades de resultados del examen de evaluación de vulnerabilidades para una sola regla. |
|
type |
string |
Tipo de recurso |
ScanResultProperties
Propiedades de resultados del examen de evaluación de vulnerabilidades para una sola regla.
Nombre | Tipo | Description |
---|---|---|
baselineAdjustedResult |
El resultado de la regla se ajusta con la línea base. |
|
isTrimmed |
boolean |
Indica si se recortan los resultados especificados aquí. |
queryResults |
string[] |
Resultados de la consulta que se ejecutó. |
remediation |
Detalles de corrección. |
|
ruleId |
string |
Identificador de regla. |
ruleMetadata |
Detalles de metadatos de la regla de evaluación de vulnerabilidades. |
|
status |
Estado del resultado de la regla. |
ScanResults
Lista de resultados del examen de evaluación de vulnerabilidades.
Nombre | Tipo | Description |
---|---|---|
value |
Lista de resultados del examen de evaluación de vulnerabilidades. |
VaRule
Detalles de metadatos de la regla de evaluación de vulnerabilidades.
Nombre | Tipo | Description |
---|---|---|
benchmarkReferences |
Referencias comparativas. |
|
category |
string |
Categoría de regla. |
description |
string |
Descripción de la regla. |
queryCheck |
Detalles de la consulta de reglas. |
|
rationale |
string |
La justificación de la regla. |
ruleId |
string |
Identificador de regla. |
ruleType |
Tipo de regla. |
|
severity |
Gravedad de la regla. |
|
title |
string |
Título de la regla. |