From f08ec1f67de29ed042d7e23064e9f31416a64478 Mon Sep 17 00:00:00 2001 From: GalGoldi72 Date: Tue, 2 Jun 2026 17:07:52 +0300 Subject: [PATCH 1/7] [Security] az security va sql: Migrate to aaz with API 2026-04-01-preview [BREAKING CHANGE] Replace hand-authored SQL Vulnerability Assessment commands with atomic aaz-generated commands. - Single --resource-id replaces 7-arg combo (--vm-resource-id, --workspace-id, --server-name, --database-name, --vm-name, --agent-id, --vm-uuid). - New 'security va sql {create, delete, show, update}' settings commands. - New 'security va sql baseline {add, create, update}' (replaces 'set'). - New 'security va sql scans initiate-scan' + 'scan-operation-result show'. - All commands tagged Preview. Supported scopes: Azure SQL Server, Azure SQL MI, Synapse, Azure VM (SQL on VM), Arc-enabled SQL Server. Companion aaz PR: Azure/aaz#1021 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/azure-cli/HISTORY.rst | 8 + .../security/_client_factory.py | 12 - .../cli/command_modules/security/_help.py | 145 ------ .../cli/command_modules/security/_params.py | 64 +-- .../aaz/latest/security/va/__cmd_group.py | 24 + .../aaz/latest/security/va/__init__.py | 11 + .../aaz/latest/security/va/sql/__cmd_group.py | 24 + .../aaz/latest/security/va/sql/__init__.py | 15 + .../aaz/latest/security/va/sql/_create.py | 225 +++++++++ .../aaz/latest/security/va/sql/_delete.py | 131 ++++++ .../aaz/latest/security/va/sql/_show.py | 200 ++++++++ .../aaz/latest/security/va/sql/_update.py | 379 +++++++++++++++ .../security/va/sql/baseline/__cmd_group.py | 24 + .../security/va/sql/baseline/__init__.py | 17 + .../latest/security/va/sql/baseline/_add.py | 271 +++++++++++ .../security/va/sql/baseline/_create.py | 261 +++++++++++ .../security/va/sql/baseline/_delete.py | 147 ++++++ .../latest/security/va/sql/baseline/_list.py | 220 +++++++++ .../latest/security/va/sql/baseline/_show.py | 218 +++++++++ .../security/va/sql/baseline/_update.py | 432 ++++++++++++++++++ .../security/va/sql/results/__cmd_group.py | 24 + .../security/va/sql/results/__init__.py | 13 + .../latest/security/va/sql/results/_list.py | 333 ++++++++++++++ .../latest/security/va/sql/results/_show.py | 331 ++++++++++++++ .../security/va/sql/scans/__cmd_group.py | 24 + .../latest/security/va/sql/scans/__init__.py | 14 + .../security/va/sql/scans/_initiate_scan.py | 222 +++++++++ .../aaz/latest/security/va/sql/scans/_list.py | 249 ++++++++++ .../aaz/latest/security/va/sql/scans/_show.py | 247 ++++++++++ .../scan_operation_result/__cmd_group.py | 24 + .../scans/scan_operation_result/__init__.py | 12 + .../sql/scans/scan_operation_result/_show.py | 211 +++++++++ .../cli/command_modules/security/actions.py | 80 ---- .../cli/command_modules/security/commands.py | 39 -- .../cli/command_modules/security/custom.py | 88 ---- .../recordings/test_va_sql_scenario.yaml | 156 ------- .../tests/latest/test_va_sql_scenario.py | 216 --------- 37 files changed, 4312 insertions(+), 799 deletions(-) create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/__cmd_group.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/__init__.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/__cmd_group.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/__init__.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/_create.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/_delete.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/_show.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/_update.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/__cmd_group.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/__init__.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_add.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_create.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_delete.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_list.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_show.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_update.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/__cmd_group.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/__init__.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/_list.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/_show.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/__cmd_group.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/__init__.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/_initiate_scan.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/_list.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/_show.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/scan_operation_result/__cmd_group.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/scan_operation_result/__init__.py create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/scan_operation_result/_show.py delete mode 100644 src/azure-cli/azure/cli/command_modules/security/tests/latest/recordings/test_va_sql_scenario.yaml delete mode 100644 src/azure-cli/azure/cli/command_modules/security/tests/latest/test_va_sql_scenario.py diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index 59fae05291c..afa127e5f3d 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -92,6 +92,14 @@ Release History * [BREAKING CHANGE] `az postgres flexible-server backup/db/firewall-rule/long-term-retention/migration/replica create`: Make consistent use of `--name` and `--server-name` across all commands (#33343) * [BREAKING CHANGE] `az postgres flexible-server long-term-retention`: Remove support for command group (#33345) +**Security** + +* `az security va sql`: [BREAKING CHANGE] Replaced hand-authored SQL Vulnerability Assessment commands with atomic aaz-generated commands targeting API version `2026-04-01-preview`. A single `--resource-id` argument now identifies the assessed resource, replacing the previous combination of `--vm-resource-id`, `--workspace-id`, `--server-name`, `--database-name`, `--vm-name`, `--agent-id`, and `--vm-uuid`. Optional `--database-name` is used only for server-level scopes (e.g. `master`). Supported scopes include Azure SQL Server, Azure SQL Managed Instance, Synapse, Azure VM (SQL on VM), and Arc-enabled SQL servers. +* `az security va sql`: Add new SQL Vulnerability Assessment settings commands: `create`, `delete`, `show`, `update` for enabling/disabling SQL VA on a resource. +* `az security va sql baseline`: Add `add` (set baseline for all rules), `create` (single-rule baseline), and `update` commands. Remove `set` command (use `add` instead). +* `az security va sql scans`: Add `initiate-scan` command to trigger a vulnerability assessment scan, and `scan-operation-result show` to poll the operation result. +* `az security va sql`: All commands are tagged Preview, matching the underlying API version. + **Storage** * `az storage account create/update`: Support new value `Smart` for `--access-tier` (#33423) diff --git a/src/azure-cli/azure/cli/command_modules/security/_client_factory.py b/src/azure-cli/azure/cli/command_modules/security/_client_factory.py index 6af1131d268..fab9ec24285 100644 --- a/src/azure-cli/azure/cli/command_modules/security/_client_factory.py +++ b/src/azure-cli/azure/cli/command_modules/security/_client_factory.py @@ -63,18 +63,6 @@ def cf_security_advanced_threat_protection(cli_ctx, _): return _cf_security(cli_ctx).advanced_threat_protection -def cf_sql_vulnerability_assessment_scans(cli_ctx, _): - return _cf_security(cli_ctx).sql_vulnerability_assessment_scans - - -def cf_sql_vulnerability_assessment_results(cli_ctx, _): - return _cf_security(cli_ctx).sql_vulnerability_assessment_scan_results - - -def cf_sql_vulnerability_assessment_baseline(cli_ctx, _): - return _cf_security(cli_ctx).sql_vulnerability_assessment_baseline_rules - - def cf_security_assessment(cli_ctx, _): return _cf_security(cli_ctx).assessments diff --git a/src/azure-cli/azure/cli/command_modules/security/_help.py b/src/azure-cli/azure/cli/command_modules/security/_help.py index d33fd240f96..989a7b6baf9 100644 --- a/src/azure-cli/azure/cli/command_modules/security/_help.py +++ b/src/azure-cli/azure/cli/command_modules/security/_help.py @@ -187,151 +187,6 @@ az security atp cosmosdb update --resource-group MyResourceGroup --cosmosdb-account MyCosmosDbAccount --is-enabled false """ -helps['security va'] = """ -type: group -short-summary: View Vulnerability Assessment. -""" - -helps['security va sql'] = """ -type: group -short-summary: View Sql Vulnerability Assessment scan results and manage baseline. -""" - -helps['security va sql scans'] = """ -type: group -short-summary: View Sql Vulnerability Assessment scan summaries. -""" - -helps['security va sql scans show'] = """ -type: command -short-summary: View Sql Vulnerability Assessment scan summaries. -examples: - - name: View Sql Vulnerability Assessment scan summary on an Azure virtual machine. - text: > - az security va sql scans show --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.Compute/VirtualMachines/MyVmName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --scan-id MyScanId - - name: View Sql Vulnerability Assessment scan summary on an On-Premise machine. - text: > - az security va sql scans show --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.OperationalInsights/Workspaces/MyWorkspaceName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --vm-name MyVmName --agent-id MyAgentId --vm-uuid MyVmUUID --scan-id MyScanId -""" - -helps['security va sql scans list'] = """ -type: command -short-summary: List all Sql Vulnerability Assessment scan summaries. -examples: - - name: List all Sql Vulnerability Assessment scan summaries on an Azure virtual machine. - text: > - az security va sql scans list --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.Compute/VirtualMachines/MyVmName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName - - name: List all Sql Vulnerability Assessment scan summaries on an On-Premise machine. - text: > - az security va sql scans list --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.OperationalInsights/Workspaces/MyWorkspaceName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --vm-name MyVmName --agent-id MyAgentId --vm-uuid MyVmUUID -""" - -helps['security va sql results'] = """ -type: group -short-summary: View Sql Vulnerability Assessment scan results. -""" - -helps['security va sql results show'] = """ -type: command -short-summary: View Sql Vulnerability Assessment scan results. -examples: - - name: View Sql Vulnerability Assessment scan results on an Azure virtual machine. - text: > - az security va sql results show --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.Compute/VirtualMachines/MyVmName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --scan-id MyScanId --rule-id VA9999 - - name: View Sql Vulnerability Assessment scan results on an On-Premise machine. - text: > - az security va sql results show --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.OperationalInsights/Workspaces/MyWorkspaceName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --vm-name MyVmName --agent-id MyAgentId --vm-uuid MyVmUUID --scan-id MyScanId --rule-id VA9999 -""" - -helps['security va sql results list'] = """ -type: command -short-summary: View all Sql Vulnerability Assessment scan results. -examples: - - name: View all Sql Vulnerability Assessment scan results on an Azure virtual machine. - text: > - az security va sql results list --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.Compute/VirtualMachines/MyVmName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --scan-id MyScanId - - name: View all Sql Vulnerability Assessment scan results on an On-Premise machine. - text: > - az security va sql results list --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.OperationalInsights/Workspaces/MyWorkspaceName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --vm-name MyVmName --agent-id MyAgentId --vm-uuid MyVmUUID --scan-id MyScanId -""" - -helps['security va sql baseline'] = """ -type: group -short-summary: View and manage Sql Vulnerability Assessment baseline. -""" - -helps['security va sql baseline show'] = """ -type: command -short-summary: View Sql Vulnerability Assessment rule baseline. -examples: - - name: View Sql Vulnerability Assessment rule baseline on an Azure virtual machine. - text: > - az security va sql baseline show --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.Compute/VirtualMachines/MyVmName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --rule-id VA9999 - - name: View Sql Vulnerability Assessment rule baseline on an On-Premise machine. - text: > - az security va sql baseline show --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.OperationalInsights/Workspaces/MyWorkspaceName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --vm-name MyVmName --agent-id MyAgentId --vm-uuid MyVmUUID --rule-id VA9999 -""" - -helps['security va sql baseline list'] = """ -type: command -short-summary: View Sql Vulnerability Assessment baseline for all rules. -examples: - - name: View Sql Vulnerability Assessment baseline for all rules on an Azure virtual machine. - text: > - az security va sql baseline list --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.Compute/VirtualMachines/MyVmName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName - - name: View Sql Vulnerability Assessment baseline for all rules on an On-Premise machine. - text: > - az security va sql baseline list --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.OperationalInsights/Workspaces/MyWorkspaceName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --vm-name MyVmName --agent-id MyAgentId --vm-uuid MyVmUUID -""" - -helps['security va sql baseline delete'] = """ -type: command -short-summary: Delete Sql Vulnerability Assessment rule baseline. -examples: - - name: Delete Sql Vulnerability Assessment rule baseline on an Azure virtual machine. - text: > - az security va sql baseline delete --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.Compute/VirtualMachines/MyVmName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --rule-id VA9999 - - name: Delete Sql Vulnerability Assessment rule baseline on an On-Premise machine. - text: > - az security va sql baseline delete --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.OperationalInsights/Workspaces/MyWorkspaceName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --vm-name MyVmName --agent-id MyAgentId --vm-uuid MyVmUUID --rule-id VA9999 -""" - -helps['security va sql baseline update'] = """ -type: command -short-summary: Update Sql Vulnerability Assessment rule baseline. Replaces the current rule baseline. -examples: - - name: Update Sql Vulnerability Assessment rule baseline on an Azure virtual machine. Replaces the current rule baseline with latest scan results. - text: > - az security va sql baseline update --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.Compute/VirtualMachines/MyVmName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --rule-id VA9999 --latest - - name: Update Sql Vulnerability Assessment rule baseline on an Azure virtual machine. Replaces the current rule baseline with provided results. - text: > - az security va sql baseline update --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.Compute/VirtualMachines/MyVmName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --rule-id VA9999 --baseline Line1_Col1 Line1_Col2 --baseline Line2_Col1 Line2_Col2 - - name: Update Sql Vulnerability Assessment rule baseline on an On-Premise machine. Replaces the current rule baseline with latest scan results. - text: > - az security va sql baseline update --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.OperationalInsights/Workspaces/MyWorkspaceName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --vm-name MyVmName --agent-id MyAgentId --vm-uuid MyVmUUID --rule-id VA9999 --latest - - name: Update Sql Vulnerability Assessment rule baseline on an On-Premise machine. Replaces the current rule baseline with provided results. - text: > - az security va sql baseline update --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.OperationalInsights/Workspaces/MyWorkspaceName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --vm-name MyVmName --agent-id MyAgentId --vm-uuid MyVmUUID --rule-id VA9999 --baseline Line1_Col1 Line1_Col2 --baseline Line2_Col1 Line2_Col2 -""" - -helps['security va sql baseline set'] = """ -type: command -short-summary: Sets Sql Vulnerability Assessment baseline. Replaces the current baseline. -examples: - - name: Sets Sql Vulnerability Assessment baseline on an Azure virtual machine. Replaces the current baseline with latest scan results. - text: > - az security va sql baseline set --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.Compute/VirtualMachines/MyVmName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --latest - - name: Sets Sql Vulnerability Assessment baseline on an Azure virtual machine. Replaces the current baseline with provided results. - text: > - az security va sql baseline set --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.Compute/VirtualMachines/MyVmName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --baseline rule=VA9999 Line1_col1 Line1_col2 Line1_col3 --baseline rule=VA8888 Line1_col1 Line1_col2 --baseline rule=VA9999 Line2_col1 Line2_col2 Line2_col3 - - name: Sets Sql Vulnerability Assessment baseline on an On-Premise machine. Replaces the current baseline with latest scan results. - text: > - az security va sql baseline set --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.OperationalInsights/Workspaces/MyWorkspaceName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --vm-name MyVmName --agent-id MyAgentId --vm-uuid MyVmUUID --latest - - name: Sets Sql Vulnerability Assessment baseline on an On-Premise machine. Replaces the current baseline with provided results. - text: > - az security va sql baseline set --vm-resource-id subscriptions/MySubscription/ResourceGroups/MyResourceGroup/Providers/Microsoft.OperationalInsights/Workspaces/MyWorkspaceName --workspace-id 00000000-0000-0000-0000-000000000000 --server-name MyServerName --database-name MyDbName --vm-name MyVmName --agent-id MyAgentId --vm-uuid MyVmUUID --baseline rule=VA9999 Line1_col1 Line1_col2 Line1_col3 --baseline rule=VA8888 Line1_col1 Line1_col2 --baseline rule=VA9999 Line2_col1 Line2_col2 Line2_col3 -""" - helps['security auto-provisioning-setting'] = """ type: group short-summary: View your auto provisioning settings. diff --git a/src/azure-cli/azure/cli/command_modules/security/_params.py b/src/azure-cli/azure/cli/command_modules/security/_params.py index 75ba29f8aed..17c6465809a 100644 --- a/src/azure-cli/azure/cli/command_modules/security/_params.py +++ b/src/azure-cli/azure/cli/command_modules/security/_params.py @@ -16,7 +16,7 @@ validate_auto_provisioning_toggle, validate_pricing_tier, validate_assessment_status_code) -from .actions import AppendBaselines, AppendBaseline, GetExtension +from .actions import GetExtension name_arg_type = CLIArgumentType(options_list=('--name', '-n'), metavar='NAME', help='name of the resource to be fetched') home_region_arg_type = CLIArgumentType(options_list=('--home-region', '-hr'), metavar='HOMEREGION', help='home region that was selected for the subscription') @@ -42,19 +42,6 @@ storage_account_arg_type = CLIArgumentType(options_list=('--storage-account'), metavar='NAME', help='Name of an existing Storage account.') cosmos_db_account_arg_type = CLIArgumentType(options_list=('--cosmosdb-account'), metavar='NAME', help='Name of an existing Cosmos DB account.') -# Sql Vulnerability Assessment -va_sql_vm_resource_id_arg_type = CLIArgumentType(options_list=('--vm-resource-id'), metavar='VMRESOURCEID', help='Resource ID of the scanned machine. For On-Premise machines, please provide your workspace resource ID') -va_sql_workspace_id_arg_type = CLIArgumentType(options_list=('--workspace-id'), metavar='WORKSPACEID', help='The ID of the workspace connected to the scanned machine') -va_sql_server_name_arg_type = CLIArgumentType(options_list=('--server-name'), metavar='SERVERNAME', help='The name of the scanned server') -va_sql_database_name_arg_type = CLIArgumentType(options_list=('--database-name'), metavar='DATABASENAME', help='The name of the scanned database') -va_sql_scan_id_arg_type = CLIArgumentType(options_list=('--scan-id'), metavar='SCANID', help='The ID of the scan') -va_sql_rule_id_arg_type = CLIArgumentType(options_list=('--rule-id'), metavar='RULEID', help='The ID of the scanned rule. Format: "VAXXXX", where XXXX indicates the number of the rule') -va_sql_baseline_single_arg_type = CLIArgumentType(options_list=('--baseline', '-b'), metavar='BASELINE', help='Baseline records to be set. The following example will set a baseline with two records: --baseline line1_w1 line1_w2 line1_w3 --baseline line2_w1 line2_w2 line2_w3', action=AppendBaseline, nargs='+') -va_sql_baseline_multiple_arg_type = CLIArgumentType(options_list=('--baseline', '-b'), metavar='BASELINE', help='Baseline records to be set. The following example will set a baseline for two rules: --baseline rule=VA1111 line1_w1 line1_w2 --baseline rule=VA2222 line1_w1 line1_w2 line1_w3 --baseline rule=VA1111 line2_w1 line2_w2', action=AppendBaselines, nargs='+') -va_sql_vm_name_arg_type = CLIArgumentType(options_list=('--vm-name'), metavar='VMNAME', help='Provide the name of the machine, for On-Premise resources only') -va_sql_agent_id_arg_type = CLIArgumentType(options_list=('--agent-id'), metavar='AGENTID', help='Provide the ID of the agent on the scanned machine, for On-Premise resources only') -va_sql_vm_uuid_arg_type = CLIArgumentType(options_list=('--vm-uuid'), metavar='VMUUID', help='Provide the UUID of the scanned machine, for On-Premise resources only') - # Auto Provisioning auto_provisioning_auto_provision_arg_type = CLIArgumentType(options_list=('--auto-provision'), metavar='AUTOPROVISION', help='Automatic provisioning toggle. possible values are "On" or "Off"') @@ -131,7 +118,6 @@ def load_arguments(self, _): for scope in ['alert', 'alerts-suppression-rule', 'atp', - 'va sql', 'task', 'auto-provisioning-setting', 'discovered-security-solution', @@ -172,27 +158,6 @@ def load_arguments(self, _): c.argument( 'location', arg_type=location_arg_type) - c.argument( - 'vm_resource_id', - arg_type=va_sql_vm_resource_id_arg_type) - c.argument( - 'workspace_id', - arg_type=va_sql_workspace_id_arg_type) - c.argument( - 'server_name', - arg_type=va_sql_server_name_arg_type) - c.argument( - 'database_name', - arg_type=va_sql_database_name_arg_type) - c.argument( - 'vm_name', - arg_type=va_sql_vm_name_arg_type) - c.argument( - 'agent_id', - arg_type=va_sql_agent_id_arg_type) - c.argument( - 'vm_uuid', - arg_type=va_sql_vm_uuid_arg_type) with self.argument_context('security atp storage') as c: c.argument( @@ -293,31 +258,6 @@ def load_arguments(self, _): with self.argument_context('security {}'.format(scope)) as c: c.argument('is_enabled', help='Enable or disable Advanced Threat Protection for a received storage or Cosmos DB account.', arg_type=get_three_state_flag()) - for scope in ['va sql scans show', - 'va sql results']: - with self.argument_context('security {}'.format(scope)) as c: - c.argument('scan_id', arg_type=va_sql_scan_id_arg_type) - - for scope in ['va sql results show', - 'va sql baseline show', - 'va sql baseline delete', - 'va sql baseline update']: - with self.argument_context('security {}'.format(scope)) as c: - c.argument('rule_id', arg_type=va_sql_rule_id_arg_type) - - for scope in ['va sql baseline update']: - with self.argument_context('security {}'.format(scope)) as c: - c.argument('baseline', arg_type=va_sql_baseline_single_arg_type) - - for scope in ['va sql baseline set']: - with self.argument_context('security {}'.format(scope)) as c: - c.argument('baseline', arg_type=va_sql_baseline_multiple_arg_type) - - for scope in ['va sql baseline update', - 'va sql baseline set']: - with self.argument_context('security {}'.format(scope)) as c: - c.argument('baseline_latest', options_list=('--latest'), metavar='BASELINE', help='Use this argument without parameters to set baseline upon latest scan results', arg_type=get_three_state_flag()) - for scope in ['pricing create']: with self.argument_context('security {}'.format(scope)) as c: c.argument( @@ -329,8 +269,6 @@ def load_arguments(self, _): 'subplan', arg_type=pricing_tier_subplan_arg_type) - c.argument('baseline', arg_type=va_sql_baseline_multiple_arg_type) - c.argument( 'extensions', arg_type=pricing_tier_extensions_arg_type) diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/__cmd_group.py new file mode 100644 index 00000000000..3be9d41acce --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "security va", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """Manage Defender for Cloud vulnerability assessment. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/__init__.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/__cmd_group.py new file mode 100644 index 00000000000..79c71b56250 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "security va sql", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """Manage Defender for Cloud vulnerability assessment. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/__init__.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/__init__.py new file mode 100644 index 00000000000..a3db3e36481 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/__init__.py @@ -0,0 +1,15 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._show import * +from ._update import * diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/_create.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/_create.py new file mode 100644 index 00000000000..366206d84f5 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/_create.py @@ -0,0 +1,225 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "security va sql create", + is_preview=True, +) +class Create(AAZCommand): + """Create the SQL Vulnerability Assessment settings. + + :example: Enable SQL Vulnerability Assessment on an Azure SQL server. + az security va sql create --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server} --state Enabled + + :example: Enable SQL Vulnerability Assessment on a SQL server hosted on an Azure virtual machine. + az security va sql create --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines/{vm} --state Enabled + """ + + _aaz_info = { + "version": "2026-04-01-preview", + "resources": [ + ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default", "2026-04-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_id = AAZStrArg( + options=["--resource-id"], + help="The fully qualified Azure Resource manager identifier of the resource.", + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.state = AAZStrArg( + options=["--state"], + arg_group="Properties", + help="Represents the state of a SQL Vulnerability Assessment.", + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SqlVulnerabilityAssessmentSettingsOperationGroupCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SqlVulnerabilityAssessmentSettingsOperationGroupCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("state", AAZStrType, ".state") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.state = AAZStrType() + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/_delete.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/_delete.py new file mode 100644 index 00000000000..88e7c70311b --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/_delete.py @@ -0,0 +1,131 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "security va sql delete", + is_preview=True, + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete the SQL Vulnerability Assessment settings. + + :example: Delete SQL Vulnerability Assessment settings on an Azure SQL server. + az security va sql delete --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server} + + :example: Delete SQL Vulnerability Assessment settings on an Arc-enabled SQL server. + az security va sql delete --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.HybridCompute/machines/{arc} + """ + + _aaz_info = { + "version": "2026-04-01-preview", + "resources": [ + ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default", "2026-04-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_id = AAZStrArg( + options=["--resource-id"], + help="The fully qualified Azure Resource manager identifier of the resource.", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SqlVulnerabilityAssessmentSettingsOperationGroupDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class SqlVulnerabilityAssessmentSettingsOperationGroupDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/_show.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/_show.py new file mode 100644 index 00000000000..068eb48393e --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/_show.py @@ -0,0 +1,200 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "security va sql show", + is_preview=True, +) +class Show(AAZCommand): + """Get the SQL Vulnerability Assessment settings. + + :example: Get SQL Vulnerability Assessment settings for an Azure SQL server. + az security va sql show --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server} + + :example: Get SQL Vulnerability Assessment settings for a SQL server on an Azure virtual machine. + az security va sql show --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines/{vm} + + :example: Get SQL Vulnerability Assessment settings for a SQL server on an Arc-enabled machine. + az security va sql show --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.HybridCompute/machines/{arc} + """ + + _aaz_info = { + "version": "2026-04-01-preview", + "resources": [ + ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default", "2026-04-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_id = AAZStrArg( + options=["--resource-id"], + help="The fully qualified Azure Resource manager identifier of the resource.", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SqlVulnerabilityAssessmentSettingsOperationGroupGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SqlVulnerabilityAssessmentSettingsOperationGroupGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.state = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/_update.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/_update.py new file mode 100644 index 00000000000..045850b7e1a --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/_update.py @@ -0,0 +1,379 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "security va sql update", + is_preview=True, +) +class Update(AAZCommand): + """Update the SQL Vulnerability Assessment settings. + + :example: Disable SQL Vulnerability Assessment on an Azure SQL server. + az security va sql update --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server} --state Disabled + + :example: Re-enable SQL Vulnerability Assessment on a SQL Managed Instance. + az security va sql update --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/managedInstances/{mi} --state Enabled + """ + + _aaz_info = { + "version": "2026-04-01-preview", + "resources": [ + ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default", "2026-04-01-preview"], + ] + } + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_id = AAZStrArg( + options=["--resource-id"], + help="The fully qualified Azure Resource manager identifier of the resource.", + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.state = AAZStrArg( + options=["--state"], + arg_group="Properties", + help="Represents the state of a SQL Vulnerability Assessment.", + nullable=True, + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SqlVulnerabilityAssessmentSettingsOperationGroupGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + self.SqlVulnerabilityAssessmentSettingsOperationGroupCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SqlVulnerabilityAssessmentSettingsOperationGroupGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.state = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + class SqlVulnerabilityAssessmentSettingsOperationGroupCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.creation_time = AAZStrType( + serialized_name="creationTime", + flags={"read_only": True}, + ) + properties.state = AAZStrType() + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("state", AAZStrType, ".state") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + +__all__ = ["Update"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/__cmd_group.py new file mode 100644 index 00000000000..97449b98b5c --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "security va sql baseline", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """View and manage Sql Vulnerability Assessment baseline. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/__init__.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/__init__.py new file mode 100644 index 00000000000..1ecbd413f20 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._add import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_add.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_add.py new file mode 100644 index 00000000000..fa034a501bc --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_add.py @@ -0,0 +1,271 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "security va sql baseline add", + is_preview=True, +) +class Add(AAZCommand): + """Set a list of baseline rules. Will overwrite any previously existing results (for all rules). + + :example: Set baseline for all rules on an Azure SQL database using the latest scan results. + az security va sql baseline add --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} --latest-scan true + + :example: Set baseline for multiple rules with explicit results on a SQL DB hosted on an Azure VM. + az security va sql baseline add --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines/{vm} --database-name MyDb --results "{VA1234:[[col1,col2],[col3,col4]],VA5678:[[user1,SELECT]]}" + + :example: Set baseline at the server level using latest scan results (system database 'master'). + az security va sql baseline add --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server} --database-name master --latest-scan true + """ + + _aaz_info = { + "version": "2026-04-01-preview", + "resources": [ + ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default/baselinerules", "2026-04-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_id = AAZStrArg( + options=["--resource-id"], + help="The fully qualified Azure Resource manager identifier of the resource.", + required=True, + ) + _args_schema.database_name = AAZStrArg( + options=["--database-name"], + help="The name of the database to assess. Required when the API is called on the parent resource (e.g., server level) rather than on a specific database resource, since the database name is not part of the resource URI. This is the only way to assess system databases (e.g., master), which cannot be referenced directly in the resource URI.", + ) + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.latest_scan = AAZBoolArg( + options=["--latest-scan"], + arg_group="Body", + help="Take results from latest scan.", + ) + _args_schema.results = AAZDictArg( + options=["--results"], + arg_group="Body", + help="Expected results to be inserted into the baseline. Leave this field empty if latestScan == true.", + ) + + results = cls._args_schema.results + results.Element = AAZListArg() + + _element = cls._args_schema.results.Element + _element.Element = AAZListArg() + + _element = cls._args_schema.results.Element.Element + _element.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SqlVulnerabilityAssessmentBaselineRulesAdd(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SqlVulnerabilityAssessmentBaselineRulesAdd(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "databaseName", self.ctx.args.database_name, + ), + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"client_flatten": True}} + ) + _builder.set_prop("latestScan", AAZBoolType, ".latest_scan") + _builder.set_prop("results", AAZDictType, ".results") + + results = _builder.get(".results") + if results is not None: + results.set_elements(AAZListType, ".") + + _elements = _builder.get(".results{}") + if _elements is not None: + _elements.set_elements(AAZListType, ".") + + _elements = _builder.get(".results{}[]") + if _elements is not None: + _elements.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.latest_scan = AAZBoolType( + serialized_name="latestScan", + ) + properties.results = AAZListType() + + results = cls._schema_on_200.value.Element.properties.results + results.Element = AAZListType() + + _element = cls._schema_on_200.value.Element.properties.results.Element + _element.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _AddHelper: + """Helper class for Add""" + + +__all__ = ["Add"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_create.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_create.py new file mode 100644 index 00000000000..64951b74a98 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_create.py @@ -0,0 +1,261 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "security va sql baseline create", + is_preview=True, +) +class Create(AAZCommand): + """Create a Baseline for a rule in a database. Will overwrite any previously existing results. + + :example: Create a baseline for a single rule on an Azure SQL database using the latest scan results. + az security va sql baseline create --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} --rule-id VA1234 --latest-scan true + + :example: Create a baseline for a single rule on an Arc-enabled SQL server with explicit results. + az security va sql baseline create --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.HybridCompute/machines/{arc} --database-name MyDb --rule-id VA1234 --results "[[col1,col2,col3],[col4,col5,col6]]" + """ + + _aaz_info = { + "version": "2026-04-01-preview", + "resources": [ + ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default/baselinerules/{}", "2026-04-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_id = AAZStrArg( + options=["--resource-id"], + help="The fully qualified Azure Resource manager identifier of the resource.", + required=True, + ) + _args_schema.rule_id = AAZStrArg( + options=["--rule-id"], + help="The rule Id.", + required=True, + ) + _args_schema.database_name = AAZStrArg( + options=["--database-name"], + help="The name of the database to assess. Required when the API is called on the parent resource (e.g., server level) rather than on a specific database resource, since the database name is not part of the resource URI. This is the only way to assess system databases (e.g., master), which cannot be referenced directly in the resource URI.", + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.latest_scan = AAZBoolArg( + options=["--latest-scan"], + arg_group="Resource", + help="Take results from latest scan.", + ) + _args_schema.results = AAZListArg( + options=["--results"], + arg_group="Resource", + help="Expected results to be inserted into the baseline. Leave this field empty if latestScan == true.", + ) + + results = cls._args_schema.results + results.Element = AAZListArg() + + _element = cls._args_schema.results.Element + _element.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + **self.serialize_url_param( + "ruleId", self.ctx.args.rule_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "databaseName", self.ctx.args.database_name, + ), + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"client_flatten": True}} + ) + _builder.set_prop("latestScan", AAZBoolType, ".latest_scan") + _builder.set_prop("results", AAZListType, ".results") + + results = _builder.get(".results") + if results is not None: + results.set_elements(AAZListType, ".") + + _elements = _builder.get(".results[]") + if _elements is not None: + _elements.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.latest_scan = AAZBoolType( + serialized_name="latestScan", + ) + properties.results = AAZListType() + + results = cls._schema_on_200_201.properties.results + results.Element = AAZListType() + + _element = cls._schema_on_200_201.properties.results.Element + _element.Element = AAZStrType() + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_delete.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_delete.py new file mode 100644 index 00000000000..950d61ed981 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_delete.py @@ -0,0 +1,147 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "security va sql baseline delete", + is_preview=True, + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a rule from the Baseline of a given database. + + :example: Delete baseline for rule VA1234 on an Azure SQL database. + az security va sql baseline delete --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} --rule-id VA1234 + + :example: Delete baseline for rule VA1234 on a SQL DB hosted on an Azure virtual machine. + az security va sql baseline delete --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines/{vm} --database-name MyDb --rule-id VA1234 + """ + + _aaz_info = { + "version": "2026-04-01-preview", + "resources": [ + ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default/baselinerules/{}", "2026-04-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_id = AAZStrArg( + options=["--resource-id"], + help="The fully qualified Azure Resource manager identifier of the resource.", + required=True, + ) + _args_schema.rule_id = AAZStrArg( + options=["--rule-id"], + help="The rule Id.", + required=True, + ) + _args_schema.database_name = AAZStrArg( + options=["--database-name"], + help="The name of the database to assess. Required when the API is called on the parent resource (e.g., server level) rather than on a specific database resource, since the database name is not part of the resource URI. This is the only way to assess system databases (e.g., master), which cannot be referenced directly in the resource URI.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SqlVulnerabilityAssessmentBaselineRulesDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class SqlVulnerabilityAssessmentBaselineRulesDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + **self.serialize_url_param( + "ruleId", self.ctx.args.rule_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "databaseName", self.ctx.args.database_name, + ), + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_list.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_list.py new file mode 100644 index 00000000000..9f2615c270f --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_list.py @@ -0,0 +1,220 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "security va sql baseline list", + is_preview=True, +) +class List(AAZCommand): + """List the results for all rules in the Baseline. + + :example: List baseline for all rules on an Azure SQL database. + az security va sql baseline list --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} + + :example: List baseline for all rules at the server level (system database 'master'). + az security va sql baseline list --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server} --database-name master + """ + + _aaz_info = { + "version": "2026-04-01-preview", + "resources": [ + ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default/baselinerules", "2026-04-01-preview"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_id = AAZStrArg( + options=["--resource-id"], + help="The fully qualified Azure Resource manager identifier of the resource.", + required=True, + ) + _args_schema.database_name = AAZStrArg( + options=["--database-name"], + help="The name of the database to assess. Required when the API is called on the parent resource (e.g., server level) rather than on a specific database resource, since the database name is not part of the resource URI. This is the only way to assess system databases (e.g., master), which cannot be referenced directly in the resource URI.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SqlVulnerabilityAssessmentBaselineRulesList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class SqlVulnerabilityAssessmentBaselineRulesList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "databaseName", self.ctx.args.database_name, + ), + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.latest_scan = AAZBoolType( + serialized_name="latestScan", + ) + properties.results = AAZListType() + + results = cls._schema_on_200.value.Element.properties.results + results.Element = AAZListType() + + _element = cls._schema_on_200.value.Element.properties.results.Element + _element.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_show.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_show.py new file mode 100644 index 00000000000..b6ce402e702 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_show.py @@ -0,0 +1,218 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "security va sql baseline show", + is_preview=True, +) +class Show(AAZCommand): + """Get the results for a given rule in the Baseline. + + :example: Show baseline for rule VA1234 on an Azure SQL database. + az security va sql baseline show --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} --rule-id VA1234 + + :example: Show baseline for rule VA1234 on an Arc-enabled SQL server. + az security va sql baseline show --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.HybridCompute/machines/{arc} --database-name MyDb --rule-id VA1234 + """ + + _aaz_info = { + "version": "2026-04-01-preview", + "resources": [ + ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default/baselinerules/{}", "2026-04-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_id = AAZStrArg( + options=["--resource-id"], + help="The fully qualified Azure Resource manager identifier of the resource.", + required=True, + ) + _args_schema.rule_id = AAZStrArg( + options=["--rule-id"], + help="The rule Id.", + required=True, + ) + _args_schema.database_name = AAZStrArg( + options=["--database-name"], + help="The name of the database to assess. Required when the API is called on the parent resource (e.g., server level) rather than on a specific database resource, since the database name is not part of the resource URI. This is the only way to assess system databases (e.g., master), which cannot be referenced directly in the resource URI.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SqlVulnerabilityAssessmentBaselineRulesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SqlVulnerabilityAssessmentBaselineRulesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + **self.serialize_url_param( + "ruleId", self.ctx.args.rule_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "databaseName", self.ctx.args.database_name, + ), + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.latest_scan = AAZBoolType( + serialized_name="latestScan", + ) + properties.results = AAZListType() + + results = cls._schema_on_200.properties.results + results.Element = AAZListType() + + _element = cls._schema_on_200.properties.results.Element + _element.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_update.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_update.py new file mode 100644 index 00000000000..b79c119e49e --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_update.py @@ -0,0 +1,432 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "security va sql baseline update", + is_preview=True, +) +class Update(AAZCommand): + """Update a Baseline for a rule in a database. Will overwrite any previously existing results. + + :example: Update a single-rule baseline on an Azure SQL database with the latest scan results. + az security va sql baseline update --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} --rule-id VA1234 --latest-scan true + + :example: Update a single-rule baseline on a SQL DB hosted on an Azure VM with explicit results. + az security va sql baseline update --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines/{vm} --database-name MyDb --rule-id VA1234 --results "[[col1,col2],[col3,col4]]" + """ + + _aaz_info = { + "version": "2026-04-01-preview", + "resources": [ + ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default/baselinerules/{}", "2026-04-01-preview"], + ] + } + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_id = AAZStrArg( + options=["--resource-id"], + help="The fully qualified Azure Resource manager identifier of the resource.", + required=True, + ) + _args_schema.rule_id = AAZStrArg( + options=["--rule-id"], + help="The rule Id.", + required=True, + ) + _args_schema.database_name = AAZStrArg( + options=["--database-name"], + help="The name of the database to assess. Required when the API is called on the parent resource (e.g., server level) rather than on a specific database resource, since the database name is not part of the resource URI. This is the only way to assess system databases (e.g., master), which cannot be referenced directly in the resource URI.", + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.latest_scan = AAZBoolArg( + options=["--latest-scan"], + arg_group="Resource", + help="Take results from latest scan.", + nullable=True, + ) + _args_schema.results = AAZListArg( + options=["--results"], + arg_group="Resource", + help="Expected results to be inserted into the baseline. Leave this field empty if latestScan == true.", + nullable=True, + ) + + results = cls._args_schema.results + results.Element = AAZListArg( + nullable=True, + ) + + _element = cls._args_schema.results.Element + _element.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SqlVulnerabilityAssessmentBaselineRulesGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + self.SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SqlVulnerabilityAssessmentBaselineRulesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + **self.serialize_url_param( + "ruleId", self.ctx.args.rule_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "databaseName", self.ctx.args.database_name, + ), + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.latest_scan = AAZBoolType( + serialized_name="latestScan", + ) + properties.results = AAZListType() + + results = cls._schema_on_200.properties.results + results.Element = AAZListType() + + _element = cls._schema_on_200.properties.results.Element + _element.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + class SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + **self.serialize_url_param( + "ruleId", self.ctx.args.rule_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "databaseName", self.ctx.args.database_name, + ), + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.latest_scan = AAZBoolType( + serialized_name="latestScan", + ) + properties.results = AAZListType() + + results = cls._schema_on_200_201.properties.results + results.Element = AAZListType() + + _element = cls._schema_on_200_201.properties.results.Element + _element.Element = AAZStrType() + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("latestScan", AAZBoolType, ".latest_scan") + _builder.set_prop("results", AAZListType, ".results") + + results = _builder.get(".results") + if results is not None: + results.set_elements(AAZListType, ".") + + _elements = _builder.get(".results[]") + if _elements is not None: + _elements.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + +__all__ = ["Update"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/__cmd_group.py new file mode 100644 index 00000000000..65adae2a87e --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "security va sql results", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """View Sql Vulnerability Assessment scan results. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/__init__.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/__init__.py new file mode 100644 index 00000000000..2df85698253 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/__init__.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * +from ._show import * diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/_list.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/_list.py new file mode 100644 index 00000000000..9f2f58bd081 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/_list.py @@ -0,0 +1,333 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "security va sql results list", + is_preview=True, +) +class List(AAZCommand): + """List a list of scan results for a single scan record. + + :example: List all scan results for a given scan id on an Azure SQL database. + az security va sql results list --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} --scan-id Scan_2026-01-01T00-00-00Z + + :example: List scan results on a SQL DB hosted on an Azure virtual machine. + az security va sql results list --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines/{vm} --database-name MyDb --scan-id Scan_2026-01-01T00-00-00Z + """ + + _aaz_info = { + "version": "2026-04-01-preview", + "resources": [ + ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default/scans/{}/scanresults", "2026-04-01-preview"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_id = AAZStrArg( + options=["--resource-id"], + help="The fully qualified Azure Resource manager identifier of the resource.", + required=True, + ) + _args_schema.scan_id = AAZStrArg( + options=["--scan-id"], + help="The scan Id.", + required=True, + ) + _args_schema.database_name = AAZStrArg( + options=["--database-name"], + help="The name of the database to assess. Required when the API is called on the parent resource (e.g., server level) rather than on a specific database resource, since the database name is not part of the resource URI. This is the only way to assess system databases (e.g., master), which cannot be referenced directly in the resource URI.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SqlVulnerabilityAssessmentScanResultsList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class SqlVulnerabilityAssessmentScanResultsList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}/scanResults", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + **self.serialize_url_param( + "scanId", self.ctx.args.scan_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "databaseName", self.ctx.args.database_name, + ), + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.baseline_adjusted_result = AAZObjectType( + serialized_name="baselineAdjustedResult", + ) + properties.is_trimmed = AAZBoolType( + serialized_name="isTrimmed", + ) + properties.query_results = AAZListType( + serialized_name="queryResults", + ) + properties.remediation = AAZObjectType() + properties.rule_id = AAZStrType( + serialized_name="ruleId", + ) + properties.rule_metadata = AAZObjectType( + serialized_name="ruleMetadata", + ) + properties.status = AAZStrType() + + baseline_adjusted_result = cls._schema_on_200.value.Element.properties.baseline_adjusted_result + baseline_adjusted_result.baseline = AAZObjectType() + baseline_adjusted_result.results_not_in_baseline = AAZListType( + serialized_name="resultsNotInBaseline", + ) + baseline_adjusted_result.results_only_in_baseline = AAZListType( + serialized_name="resultsOnlyInBaseline", + ) + baseline_adjusted_result.status = AAZStrType() + + baseline = cls._schema_on_200.value.Element.properties.baseline_adjusted_result.baseline + baseline.expected_results = AAZListType( + serialized_name="expectedResults", + ) + baseline.updated_time = AAZStrType( + serialized_name="updatedTime", + ) + + expected_results = cls._schema_on_200.value.Element.properties.baseline_adjusted_result.baseline.expected_results + expected_results.Element = AAZListType() + + _element = cls._schema_on_200.value.Element.properties.baseline_adjusted_result.baseline.expected_results.Element + _element.Element = AAZStrType() + + results_not_in_baseline = cls._schema_on_200.value.Element.properties.baseline_adjusted_result.results_not_in_baseline + results_not_in_baseline.Element = AAZListType() + + _element = cls._schema_on_200.value.Element.properties.baseline_adjusted_result.results_not_in_baseline.Element + _element.Element = AAZStrType() + + results_only_in_baseline = cls._schema_on_200.value.Element.properties.baseline_adjusted_result.results_only_in_baseline + results_only_in_baseline.Element = AAZListType() + + _element = cls._schema_on_200.value.Element.properties.baseline_adjusted_result.results_only_in_baseline.Element + _element.Element = AAZStrType() + + query_results = cls._schema_on_200.value.Element.properties.query_results + query_results.Element = AAZListType() + + _element = cls._schema_on_200.value.Element.properties.query_results.Element + _element.Element = AAZStrType() + + remediation = cls._schema_on_200.value.Element.properties.remediation + remediation.automated = AAZBoolType() + remediation.description = AAZStrType() + remediation.portal_link = AAZStrType( + serialized_name="portalLink", + ) + remediation.scripts = AAZListType() + + scripts = cls._schema_on_200.value.Element.properties.remediation.scripts + scripts.Element = AAZStrType() + + rule_metadata = cls._schema_on_200.value.Element.properties.rule_metadata + rule_metadata.benchmark_references = AAZListType( + serialized_name="benchmarkReferences", + ) + rule_metadata.category = AAZStrType() + rule_metadata.description = AAZStrType() + rule_metadata.query_check = AAZObjectType( + serialized_name="queryCheck", + ) + rule_metadata.rationale = AAZStrType() + rule_metadata.rule_id = AAZStrType( + serialized_name="ruleId", + ) + rule_metadata.rule_type = AAZStrType( + serialized_name="ruleType", + ) + rule_metadata.severity = AAZStrType() + rule_metadata.title = AAZStrType() + + benchmark_references = cls._schema_on_200.value.Element.properties.rule_metadata.benchmark_references + benchmark_references.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.rule_metadata.benchmark_references.Element + _element.benchmark = AAZStrType() + _element.reference = AAZStrType() + + query_check = cls._schema_on_200.value.Element.properties.rule_metadata.query_check + query_check.column_names = AAZListType( + serialized_name="columnNames", + ) + query_check.expected_result = AAZListType( + serialized_name="expectedResult", + ) + query_check.query = AAZStrType() + + column_names = cls._schema_on_200.value.Element.properties.rule_metadata.query_check.column_names + column_names.Element = AAZStrType() + + expected_result = cls._schema_on_200.value.Element.properties.rule_metadata.query_check.expected_result + expected_result.Element = AAZListType() + + _element = cls._schema_on_200.value.Element.properties.rule_metadata.query_check.expected_result.Element + _element.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/_show.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/_show.py new file mode 100644 index 00000000000..910bd87d72a --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/_show.py @@ -0,0 +1,331 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "security va sql results show", + is_preview=True, +) +class Show(AAZCommand): + """Get the scan results of a single rule in a scan record. + + :example: Show results for rule VA1234 from a given scan id on an Azure SQL database. + az security va sql results show --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} --scan-id Scan_2026-01-01T00-00-00Z --scan-result-id VA1234 + + :example: Show results for a single rule on an Arc-enabled SQL server. + az security va sql results show --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.HybridCompute/machines/{arc} --database-name MyDb --scan-id Scan_2026-01-01T00-00-00Z --scan-result-id VA1234 + """ + + _aaz_info = { + "version": "2026-04-01-preview", + "resources": [ + ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default/scans/{}/scanresults/{}", "2026-04-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_id = AAZStrArg( + options=["--resource-id"], + help="The fully qualified Azure Resource manager identifier of the resource.", + required=True, + ) + _args_schema.scan_id = AAZStrArg( + options=["--scan-id"], + help="The scan Id.", + required=True, + ) + _args_schema.scan_result_id = AAZStrArg( + options=["--scan-result-id"], + help="The rule Id of the results.", + required=True, + ) + _args_schema.database_name = AAZStrArg( + options=["--database-name"], + help="The name of the database to assess. Required when the API is called on the parent resource (e.g., server level) rather than on a specific database resource, since the database name is not part of the resource URI. This is the only way to assess system databases (e.g., master), which cannot be referenced directly in the resource URI.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SqlVulnerabilityAssessmentScanResultsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SqlVulnerabilityAssessmentScanResultsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}/scanResults/{scanResultId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + **self.serialize_url_param( + "scanId", self.ctx.args.scan_id, + required=True, + ), + **self.serialize_url_param( + "scanResultId", self.ctx.args.scan_result_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "databaseName", self.ctx.args.database_name, + ), + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.baseline_adjusted_result = AAZObjectType( + serialized_name="baselineAdjustedResult", + ) + properties.is_trimmed = AAZBoolType( + serialized_name="isTrimmed", + ) + properties.query_results = AAZListType( + serialized_name="queryResults", + ) + properties.remediation = AAZObjectType() + properties.rule_id = AAZStrType( + serialized_name="ruleId", + ) + properties.rule_metadata = AAZObjectType( + serialized_name="ruleMetadata", + ) + properties.status = AAZStrType() + + baseline_adjusted_result = cls._schema_on_200.properties.baseline_adjusted_result + baseline_adjusted_result.baseline = AAZObjectType() + baseline_adjusted_result.results_not_in_baseline = AAZListType( + serialized_name="resultsNotInBaseline", + ) + baseline_adjusted_result.results_only_in_baseline = AAZListType( + serialized_name="resultsOnlyInBaseline", + ) + baseline_adjusted_result.status = AAZStrType() + + baseline = cls._schema_on_200.properties.baseline_adjusted_result.baseline + baseline.expected_results = AAZListType( + serialized_name="expectedResults", + ) + baseline.updated_time = AAZStrType( + serialized_name="updatedTime", + ) + + expected_results = cls._schema_on_200.properties.baseline_adjusted_result.baseline.expected_results + expected_results.Element = AAZListType() + + _element = cls._schema_on_200.properties.baseline_adjusted_result.baseline.expected_results.Element + _element.Element = AAZStrType() + + results_not_in_baseline = cls._schema_on_200.properties.baseline_adjusted_result.results_not_in_baseline + results_not_in_baseline.Element = AAZListType() + + _element = cls._schema_on_200.properties.baseline_adjusted_result.results_not_in_baseline.Element + _element.Element = AAZStrType() + + results_only_in_baseline = cls._schema_on_200.properties.baseline_adjusted_result.results_only_in_baseline + results_only_in_baseline.Element = AAZListType() + + _element = cls._schema_on_200.properties.baseline_adjusted_result.results_only_in_baseline.Element + _element.Element = AAZStrType() + + query_results = cls._schema_on_200.properties.query_results + query_results.Element = AAZListType() + + _element = cls._schema_on_200.properties.query_results.Element + _element.Element = AAZStrType() + + remediation = cls._schema_on_200.properties.remediation + remediation.automated = AAZBoolType() + remediation.description = AAZStrType() + remediation.portal_link = AAZStrType( + serialized_name="portalLink", + ) + remediation.scripts = AAZListType() + + scripts = cls._schema_on_200.properties.remediation.scripts + scripts.Element = AAZStrType() + + rule_metadata = cls._schema_on_200.properties.rule_metadata + rule_metadata.benchmark_references = AAZListType( + serialized_name="benchmarkReferences", + ) + rule_metadata.category = AAZStrType() + rule_metadata.description = AAZStrType() + rule_metadata.query_check = AAZObjectType( + serialized_name="queryCheck", + ) + rule_metadata.rationale = AAZStrType() + rule_metadata.rule_id = AAZStrType( + serialized_name="ruleId", + ) + rule_metadata.rule_type = AAZStrType( + serialized_name="ruleType", + ) + rule_metadata.severity = AAZStrType() + rule_metadata.title = AAZStrType() + + benchmark_references = cls._schema_on_200.properties.rule_metadata.benchmark_references + benchmark_references.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.rule_metadata.benchmark_references.Element + _element.benchmark = AAZStrType() + _element.reference = AAZStrType() + + query_check = cls._schema_on_200.properties.rule_metadata.query_check + query_check.column_names = AAZListType( + serialized_name="columnNames", + ) + query_check.expected_result = AAZListType( + serialized_name="expectedResult", + ) + query_check.query = AAZStrType() + + column_names = cls._schema_on_200.properties.rule_metadata.query_check.column_names + column_names.Element = AAZStrType() + + expected_result = cls._schema_on_200.properties.rule_metadata.query_check.expected_result + expected_result.Element = AAZListType() + + _element = cls._schema_on_200.properties.rule_metadata.query_check.expected_result.Element + _element.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/__cmd_group.py new file mode 100644 index 00000000000..9432b89e0fb --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "security va sql scans", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """View Sql Vulnerability Assessment scan summaries. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/__init__.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/__init__.py new file mode 100644 index 00000000000..0b6dc120f87 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/__init__.py @@ -0,0 +1,14 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._initiate_scan import * +from ._list import * +from ._show import * diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/_initiate_scan.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/_initiate_scan.py new file mode 100644 index 00000000000..0f19df7a9aa --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/_initiate_scan.py @@ -0,0 +1,222 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "security va sql scans initiate-scan", + is_preview=True, +) +class InitiateScan(AAZCommand): + """Initiates a vulnerability assessment scan. + + :example: Initiate a scan on an Azure SQL database. + az security va sql scans initiate-scan --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} + + :example: Initiate a scan on the master database of an Azure SQL server. + az security va sql scans initiate-scan --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server} --database-name master + """ + + _aaz_info = { + "version": "2026-04-01-preview", + "resources": [ + ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default/scans/initiatescan", "2026-04-01-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_id = AAZStrArg( + options=["--resource-id"], + help="The fully qualified Azure Resource manager identifier of the resource.", + required=True, + ) + _args_schema.database_name = AAZStrArg( + options=["--database-name"], + help="The name of the database to scan. Required when invoked at the server-level scope rather than on a specific database resource.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.SqlVulnerabilityAssessmentSettingsOperationGroupInitiateScan(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SqlVulnerabilityAssessmentSettingsOperationGroupInitiateScan(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/initiateScan", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "databaseName", self.ctx.args.database_name, + ), + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.operation_id = AAZStrType( + serialized_name="operationId", + ) + properties.scan_status = AAZStrType( + serialized_name="scanStatus", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _InitiateScanHelper: + """Helper class for InitiateScan""" + + +__all__ = ["InitiateScan"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/_list.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/_list.py new file mode 100644 index 00000000000..f06aabdb387 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/_list.py @@ -0,0 +1,249 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "security va sql scans list", + is_preview=True, +) +class List(AAZCommand): + """List a list of scan records. + + :example: List scan summaries for an Azure SQL database. + az security va sql scans list --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} + + :example: List scan summaries at server level for the master database. + az security va sql scans list --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server} --database-name master + """ + + _aaz_info = { + "version": "2026-04-01-preview", + "resources": [ + ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default/scans", "2026-04-01-preview"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_id = AAZStrArg( + options=["--resource-id"], + help="The fully qualified Azure Resource manager identifier of the resource.", + required=True, + ) + _args_schema.database_name = AAZStrArg( + options=["--database-name"], + help="The name of the database to assess. Required when the API is called on the parent resource (e.g., server level) rather than on a specific database resource, since the database name is not part of the resource URI. This is the only way to assess system databases (e.g., master), which cannot be referenced directly in the resource URI.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ScanV2sList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class ScanV2sList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "databaseName", self.ctx.args.database_name, + ), + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.database = AAZStrType() + properties.end_time = AAZStrType( + serialized_name="endTime", + ) + properties.high_severity_failed_rules_count = AAZIntType( + serialized_name="highSeverityFailedRulesCount", + ) + properties.is_baseline_applied = AAZBoolType( + serialized_name="isBaselineApplied", + ) + properties.last_scan_time = AAZStrType( + serialized_name="lastScanTime", + ) + properties.low_severity_failed_rules_count = AAZIntType( + serialized_name="lowSeverityFailedRulesCount", + ) + properties.medium_severity_failed_rules_count = AAZIntType( + serialized_name="mediumSeverityFailedRulesCount", + ) + properties.server = AAZStrType() + properties.sql_version = AAZStrType( + serialized_name="sqlVersion", + ) + properties.start_time = AAZStrType( + serialized_name="startTime", + ) + properties.state = AAZStrType() + properties.total_failed_rules_count = AAZIntType( + serialized_name="totalFailedRulesCount", + ) + properties.total_passed_rules_count = AAZIntType( + serialized_name="totalPassedRulesCount", + ) + properties.total_rules_count = AAZIntType( + serialized_name="totalRulesCount", + ) + properties.trigger_type = AAZStrType( + serialized_name="triggerType", + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/_show.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/_show.py new file mode 100644 index 00000000000..b6a04b8dc8e --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/_show.py @@ -0,0 +1,247 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "security va sql scans show", + is_preview=True, +) +class Show(AAZCommand): + """Get the scan details of a single scan record. + + :example: Show scan details for a given scan id on an Azure SQL database. + az security va sql scans show --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} --scan-id Scan_2026-01-01T00-00-00Z + + :example: Show scan details on a SQL DB hosted on an Azure virtual machine. + az security va sql scans show --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines/{vm} --database-name MyDb --scan-id Scan_2026-01-01T00-00-00Z + """ + + _aaz_info = { + "version": "2026-04-01-preview", + "resources": [ + ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default/scans/{}", "2026-04-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_id = AAZStrArg( + options=["--resource-id"], + help="The fully qualified Azure Resource manager identifier of the resource.", + required=True, + ) + _args_schema.scan_id = AAZStrArg( + options=["--scan-id"], + help="The scan Id. Type 'latest' to get the scan record for the latest scan.", + required=True, + ) + _args_schema.database_name = AAZStrArg( + options=["--database-name"], + help="The name of the database to assess. Required when the API is called on the parent resource (e.g., server level) rather than on a specific database resource, since the database name is not part of the resource URI. This is the only way to assess system databases (e.g., master), which cannot be referenced directly in the resource URI.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ScanV2sGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ScanV2sGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + **self.serialize_url_param( + "scanId", self.ctx.args.scan_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "databaseName", self.ctx.args.database_name, + ), + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.database = AAZStrType() + properties.end_time = AAZStrType( + serialized_name="endTime", + ) + properties.high_severity_failed_rules_count = AAZIntType( + serialized_name="highSeverityFailedRulesCount", + ) + properties.is_baseline_applied = AAZBoolType( + serialized_name="isBaselineApplied", + ) + properties.last_scan_time = AAZStrType( + serialized_name="lastScanTime", + ) + properties.low_severity_failed_rules_count = AAZIntType( + serialized_name="lowSeverityFailedRulesCount", + ) + properties.medium_severity_failed_rules_count = AAZIntType( + serialized_name="mediumSeverityFailedRulesCount", + ) + properties.server = AAZStrType() + properties.sql_version = AAZStrType( + serialized_name="sqlVersion", + ) + properties.start_time = AAZStrType( + serialized_name="startTime", + ) + properties.state = AAZStrType() + properties.total_failed_rules_count = AAZIntType( + serialized_name="totalFailedRulesCount", + ) + properties.total_passed_rules_count = AAZIntType( + serialized_name="totalPassedRulesCount", + ) + properties.total_rules_count = AAZIntType( + serialized_name="totalRulesCount", + ) + properties.trigger_type = AAZStrType( + serialized_name="triggerType", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/scan_operation_result/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/scan_operation_result/__cmd_group.py new file mode 100644 index 00000000000..54279c217d4 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/scan_operation_result/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "security va sql scans scan-operation-result", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """Manage Scan Operation Result + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/scan_operation_result/__init__.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/scan_operation_result/__init__.py new file mode 100644 index 00000000000..28d5f355813 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/scan_operation_result/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._show import * diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/scan_operation_result/_show.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/scan_operation_result/_show.py new file mode 100644 index 00000000000..653f5269318 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/scans/scan_operation_result/_show.py @@ -0,0 +1,211 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "security va sql scans scan-operation-result show", + is_preview=True, +) +class Show(AAZCommand): + """Get the result of a scan operation initiated by the InitiateScan action. + + :example: Poll a scan operation result by its operation id on an Azure SQL database. + az security va sql scans scan-operation-result show --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} --operation-id 00000000-0000-0000-0000-000000000000 + """ + + _aaz_info = { + "version": "2026-04-01-preview", + "resources": [ + ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default/scans/scanoperationresults/{}", "2026-04-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.operation_id = AAZStrArg( + options=["--operation-id"], + help="The operation id of the scan operation returned by 'security va sql scans initiate-scan'.", + required=True, + ) + _args_schema.resource_id = AAZStrArg( + options=["--resource-id"], + help="The fully qualified Azure Resource manager identifier of the resource.", + required=True, + ) + _args_schema.database_name = AAZStrArg( + options=["--database-name"], + help="The name of the database the scan was initiated against. Required when the original scan was initiated at the server-level scope.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SqlVulnerabilityAssessmentSettingsOperationGroupGetScanOperationResult(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SqlVulnerabilityAssessmentSettingsOperationGroupGetScanOperationResult(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/{operationId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "operationId", self.ctx.args.operation_id, + required=True, + ), + **self.serialize_url_param( + "resourceId", self.ctx.args.resource_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "databaseName", self.ctx.args.database_name, + ), + **self.serialize_query_param( + "api-version", "2026-04-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.operation_id = AAZStrType( + serialized_name="operationId", + ) + properties.scan_status = AAZStrType( + serialized_name="scanStatus", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/azure-cli/azure/cli/command_modules/security/actions.py b/src/azure-cli/azure/cli/command_modules/security/actions.py index ec558025eac..88b96326320 100644 --- a/src/azure-cli/azure/cli/command_modules/security/actions.py +++ b/src/azure-cli/azure/cli/command_modules/security/actions.py @@ -6,89 +6,9 @@ import argparse import json -from argparse import OPTIONAL -from azure.cli.core.azclierror import InvalidArgumentValueError, CLIInternalError from knack.util import CLIError -# pylint: disable=too-few-public-methods -class _AppendToDictionaryAction(argparse.Action): - - def __init__(self, - option_strings, - dest, - nargs=None, - const=None, - default=None, - type=None, # pylint: disable=W0622 - choices=None, - required=False, - help=None, # pylint: disable=W0622 - metavar=None): - if nargs == 0: - raise ValueError('nargs for append actions must be > 0; if arg ' - 'strings are not supplying the value to append, ' - 'the append const action may be more appropriate') - if const is not None and nargs != OPTIONAL: - raise ValueError('nargs must be %r to supply const' % OPTIONAL) - super().__init__( - option_strings=option_strings, - dest=dest, - nargs=nargs, - const=const, - default=default, - type=type, - choices=choices, - required=required, - help=help, - metavar=metavar) - - def __call__(self, parser, namespace, values, option_string=None): - items = getattr(namespace, self.dest, None) - if items is None: - items = {} - key = values[0] - value = values[1] - if key in items: - items[key].append(value) - else: - items[key] = [] - items[key].append(value) - setattr(namespace, self.dest, items) - - -# pylint: disable=protected-access, too-few-public-methods -class AppendBaseline(argparse._AppendAction): - - def __call__(self, parser, namespace, values, option_string=None): - try: - super().__call__(parser, namespace, values, option_string) - except ValueError: - raise CLIInternalError("Unexpected error") - - -# pylint: disable=protected-access, too-few-public-methods -class AppendBaselines(_AppendToDictionaryAction): - - def __call__(self, parser, namespace, values, option_string=None): - try: - rule_id = _get_rule_id(values[0]) - baseline_row_values = values[1:] - super().__call__(parser, namespace, (rule_id, baseline_row_values), option_string) - except ValueError: - raise CLIInternalError("Unexpected error") - - -def _get_rule_id(rule_param): - try: - split_result = rule_param.split("=") - if len(split_result) != 2 or split_result[0] != "rule": - raise InvalidArgumentValueError("Invalid baseline format. Use help for examples") - return split_result[1] - except: - raise InvalidArgumentValueError("Invalid baseline format. Use help for examples") - - class GetExtension(argparse._AppendAction): def __call__(self, parser, namespace, values, option_string=None): diff --git a/src/azure-cli/azure/cli/command_modules/security/commands.py b/src/azure-cli/azure/cli/command_modules/security/commands.py index a59c34f45ce..4d3baccd6de 100644 --- a/src/azure-cli/azure/cli/command_modules/security/commands.py +++ b/src/azure-cli/azure/cli/command_modules/security/commands.py @@ -16,9 +16,6 @@ cf_security_topology, cf_security_workspace_settings, cf_security_advanced_threat_protection, - cf_sql_vulnerability_assessment_scans, - cf_sql_vulnerability_assessment_results, - cf_sql_vulnerability_assessment_baseline, cf_security_assessment, cf_security_assessment_metadata, cf_security_sub_assessment, @@ -151,21 +148,6 @@ def load_command_table(self, _): client_factory=cf_security_advanced_threat_protection ) - security_sql_vulnerability_assessment_scans_sdk = CliCommandType( - operations_tmpl='azure.mgmt.security.operations#SqlVulnerabilityAssessmentScansOperations.{}', - client_factory=cf_sql_vulnerability_assessment_scans - ) - - security_sql_vulnerability_assessment_results_sdk = CliCommandType( - operations_tmpl='azure.mgmt.security.operations#SqlVulnerabilityAssessmentScanResultsOperations.{}', - client_factory=cf_sql_vulnerability_assessment_results - ) - - security_sql_vulnerability_assessment_baseline_sdk = CliCommandType( - operations_tmpl='azure.mgmt.security.operations#SqlVulnerabilityAssessmentBaselineRulesOperations.{}', - client_factory=cf_sql_vulnerability_assessment_baseline - ) - security_assessment_sdk = CliCommandType( operations_tmpl='azure.mgmt.security.operations#AssessmentsOperations.{}', client_factory=cf_security_assessment @@ -293,27 +275,6 @@ def load_command_table(self, _): g.custom_show_command('show', f"get_{scope}_atp_setting") g.custom_command('update', f"update_{scope}_atp_setting") - with self.command_group('security va sql scans', - security_sql_vulnerability_assessment_scans_sdk, - client_factory=cf_sql_vulnerability_assessment_scans) as g: - g.custom_show_command('show', 'get_va_sql_scan') - g.custom_command('list', 'list_va_sql_scans') - - with self.command_group('security va sql results', - security_sql_vulnerability_assessment_results_sdk, - client_factory=cf_sql_vulnerability_assessment_results) as g: - g.custom_show_command('show', 'get_va_sql_result') - g.custom_command('list', 'list_va_sql_results') - - with self.command_group('security va sql baseline', - security_sql_vulnerability_assessment_baseline_sdk, - client_factory=cf_sql_vulnerability_assessment_baseline) as g: - g.custom_show_command('show', 'get_va_sql_baseline') - g.custom_command('list', 'list_va_sql_baseline') - g.custom_command('delete', 'delete_va_sql_baseline') - g.custom_command('update', 'update_va_sql_baseline') - g.custom_command('set', 'set_va_sql_baseline') - with self.command_group('security alert', security_alerts_sdk, client_factory=cf_security_alerts) as g: diff --git a/src/azure-cli/azure/cli/command_modules/security/custom.py b/src/azure-cli/azure/cli/command_modules/security/custom.py index cde9fcc6190..192512e126a 100644 --- a/src/azure-cli/azure/cli/command_modules/security/custom.py +++ b/src/azure-cli/azure/cli/command_modules/security/custom.py @@ -27,10 +27,8 @@ AutomationActionEventHub, AutomationRuleSet, AutomationTriggeringRule) -from azure.mgmt.security.v2020_07_01_preview.models import (RuleResultsInput, RulesResultsInput) from azure.mgmt.security.v2023_01_01.models import (Extension) from azure.cli.core.commands.client_factory import get_subscription_id -from azure.cli.core.azclierror import (MutuallyExclusiveArgumentError) from azure.mgmt.core.tools import resource_id from azure.core.exceptions import HttpResponseError from knack.log import get_logger @@ -464,92 +462,6 @@ def _construct_cosmosdb_resource_id(cmd, resource_group_name, cosmos_db_account_ name=cosmos_db_account_name) -# -------------------------------------------------------------------------------------------- -# Sql Vulnerability Assessment -# -------------------------------------------------------------------------------------------- - - -# pylint: disable=line-too-long -def get_va_sql_scan(client, vm_resource_id, workspace_id, server_name, database_name, scan_id, vm_name=None, agent_id=None, vm_uuid=None): - - va_sql_resource_id = _get_va_sql_resource_id(vm_resource_id, server_name, database_name, vm_name, agent_id, vm_uuid) - return client.get(scan_id, workspace_id, va_sql_resource_id) - - -# pylint: disable=line-too-long -def list_va_sql_scans(client, vm_resource_id, workspace_id, server_name, database_name, vm_name=None, agent_id=None, vm_uuid=None): - - va_sql_resource_id = _get_va_sql_resource_id(vm_resource_id, server_name, database_name, vm_name, agent_id, vm_uuid) - return client.list(workspace_id, va_sql_resource_id) - - -# pylint: disable=line-too-long -def get_va_sql_result(client, vm_resource_id, workspace_id, server_name, database_name, scan_id, rule_id, vm_name=None, agent_id=None, vm_uuid=None): - - va_sql_resource_id = _get_va_sql_resource_id(vm_resource_id, server_name, database_name, vm_name, agent_id, vm_uuid) - return client.get(scan_id, rule_id, workspace_id, va_sql_resource_id) - - -# pylint: disable=line-too-long -def list_va_sql_results(client, vm_resource_id, workspace_id, server_name, database_name, scan_id, vm_name=None, agent_id=None, vm_uuid=None): - - va_sql_resource_id = _get_va_sql_resource_id(vm_resource_id, server_name, database_name, vm_name, agent_id, vm_uuid) - return client.list(scan_id, workspace_id, va_sql_resource_id) - - -# pylint: disable=line-too-long -def get_va_sql_baseline(client, vm_resource_id, workspace_id, server_name, database_name, rule_id, vm_name=None, agent_id=None, vm_uuid=None): - - va_sql_resource_id = _get_va_sql_resource_id(vm_resource_id, server_name, database_name, vm_name, agent_id, vm_uuid) - return client.get(rule_id, workspace_id, va_sql_resource_id) - - -# pylint: disable=line-too-long -def list_va_sql_baseline(client, vm_resource_id, workspace_id, server_name, database_name, vm_name=None, agent_id=None, vm_uuid=None): - - va_sql_resource_id = _get_va_sql_resource_id(vm_resource_id, server_name, database_name, vm_name, agent_id, vm_uuid) - return client.list(workspace_id, va_sql_resource_id) - - -# pylint: disable=line-too-long -def delete_va_sql_baseline(client, vm_resource_id, workspace_id, server_name, database_name, rule_id, vm_name=None, agent_id=None, vm_uuid=None): - - va_sql_resource_id = _get_va_sql_resource_id(vm_resource_id, server_name, database_name, vm_name, agent_id, vm_uuid) - return client.delete(rule_id, workspace_id, va_sql_resource_id) - - -# pylint: disable=line-too-long -def update_va_sql_baseline(client, vm_resource_id, workspace_id, server_name, database_name, rule_id, baseline=None, baseline_latest=False, vm_name=None, agent_id=None, vm_uuid=None): - - va_sql_resource_id = _get_va_sql_resource_id(vm_resource_id, server_name, database_name, vm_name, agent_id, vm_uuid) - if baseline_latest is True and baseline is None: - return client.create_or_update(rule_id, workspace_id, va_sql_resource_id, RuleResultsInput(latest_scan=True)) - if baseline_latest is False and baseline is not None: - return client.create_or_update(rule_id, workspace_id, va_sql_resource_id, RuleResultsInput(results=baseline)) - raise MutuallyExclusiveArgumentError("Baseline can be set upon either provided baseline or latest results") - - -# pylint: disable=line-too-long -def set_va_sql_baseline(client, vm_resource_id, workspace_id, server_name, database_name, baseline=None, baseline_latest=False, vm_name=None, agent_id=None, vm_uuid=None): - - va_sql_resource_id = _get_va_sql_resource_id(vm_resource_id, server_name, database_name, vm_name, agent_id, vm_uuid) - if baseline_latest is True and baseline is None: - return client.add(workspace_id, va_sql_resource_id, RulesResultsInput(latest_scan=True)) - if baseline_latest is False and baseline is not None: - return client.add(workspace_id, va_sql_resource_id, RulesResultsInput(results=baseline)) - raise MutuallyExclusiveArgumentError("Baseline can be set upon either provided baseline or latest results") - - -def _get_va_sql_resource_id(vm_resource_id, server_name, database_name, vm_name, agent_id, vm_uuid): - - if vm_name is None and agent_id is None and vm_uuid is None: - return f'{vm_resource_id}/sqlServers/{server_name}/databases/{database_name}' - if vm_name is not None and agent_id is not None and vm_uuid is not None: - vm_identifier = f'{vm_name}_{agent_id}_{vm_uuid}' - return f'{vm_resource_id}/onPremiseMachines/{vm_identifier}/sqlServers/{server_name}/databases/{database_name}' - raise MutuallyExclusiveArgumentError('Please specify all of (--vm-name, --agent-id, --vm-uuid) for On-Premise resources, or none, other resource types') - - # -------------------------------------------------------------------------------------------- # Security Assessments # -------------------------------------------------------------------------------------------- diff --git a/src/azure-cli/azure/cli/command_modules/security/tests/latest/recordings/test_va_sql_scenario.yaml b/src/azure-cli/azure/cli/command_modules/security/tests/latest/recordings/test_va_sql_scenario.yaml deleted file mode 100644 index 3e388aa5600..00000000000 --- a/src/azure-cli/azure/cli/command_modules/security/tests/latest/recordings/test_va_sql_scenario.yaml +++ /dev/null @@ -1,156 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - vm create - Connection: - - keep-alive - ParameterSetName: - - -l -g -n --admin-username --admin-password --image --size - User-Agent: - - AZURECLI/2.42.0 azsdk-python-azure-mgmt-compute/29.0.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/publishers/MicrosoftSQLServer/artifacttypes/vmimage/offers/SQL2017-WS2016/skus/Enterprise/versions?$top=1&$orderby=name%20desc&api-version=2022-08-01 - response: - body: - string: "[\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"14.1.221108\",\r\n - \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftSQLServer/ArtifactTypes/VMImage/Offers/SQL2017-WS2016/Skus/Enterprise/Versions/14.1.221108\"\r\n - \ }\r\n]" - headers: - cache-control: - - no-cache - content-length: - - '290' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 08 Dec 2022 09:02:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15999,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43999 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - vm create - Connection: - - keep-alive - ParameterSetName: - - -l -g -n --admin-username --admin-password --image --size - User-Agent: - - AZURECLI/2.42.0 azsdk-python-azure-mgmt-compute/29.0.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/publishers/MicrosoftSQLServer/artifacttypes/vmimage/offers/SQL2017-WS2016/skus/Enterprise/versions/14.1.221108?api-version=2022-08-01 - response: - body: - string: "{\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n \"architecture\": - \"x64\",\r\n \"replicaType\": \"Unmanaged\",\r\n \"disallowed\": {\r\n - \ \"vmDiskType\": \"None\"\r\n },\r\n \"automaticOSUpgradeProperties\": - {\r\n \"automaticOSUpgradeSupported\": false\r\n },\r\n \"imageDeprecationStatus\": - {\r\n \"imageState\": \"Active\"\r\n },\r\n \"features\": [\r\n - \ {\r\n \"name\": \"IsAcceleratedNetworkSupported\",\r\n \"value\": - \"True\"\r\n },\r\n {\r\n \"name\": \"DiskControllerTypes\",\r\n - \ \"value\": \"SCSI\"\r\n },\r\n {\r\n \"name\": \"IsHibernateSupported\",\r\n - \ \"value\": \"False\"\r\n }\r\n ],\r\n \"osDiskImage\": - {\r\n \"operatingSystem\": \"Windows\",\r\n \"sizeInGb\": 128,\r\n - \ \"sizeInBytes\": 136367309312\r\n },\r\n \"dataDiskImages\": []\r\n - \ },\r\n \"location\": \"eastus\",\r\n \"name\": \"14.1.221108\",\r\n \"id\": - \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftSQLServer/ArtifactTypes/VMImage/Offers/SQL2017-WS2016/Skus/Enterprise/Versions/14.1.221108\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1052' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 08 Dec 2022 09:02:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMImageFromLocation3Min;12999,Microsoft.Compute/GetVMImageFromLocation30Min;73999 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - vm create - Connection: - - keep-alive - ParameterSetName: - - -l -g -n --admin-username --admin-password --image --size - User-Agent: - - AZURECLI/2.42.0 azsdk-python-azure-mgmt-network/21.0.1 Python/3.10.8 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks?api-version=2022-01-01 - response: - body: - string: '{"value":[]}' - headers: - cache-control: - - no-cache - content-length: - - '12' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 08 Dec 2022 09:02:16 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/security/tests/latest/test_va_sql_scenario.py b/src/azure-cli/azure/cli/command_modules/security/tests/latest/test_va_sql_scenario.py deleted file mode 100644 index 6b713c9fbb2..00000000000 --- a/src/azure-cli/azure/cli/command_modules/security/tests/latest/test_va_sql_scenario.py +++ /dev/null @@ -1,216 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import time -import json -import tempfile -from azure.cli.testsdk import (ScenarioTest, LiveScenarioTest, ResourceGroupPreparer, LogAnalyticsWorkspacePreparer) -from azure.cli.testsdk.base import execute -from azure.cli.core.mock import DummyCli -from azure.cli.testsdk.exceptions import CliTestError -from .preparers import (SqlVirtualMachinePreparer) - - -class VulnerabilityAssessmentForSqlTests(LiveScenarioTest): - @ResourceGroupPreparer(location='eastus') - @SqlVirtualMachinePreparer(location='eastus') - @LogAnalyticsWorkspacePreparer(location='eastus') - def test_va_sql_scenario(self, resource_group, resource_group_location, sqlvm, laworkspace): - - # Use prepared sql virtual machine and log analytics workspace to setup OMS agent with VA management pack - _enable_intelligence_pack(resource_group, laworkspace) - la_workspace_id = _get_log_analytics_workspace_id(resource_group, laworkspace) - la_workspace_key = _get_log_analytics_workspace_key(resource_group, laworkspace) - _set_vm_registry(resource_group, sqlvm) - _install_oms_agent_on_vm(self, sqlvm, resource_group, la_workspace_id, la_workspace_key) - _restart_monitoring_service(resource_group, sqlvm) # Force start scan - time.sleep(60 * 3) # Graceful sleep - - # API parameters - resource_id = _get_resource_id(resource_group, sqlvm) - workspace_id = la_workspace_id - server_name = "MSSQLSERVER" - database_name = "master" - - # Test logic - # Verify scan results arrived - scan_summaries = self.cmd('az security va sql scans list --vm-resource-id {} --workspace-id {} --server-name {} --database-name {}' - .format(resource_id, workspace_id, server_name, database_name)).get_output_in_json() - selected_scan_summary = scan_id = scan_summaries["value"][0] - scan_id = selected_scan_summary["name"] - - scan_summary = self.cmd('az security va sql scans show --vm-resource-id {} --workspace-id {} --server-name {} --database-name {} --scan-id {}' - .format(resource_id, workspace_id, server_name, database_name, scan_id)).get_output_in_json() - self.assertEqual(selected_scan_summary, scan_summary) - - scan_results = self.cmd('az security va sql results list --vm-resource-id {} --workspace-id {} --server-name {} --database-name {} --scan-id {}' - .format(resource_id, workspace_id, server_name, database_name, scan_id)).get_output_in_json() - scan_results_count = len(scan_results["value"]) - selected_scan_results = _get_scans_with_multiple_columns_in_results(scan_results) - selected_scan_result = selected_scan_results[0] - rule_id = selected_scan_result["name"] - - scan_result = self.cmd('az security va sql results show --vm-resource-id {} --workspace-id {} --server-name {} --database-name {} --scan-id {} --rule-id {}' - .format(resource_id, workspace_id, server_name, database_name, scan_id, rule_id)).get_output_in_json() - self.assertEqual(selected_scan_result, scan_result) - - # Verify no baseline exists - _assert_error('az security va sql baseline list --vm-resource-id {} --workspace-id {} --server-name {} --database-name {}' - .format(resource_id, workspace_id, server_name, database_name), error_reason='no baseline set') - _assert_error('az security va sql baseline show --vm-resource-id {} --workspace-id {} --server-name {} --database-name {} --rule-id {}' - .format(resource_id, workspace_id, server_name, database_name, rule_id), error_reason='no baseline set') - - # Set baseline with latest results - baseline_set_result = self.cmd('az security va sql baseline set --vm-resource-id {} --workspace-id {} --server-name {} --database-name {} --latest' - .format(resource_id, workspace_id, server_name, database_name)).get_output_in_json() - baseline_list_result = self.cmd('az security va sql baseline list --vm-resource-id {} --workspace-id {} --server-name {} --database-name {}' - .format(resource_id, workspace_id, server_name, database_name)).get_output_in_json() - self.assertEqual(scan_results_count, len(baseline_list_result["value"])) - self.assertEqual(baseline_set_result["value"], baseline_list_result["value"]) - - selected_baseline = [baseline for baseline in baseline_list_result["value"] if baseline["name"] == rule_id][0] - baseline_show_result = self.cmd('az security va sql baseline show --vm-resource-id {} --workspace-id {} --server-name {} --database-name {} --rule-id {}' - .format(resource_id, workspace_id, server_name, database_name, rule_id)).get_output_in_json() - self.assertEqual(selected_baseline, baseline_show_result) - - # Delete an arbitrary baseline and verify it is deleted - self.cmd('az security va sql baseline delete --vm-resource-id {} --workspace-id {} --server-name {} --database-name {} --rule-id {}' - .format(resource_id, workspace_id, server_name, database_name, rule_id)) - _assert_error('az security va sql baseline show --vm-resource-id {} --workspace-id {} --server-name {} --database-name {} --rule-id {}' - .format(resource_id, workspace_id, server_name, database_name, rule_id), error_reason='no baseline set (baseline deleted)') - - # Update baseline for single rule with latest results - baseline_update_result = self.cmd('az security va sql baseline update --vm-resource-id {} --workspace-id {} --server-name {} --database-name {} --rule-id {} --latest' - .format(resource_id, workspace_id, server_name, database_name, rule_id)).get_output_in_json() - baseline_show_result = self.cmd('az security va sql baseline show --vm-resource-id {} --workspace-id {} --server-name {} --database-name {} --rule-id {}' - .format(resource_id, workspace_id, server_name, database_name, rule_id)).get_output_in_json() - self.assertEqual(baseline_update_result["properties"], baseline_show_result["properties"]) - - # Update baseline for single rule with custom results - baseline_input = _get_single_baseline_input(selected_scan_result) - baseline_update_result = self.cmd('az security va sql baseline update --vm-resource-id {} --workspace-id {} --server-name {} --database-name {} --rule-id {} {}' - .format(resource_id, workspace_id, server_name, database_name, rule_id, baseline_input)).get_output_in_json() - baseline_show_result = self.cmd('az security va sql baseline show --vm-resource-id {} --workspace-id {} --server-name {} --database-name {} --rule-id {}' - .format(resource_id, workspace_id, server_name, database_name, rule_id)).get_output_in_json() - self.assertEqual(baseline_update_result["properties"], baseline_show_result["properties"]) - - # Update baseline for multiple rule with custom results - selected_scan_result_2 = selected_scan_results[1] - rule_id_2 = selected_scan_result_2["name"] - baseline_input = _get_multiple_baseline_input(rule_id, selected_scan_result, rule_id_2, selected_scan_result_2) - baseline_set_result = self.cmd('az security va sql baseline set --vm-resource-id {} --workspace-id {} --server-name {} --database-name {} {}' - .format(resource_id, workspace_id, server_name, database_name, baseline_input)).get_output_in_json() - baseline_list_result = self.cmd('az security va sql baseline list --vm-resource-id {} --workspace-id {} --server-name {} --database-name {}' - .format(resource_id, workspace_id, server_name, database_name)).get_output_in_json() - baseline_show_result = self.cmd('az security va sql baseline show --vm-resource-id {} --workspace-id {} --server-name {} --database-name {} --rule-id {}' - .format(resource_id, workspace_id, server_name, database_name, rule_id)).get_output_in_json() - baseline_show_result_2 = self.cmd('az security va sql baseline show --vm-resource-id {} --workspace-id {} --server-name {} --database-name {} --rule-id {}' - .format(resource_id, workspace_id, server_name, database_name, rule_id_2)).get_output_in_json() - baseline_rule_1 = [baseline for baseline in baseline_list_result["value"] if baseline["name"] == rule_id][0] - baseline_rule_2 = [baseline for baseline in baseline_list_result["value"] if baseline["name"] == rule_id_2][0] - self.assertEqual(baseline_rule_1, baseline_show_result) - self.assertEqual(baseline_rule_2, baseline_show_result_2) - - -def _enable_intelligence_pack(resource_group, workspace_name): - intelligence_pack_name = 'SQLVulnerabilityAssessment' - template = 'az monitor log-analytics workspace pack enable -n {} -g {} --workspace-name {}' - execute(DummyCli(), template.format(intelligence_pack_name, resource_group, workspace_name)) - - -def _set_vm_registry(resource_group, sqlvm): - template = 'az vm run-command invoke --command-id {} --name {} -g {} --scripts \'New-Item -ItemType Directory -Force -Path C:\\Users\\admin123\\Desktop\\Va_Logs\' \ - \'New-Item -ItemType Directory -Force -Path C:\\Users\\admin123\\Desktop\\Setup_Logs\' \ - \'New-Item -Path HKLM:\\Software\\Microsoft\\AzureOperationalInsights\' \ - \'Set-ItemProperty -Path HKLM:\\Software\\Microsoft\\AzureOperationalInsights -Name SqlVulnerabilityAssessment_LogDirectoryPath -Value C:\\Users\\admin123\\Desktop\\Va_Logs\' \ - \'Set-ItemProperty -Path HKLM:\\Software\\Microsoft\\AzureOperationalInsights -Name SqlVulnerabilityAssessment_BypassHashCheck -Value true\' \ - \'Set-ItemProperty -Path HKLM:\\Software\\Microsoft\\AzureOperationalInsights -Name SqlVulnerabilityAssessment_TestMachine -Value true\'' - execute(DummyCli(), template.format('RunPowerShellScript', sqlvm, resource_group)) - - -def _install_oms_agent_on_vm(self, vm_name, resource_group, workspace_id, workspace_key): - public_config_file = _get_config_file('workspaceId', workspace_id) - protected_config_file = _get_config_file('workspaceKey', workspace_key) - self.kwargs.update({ - 'vm': vm_name, - 'oms_publisher': 'Microsoft.EnterpriseCloud.Monitoring', - 'oms_extension': 'MicrosoftMonitoringAgent', - 'oms_version': '1.0', - 'public_config': public_config_file, - 'protected_config': protected_config_file - }) - - self.cmd('vm extension set --vm-name {vm} --resource-group {rg} \ - -n {oms_extension} --publisher {oms_publisher} --version {oms_version} \ - --settings "{public_config}" --protected-settings "{protected_config}" --force-update') - - -def _restart_monitoring_service(resource_group, sqlvm): - template = 'az vm run-command invoke --command-id {} --name {} -g {} --scripts \'Start-Sleep -Seconds 60\' \ - \'Restart-Service HealthService\'' - execute(DummyCli(), template.format('RunPowerShellScript', sqlvm, resource_group)) - - -def _get_log_analytics_workspace_id(resource_group, workspace_name): - template = 'az monitor log-analytics workspace show --resource-group {} --workspace-name {}' - workspace_details = execute(DummyCli(), template.format(resource_group, workspace_name)).get_output_in_json() - return workspace_details["customerId"] - - -def _get_log_analytics_workspace_key(resource_group, workspace_name): - template = 'az monitor log-analytics workspace get-shared-keys --resource-group {} --workspace-name {}' - shared_keys = execute(DummyCli(), template.format(resource_group, workspace_name)).get_output_in_json() - return shared_keys["primarySharedKey"] - - -def _get_config_file(key, value): - config = {} - config[key] = value - _, config_file = tempfile.mkstemp() - with open(config_file, 'w') as outfile: - json.dump(config, outfile) - return config_file - - -def _get_resource_id(resource_group, sqlvm): - resource_group_details = execute(DummyCli(), 'az group show -n {}'.format(resource_group)).get_output_in_json() - resource_group_id = resource_group_details["id"] - return f'{resource_group_id}/providers/Microsoft.Compute/VirtualMachines/{sqlvm}' - - -def _get_scans_with_multiple_columns_in_results(scan_results): - return [scan for scan in scan_results["value"] if _has_multiple_columns(scan["properties"]["queryResults"])] - - -def _has_multiple_columns(query_results): - return len(query_results) > 0 and len(query_results[0]) > 1 - - -def _get_single_baseline_input(scan_result): - columns_count = len(scan_result["properties"]["queryResults"][0]) - two_line_baseline_template = '--baseline {} --baseline {}' - line_template = 'word ' * columns_count - line_template = line_template.rstrip() - return two_line_baseline_template.format(line_template, line_template) - - -def _get_multiple_baseline_input(rule_id, scan_result_1, rule_id_2, scan_result_2): - columns_count_1 = len(scan_result_1["properties"]["queryResults"][0]) - columns_count_2 = len(scan_result_2["properties"]["queryResults"][0]) - line_for_rule_1_template = 'word ' * columns_count_1 - line_for_rule_2_template = 'word ' * columns_count_2 - two_rule_baseline_template = '--baseline rule={} {} --baseline rule={} {}' - return two_rule_baseline_template.format(rule_id, line_for_rule_1_template, rule_id_2, line_for_rule_2_template) - - -def _assert_error(cmd, error_reason): - error_indicated = False - try: - execute(DummyCli(), cmd) - except: - error_indicated = True - finally: - if (not error_indicated): - raise CliTestError('No error raised when expected. ' + error_reason) From c69997420b9882e3bcb3ed973b655c2be2e3186c Mon Sep 17 00:00:00 2001 From: GalGoldi72 Date: Tue, 2 Jun 2026 21:41:25 +0300 Subject: [PATCH 2/7] [Security] az security va sql: Address PR feedback Addresses Copilot review comments on #33482: - `security va sql results show`: Accept both `--rule-id` (preferred, consistent with `baseline` commands) and `--scan-result-id` (alias). Examples updated to use `--rule-id`. - `security va sql baseline add/create/update`: Reject mutually exclusive `--latest-scan` and `--results` arguments with a clear error message, matching the legacy behavior. - `security va sql baseline set`: Re-added as a deprecated alias of `baseline add` for backwards compatibility with the legacy CLI. - `security va sql baseline update`: Behaves as a true upsert -- if no baseline exists yet for the specified rule, an empty instance is initialized so the subsequent PUT creates one (instead of 404). - `security va sql baseline add`: Fixed example to use valid JSON for the `--results` argument. - HISTORY.rst updated to document the rule-id alias, deprecated `set` alias, and upsert behavior of `baseline update`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/azure-cli/HISTORY.rst | 4 ++- .../security/va/sql/baseline/__init__.py | 1 + .../latest/security/va/sql/baseline/_add.py | 11 +++++-- .../security/va/sql/baseline/_create.py | 9 +++++- .../latest/security/va/sql/baseline/_set.py | 29 +++++++++++++++++++ .../security/va/sql/baseline/_update.py | 18 +++++++++++- .../latest/security/va/sql/results/_show.py | 6 ++-- 7 files changed, 70 insertions(+), 8 deletions(-) create mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_set.py diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index afa127e5f3d..f7cd4423f49 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -96,7 +96,9 @@ Release History * `az security va sql`: [BREAKING CHANGE] Replaced hand-authored SQL Vulnerability Assessment commands with atomic aaz-generated commands targeting API version `2026-04-01-preview`. A single `--resource-id` argument now identifies the assessed resource, replacing the previous combination of `--vm-resource-id`, `--workspace-id`, `--server-name`, `--database-name`, `--vm-name`, `--agent-id`, and `--vm-uuid`. Optional `--database-name` is used only for server-level scopes (e.g. `master`). Supported scopes include Azure SQL Server, Azure SQL Managed Instance, Synapse, Azure VM (SQL on VM), and Arc-enabled SQL servers. * `az security va sql`: Add new SQL Vulnerability Assessment settings commands: `create`, `delete`, `show`, `update` for enabling/disabling SQL VA on a resource. -* `az security va sql baseline`: Add `add` (set baseline for all rules), `create` (single-rule baseline), and `update` commands. Remove `set` command (use `add` instead). +* `az security va sql baseline`: Add `add` (set baseline for all rules), `create` (single-rule baseline), and `update` commands. The legacy `set` command is preserved as a deprecated alias of `add`. +* `az security va sql results show`: Accept both `--rule-id` (preferred, consistent with `baseline` commands) and `--scan-result-id` (alias) for the rule identifier. +* `az security va sql baseline update`: Behaves as an upsert. If no baseline exists yet for the specified rule, the command initializes an empty instance and creates it via PUT, matching the legacy command's behavior. * `az security va sql scans`: Add `initiate-scan` command to trigger a vulnerability assessment scan, and `scan-operation-result show` to poll the operation result. * `az security va sql`: All commands are tagged Preview, matching the underlying API version. diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/__init__.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/__init__.py index 1ecbd413f20..4ae1239882f 100644 --- a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/__init__.py +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/__init__.py @@ -13,5 +13,6 @@ from ._create import * from ._delete import * from ._list import * +from ._set import * from ._show import * from ._update import * diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_add.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_add.py index fa034a501bc..0e0d500f779 100644 --- a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_add.py +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_add.py @@ -9,6 +9,7 @@ # flake8: noqa from azure.cli.core.aaz import * +from azure.cli.core.azclierror import MutuallyExclusiveArgumentError @register_command( @@ -22,7 +23,7 @@ class Add(AAZCommand): az security va sql baseline add --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} --latest-scan true :example: Set baseline for multiple rules with explicit results on a SQL DB hosted on an Azure VM. - az security va sql baseline add --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines/{vm} --database-name MyDb --results "{VA1234:[[col1,col2],[col3,col4]],VA5678:[[user1,SELECT]]}" + az security va sql baseline add --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines/{vm} --database-name MyDb --results '{"VA1234":[["col1","col2"],["col3","col4"]],"VA5678":[["user1","SELECT"]]}' :example: Set baseline at the server level using latest scan results (system database 'master'). az security va sql baseline add --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server} --database-name master --latest-scan true @@ -92,7 +93,13 @@ def _execute_operations(self): @register_callback def pre_operations(self): - pass + args = self.ctx.args + if has_value(args.latest_scan) and bool(args.latest_scan) and has_value(args.results): + raise MutuallyExclusiveArgumentError( + "--latest-scan and --results are mutually exclusive. " + "Use --latest-scan to populate the baseline from the most recent scan, " + "or use --results to provide explicit expected results." + ) @register_callback def post_operations(self): diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_create.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_create.py index 64951b74a98..124dce5e51a 100644 --- a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_create.py +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_create.py @@ -9,6 +9,7 @@ # flake8: noqa from azure.cli.core.aaz import * +from azure.cli.core.azclierror import MutuallyExclusiveArgumentError @register_command( @@ -91,7 +92,13 @@ def _execute_operations(self): @register_callback def pre_operations(self): - pass + args = self.ctx.args + if has_value(args.latest_scan) and bool(args.latest_scan) and has_value(args.results): + raise MutuallyExclusiveArgumentError( + "--latest-scan and --results are mutually exclusive. " + "Use --latest-scan to populate the baseline from the most recent scan, " + "or use --results to provide explicit expected results." + ) @register_callback def post_operations(self): diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_set.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_set.py new file mode 100644 index 00000000000..b9c614c7b2d --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_set.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import register_command +from ._add import Add + + +@register_command( + "security va sql baseline set", + is_preview=True, + redirect="security va sql baseline add", +) +class Set(Add): + """Set a list of baseline rules. Will overwrite any previously existing results (for all rules). + + This is a deprecated alias of `az security va sql baseline add`, preserved for backwards + compatibility with the legacy `az security va sql baseline set` command. + + :example: Set baseline for all rules on an Azure SQL database using the latest scan results. + az security va sql baseline set --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} --latest-scan true + """ + + +__all__ = ["Set"] diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_update.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_update.py index b79c119e49e..8bc4a6388e8 100644 --- a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_update.py +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_update.py @@ -9,6 +9,7 @@ # flake8: noqa from azure.cli.core.aaz import * +from azure.cli.core.azclierror import MutuallyExclusiveArgumentError @register_command( @@ -104,7 +105,13 @@ def _execute_operations(self): @register_callback def pre_operations(self): - pass + args = self.ctx.args + if has_value(args.latest_scan) and bool(args.latest_scan) and has_value(args.results): + raise MutuallyExclusiveArgumentError( + "--latest-scan and --results are mutually exclusive. " + "Use --latest-scan to populate the baseline from the most recent scan, " + "or use --results to provide explicit expected results." + ) @register_callback def post_operations(self): @@ -130,6 +137,15 @@ def __call__(self, *args, **kwargs): session = self.client.send_request(request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) + if session.http_response.status_code == 404: + # Upsert semantics: if no baseline exists yet for this rule, + # initialize an empty instance so the subsequent PUT creates one. + self.ctx.set_var( + "instance", + {}, + schema_builder=self._build_schema_on_200 + ) + return return self.on_error(session.http_response) diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/_show.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/_show.py index 910bd87d72a..a4d04bceabf 100644 --- a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/_show.py +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/results/_show.py @@ -19,10 +19,10 @@ class Show(AAZCommand): """Get the scan results of a single rule in a scan record. :example: Show results for rule VA1234 from a given scan id on an Azure SQL database. - az security va sql results show --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} --scan-id Scan_2026-01-01T00-00-00Z --scan-result-id VA1234 + az security va sql results show --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} --scan-id Scan_2026-01-01T00-00-00Z --rule-id VA1234 :example: Show results for a single rule on an Arc-enabled SQL server. - az security va sql results show --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.HybridCompute/machines/{arc} --database-name MyDb --scan-id Scan_2026-01-01T00-00-00Z --scan-result-id VA1234 + az security va sql results show --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.HybridCompute/machines/{arc} --database-name MyDb --scan-id Scan_2026-01-01T00-00-00Z --rule-id VA1234 """ _aaz_info = { @@ -59,7 +59,7 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) _args_schema.scan_result_id = AAZStrArg( - options=["--scan-result-id"], + options=["--rule-id", "--scan-result-id"], help="The rule Id of the results.", required=True, ) From 160a1b033f0a8b6e95a72b54fddb621fcba36468 Mon Sep 17 00:00:00 2001 From: GalGoldi72 Date: Tue, 2 Jun 2026 23:09:30 +0300 Subject: [PATCH 3/7] [Security] Remove `security va sql baseline update` The AAZ-generated `update` command uses the standard GET -> patch instance -> PUT flow. The Microsoft.Security `sqlVulnerabilityAssessments/default/baselineRules` service has an asymmetric request/response shape: PUT accepts only a flat `{ latestScan, results }` body, but GET returns the ARM-canonical `{ properties: { latestScan, results }, ... }` shape. The generic-update flow therefore PUTs a mixed payload that the service rejects with `400 UnsupportedProperties: 'properties'`. Verified directly against the live API: PUT { latestScan: true } -> 200 OK PUT { properties: { latestScan: true } } -> 400 UnsupportedProperties Because `baseline create` is the same PUT endpoint and is a full upsert, removing `update` does not reduce functionality. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../security/va/sql/baseline/__init__.py | 1 - .../security/va/sql/baseline/_update.py | 448 ------------------ 2 files changed, 449 deletions(-) delete mode 100644 src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_update.py diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/__init__.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/__init__.py index 4ae1239882f..fd57879a605 100644 --- a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/__init__.py +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/__init__.py @@ -15,4 +15,3 @@ from ._list import * from ._set import * from ._show import * -from ._update import * diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_update.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_update.py deleted file mode 100644 index 8bc4a6388e8..00000000000 --- a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_update.py +++ /dev/null @@ -1,448 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * -from azure.cli.core.azclierror import MutuallyExclusiveArgumentError - - -@register_command( - "security va sql baseline update", - is_preview=True, -) -class Update(AAZCommand): - """Update a Baseline for a rule in a database. Will overwrite any previously existing results. - - :example: Update a single-rule baseline on an Azure SQL database with the latest scan results. - az security va sql baseline update --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} --rule-id VA1234 --latest-scan true - - :example: Update a single-rule baseline on a SQL DB hosted on an Azure VM with explicit results. - az security va sql baseline update --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines/{vm} --database-name MyDb --rule-id VA1234 --results "[[col1,col2],[col3,col4]]" - """ - - _aaz_info = { - "version": "2026-04-01-preview", - "resources": [ - ["mgmt-plane", "/{resourceid}/providers/microsoft.security/sqlvulnerabilityassessments/default/baselinerules/{}", "2026-04-01-preview"], - ] - } - - AZ_SUPPORT_GENERIC_UPDATE = True - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.resource_id = AAZStrArg( - options=["--resource-id"], - help="The fully qualified Azure Resource manager identifier of the resource.", - required=True, - ) - _args_schema.rule_id = AAZStrArg( - options=["--rule-id"], - help="The rule Id.", - required=True, - ) - _args_schema.database_name = AAZStrArg( - options=["--database-name"], - help="The name of the database to assess. Required when the API is called on the parent resource (e.g., server level) rather than on a specific database resource, since the database name is not part of the resource URI. This is the only way to assess system databases (e.g., master), which cannot be referenced directly in the resource URI.", - ) - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.latest_scan = AAZBoolArg( - options=["--latest-scan"], - arg_group="Resource", - help="Take results from latest scan.", - nullable=True, - ) - _args_schema.results = AAZListArg( - options=["--results"], - arg_group="Resource", - help="Expected results to be inserted into the baseline. Leave this field empty if latestScan == true.", - nullable=True, - ) - - results = cls._args_schema.results - results.Element = AAZListArg( - nullable=True, - ) - - _element = cls._args_schema.results.Element - _element.Element = AAZStrArg( - nullable=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.SqlVulnerabilityAssessmentBaselineRulesGet(ctx=self.ctx)() - self.pre_instance_update(self.ctx.vars.instance) - self.InstanceUpdateByJson(ctx=self.ctx)() - self.InstanceUpdateByGeneric(ctx=self.ctx)() - self.post_instance_update(self.ctx.vars.instance) - self.SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdate(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - args = self.ctx.args - if has_value(args.latest_scan) and bool(args.latest_scan) and has_value(args.results): - raise MutuallyExclusiveArgumentError( - "--latest-scan and --results are mutually exclusive. " - "Use --latest-scan to populate the baseline from the most recent scan, " - "or use --results to provide explicit expected results." - ) - - @register_callback - def post_operations(self): - pass - - @register_callback - def pre_instance_update(self, instance): - pass - - @register_callback - def post_instance_update(self, instance): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class SqlVulnerabilityAssessmentBaselineRulesGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - if session.http_response.status_code == 404: - # Upsert semantics: if no baseline exists yet for this rule, - # initialize an empty instance so the subsequent PUT creates one. - self.ctx.set_var( - "instance", - {}, - schema_builder=self._build_schema_on_200 - ) - return - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "resourceId", self.ctx.args.resource_id, - required=True, - ), - **self.serialize_url_param( - "ruleId", self.ctx.args.rule_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "databaseName", self.ctx.args.database_name, - ), - **self.serialize_query_param( - "api-version", "2026-04-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType() - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.latest_scan = AAZBoolType( - serialized_name="latestScan", - ) - properties.results = AAZListType() - - results = cls._schema_on_200.properties.results - results.Element = AAZListType() - - _element = cls._schema_on_200.properties.results.Element - _element.Element = AAZStrType() - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - class SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdate(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200, 201]: - return self.on_200_201(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", - **self.url_parameters - ) - - @property - def method(self): - return "PUT" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "resourceId", self.ctx.args.resource_id, - required=True, - ), - **self.serialize_url_param( - "ruleId", self.ctx.args.rule_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "databaseName", self.ctx.args.database_name, - ), - **self.serialize_query_param( - "api-version", "2026-04-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Content-Type", "application/json", - ), - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - @property - def content(self): - _content_value, _builder = self.new_content_builder( - self.ctx.args, - value=self.ctx.vars.instance, - ) - - return self.serialize_content(_content_value) - - def on_200_201(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200_201 - ) - - _schema_on_200_201 = None - - @classmethod - def _build_schema_on_200_201(cls): - if cls._schema_on_200_201 is not None: - return cls._schema_on_200_201 - - cls._schema_on_200_201 = AAZObjectType() - - _schema_on_200_201 = cls._schema_on_200_201 - _schema_on_200_201.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.properties = AAZObjectType() - _schema_on_200_201.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200_201.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200_201.properties - properties.latest_scan = AAZBoolType( - serialized_name="latestScan", - ) - properties.results = AAZListType() - - results = cls._schema_on_200_201.properties.results - results.Element = AAZListType() - - _element = cls._schema_on_200_201.properties.results.Element - _element.Element = AAZStrType() - - system_data = cls._schema_on_200_201.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200_201 - - class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): - - def __call__(self, *args, **kwargs): - self._update_instance(self.ctx.vars.instance) - - def _update_instance(self, instance): - _instance_value, _builder = self.new_content_builder( - self.ctx.args, - value=instance, - typ=AAZObjectType - ) - _builder.set_prop("latestScan", AAZBoolType, ".latest_scan") - _builder.set_prop("results", AAZListType, ".results") - - results = _builder.get(".results") - if results is not None: - results.set_elements(AAZListType, ".") - - _elements = _builder.get(".results[]") - if _elements is not None: - _elements.set_elements(AAZStrType, ".") - - return _instance_value - - class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): - - def __call__(self, *args, **kwargs): - self._update_instance_by_generic( - self.ctx.vars.instance, - self.ctx.generic_update_args - ) - - -class _UpdateHelper: - """Helper class for Update""" - - -__all__ = ["Update"] From 038874b481b698104ad0c1b0d47ac96b75052de1 Mon Sep 17 00:00:00 2001 From: GalGoldi72 Date: Wed, 3 Jun 2026 12:15:54 +0300 Subject: [PATCH 4/7] [Security] az security va sql: Add scenario tests for 2026-04-01-preview migration Adds three scenario tests covering the new aaz-generated 'security va sql' commands: * test_security_va_sql_paas_lifecycle: full 17-step PaaS happy path (Azure SQL Server + DB), exercising the --resource-id= URL form. Covers settings (create/show/update/delete), scans (initiate/show/list), baseline (add/create/show/list/delete), and results (list/show via both --rule-id and legacy --scan-result-id aliases). * test_security_va_sql_paas_dbname_form: focused coverage of the --database-name query-string form (--resource-id= --database-name=) for all db-scoped commands (scans, baseline, results). This is the only URL shape that can target system DBs like master. * test_security_va_sql_negative: validator coverage that doesn't need cloud resources (mutual exclusivity of --latest-scan/--results; presence of the deprecated 'baseline set' alias). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...test_security_va_sql_paas_dbname_form.yaml | 2589 ++++++++++++++ .../test_security_va_sql_paas_lifecycle.yaml | 2966 +++++++++++++++++ .../latest/test_security_va_sql_scenario.py | 456 +++ 3 files changed, 6011 insertions(+) create mode 100644 src/azure-cli/azure/cli/command_modules/security/tests/latest/recordings/test_security_va_sql_paas_dbname_form.yaml create mode 100644 src/azure-cli/azure/cli/command_modules/security/tests/latest/recordings/test_security_va_sql_paas_lifecycle.yaml create mode 100644 src/azure-cli/azure/cli/command_modules/security/tests/latest/test_security_va_sql_scenario.py diff --git a/src/azure-cli/azure/cli/command_modules/security/tests/latest/recordings/test_security_va_sql_paas_dbname_form.yaml b/src/azure-cli/azure/cli/command_modules/security/tests/latest/recordings/test_security_va_sql_paas_dbname_form.yaml new file mode 100644 index 00000000000..ea2471596ab --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/tests/latest/recordings/test_security_va_sql_paas_dbname_form.yaml @@ -0,0 +1,2589 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - ad signed-in-user show + Connection: + - keep-alive + User-Agent: + - python/3.12.10 (Windows-11-10.0.26200-SP0) AZURECLI/2.87.0 + method: GET + uri: https://graph.microsoft.com/v1.0/me + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users/$entity","businessPhones":[],"displayName":"Gal + Goldshtein","givenName":"Gal","jobTitle":"SOFTWARE ENGINEER II","mail":"test@example.com","mobilePhone":null,"officeLocation":"HAIFA-25/618","preferredLanguage":null,"surname":"Goldshtein","userPrincipalName":"test@example.com","id":"55210075-c637-4a28-8fac-6606d186eebc"}' + headers: + cache-control: + - no-cache + connection: + - keep-alive + content-length: + - '388' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Wed, 03 Jun 2026 09:05:48 GMT + odata-version: + - '4.0' + request-id: + - 2977c7c0-b2f7-442a-8204-ccdbf93c1835 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Israel Central","Slice":"E","Ring":"2","ScaleUnit":"002","RoleInstance":"TL3PEPF000002B7"}}' + x-ms-resource-unit: + - '1' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - group update + Connection: + - keep-alive + ParameterSetName: + - -n --tags + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_va_sql_dbname_000001?api-version=2024-11-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001","name":"cli_test_va_sql_dbname_000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","test":"test_security_va_sql_paas_dbname_form","date":"2026-06-03T09:05:41Z","module":"security","CreationTime":"2026-06-03T09:05:45.6800855Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '449' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:05:50 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: F752CE81B93645AAA18189565C7F42D0 Ref B: SN4AA2022301051 Ref C: 2026-06-03T09:05:50Z' + status: + code: 200 + message: OK +- request: + body: '{"properties": {}, "location": "eastus", "tags": {"AllowSqlServersWithAllNetworksEnabled": + "true"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - group update + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/json + ParameterSetName: + - -n --tags + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_va_sql_dbname_000001?api-version=2024-11-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001","name":"cli_test_va_sql_dbname_000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"AllowSqlServersWithAllNetworksEnabled":"true","CreationTime":"2026-06-03T09:05:52.0176884Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '357' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:05:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: E9ED35245B274BA1AE2801C181D8DDF9 Ref B: SN4AA2022302025 Ref C: 2026-06-03T09:05:51Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_va_sql_dbname_000001?api-version=2024-11-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001","name":"cli_test_va_sql_dbname_000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"AllowSqlServersWithAllNetworksEnabled":"true","CreationTime":"2026-06-03T09:05:52.0176884Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '357' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:05:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: B6B8800166E8444FB286C7C31677BEF2 Ref B: SN4AA2022303031 Ref C: 2026-06-03T09:05:54Z' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "properties": {"minimalTlsVersion": "1.2", "administrators": + {"principalType": "User", "login": "test@example.com", "sid": "55210075-c637-4a28-8fac-6606d186eebc", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", "azureADOnlyAuthentication": + true}, "createMode": "Normal"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + Content-Length: + - '298' + Content-Type: + - application/json + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002?api-version=2024-11-01-preview + response: + body: + string: '{"operation":"UpsertLogicalServer","startTime":"2026-06-03T09:05:57.337Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/9903ac31-d979-488c-92f5-7f884cc4f134?api-version=2024-11-01-preview&t=639160743574057210&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgY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A0GCSqGSIb3DQEBCwUAA4IBAQAxSvsyw-aQGPuLg3sIv-zDLSqhHgP__v9DGyP7D16rJpNG1JcjpiXpbloqD9RW5Gc_hHWn5Kyr1pRABJrFa-jEt89-FiQdkToF-vvwJOXbryAgZYdS03uFzUGqARs3JMMqCHrVkx6hb9oOxh_3JdEemO_dbhApyOVTfloO4kIRsgJnHI_ImFt8xm3xa9ftB0ARfJAdN_1EHgB2NdOgTvaSljVOnQY6R40lh_Wl8-s3GIhHbNwQOECXegBxeVAUVN5nGxlD8TEqKc_mX-22kBMao71zBz3JWtCING4-QzwrWj9pxmanpqYqiVGf40ZbZZihRkte0KI9zvW53Y2Smcy7&s=gmcMTZn7ekbUz_G7UDnNIu0-wA4MFawIvzAJRaivfkH4-HCAdiy2Dt-6a2t4onWBMqGCCzz-EUG1d0KkvmKU3QT_G23jUPRoks_5VqzykE1iHA9NpN6bfnVqhiUb9ED89lPlAOtSYHRdoWwSzvPgOl2hZcw-YtBhU35H0uhxzPA7KonDmJFqJ_fm4yMRbZlQ0xKZWTr7dOdFg1t4MQChxviZYC7MJw2w1PR4dinCKQEiO5P21p3XTkum7gtXU75juSx1uEw9FCsrkYcOkcTSpbghjK5LRFwQ3mw0jWMwPIItcgqi6XOYBIPN5GLpHu0ubFFax3WY_POAiP2fxLvB4g&h=Bj20ykr_xz_FpT4Ky3QC68MiUxzYLvEf40LfdPScG-s + cache-control: + - no-cache + content-length: + - '74' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:05:56 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/locations/eastus/serverOperationResults/9903ac31-d979-488c-92f5-7f884cc4f134?api-version=2024-11-01-preview&t=639160743574057210&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIF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AA4IBAQAxSvsyw-aQGPuLg3sIv-zDLSqhHgP__v9DGyP7D16rJpNG1JcjpiXpbloqD9RW5Gc_hHWn5Kyr1pRABJrFa-jEt89-FiQdkToF-vvwJOXbryAgZYdS03uFzUGqARs3JMMqCHrVkx6hb9oOxh_3JdEemO_dbhApyOVTfloO4kIRsgJnHI_ImFt8xm3xa9ftB0ARfJAdN_1EHgB2NdOgTvaSljVOnQY6R40lh_Wl8-s3GIhHbNwQOECXegBxeVAUVN5nGxlD8TEqKc_mX-22kBMao71zBz3JWtCING4-QzwrWj9pxmanpqYqiVGf40ZbZZihRkte0KI9zvW53Y2Smcy7&s=sUiI3eyTluvmTeg4Om5O5qEFo5Zcz-Mbupt49p_yKIoOx6eQ3ySKzk_eWDH5MQSQLQCFKkBRHa9-tk5j2GAmAk6eDC1bnLupJ9kixdPsy52PGEsOg9hW2Lo2fUai-jBXzGeSwmBmM83lz3lwRiT5YxKs8cRUjbpyiN5HGY_xis1EAzaQlFj6Uok6xN0NZBNdOaW484isPcNC_Ljg8VresuXLjuvutUCc4jx9ZjSrhu1Mhp_IWVcGfSknfvARYUAc34Dm5Rr6iDdHybBl-O2gaQijDMGflH_MiBpY3EZnjcLqfnc5eVM8Qtbypq0U-D0XD0JxNSkM6WmGFW3Xvt4DQw&h=Um_hkDQ8sbrfAsrw2DAoEeX4EM4R_ejqduqG42kDtck + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/34317d45-cd82-4b18-9cbd-9e51558087b0 + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 3EC0C60DF32045E5806888813BFAD615 Ref B: SN4AA2022305051 Ref C: 2026-06-03T09:05:56Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/9903ac31-d979-488c-92f5-7f884cc4f134?api-version=2024-11-01-preview&t=639160743574057210&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0MTUzOVowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDealc9e2xWlYn0dX5zgxycoyRECfCn-ACb8WxKGmsKAA5yFa8bggPwuauZjSPSntq3xw99b6CFXZ6EM34WjxaWokZKYj8bbRT14WzrQHemPN5KUaI3SFtZidaSdEAzhm7Ha1a74SG8rDZU8qVqbaoCPQk9Iblv0LucrVV5BAMOwvi-5j-7X9vehxsheuxPwrVmGy_WrXI_3Qflmizp5BND_I3p4BIRjEcaQw_EBd3dhAC52EO5bT3FKSdM6N5xgpZvtjHjxRG2WG_8Gh07OrI0Ib0mnTB1_HNhiEw3_VzdnINXV0_Fsm7HMV-qCCkY5pyJIZjVX7L7FFY0PGqcqUKdAgMBAAGjggSSMIIEjjCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBB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ghjK5LRFwQ3mw0jWMwPIItcgqi6XOYBIPN5GLpHu0ubFFax3WY_POAiP2fxLvB4g&h=Bj20ykr_xz_FpT4Ky3QC68MiUxzYLvEf40LfdPScG-s + response: + body: + string: '{"name":"9903ac31-d979-488c-92f5-7f884cc4f134","status":"InProgress","startTime":"2026-06-03T09:05:57.337Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:05:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/6f26d39f-3786-4a21-a1f6-6c16de4daa22 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 9C25E14B7D9B4A188D4D70EC2C7727AF Ref B: SN4AA2022303047 Ref C: 2026-06-03T09:05:59Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/9903ac31-d979-488c-92f5-7f884cc4f134?api-version=2024-11-01-preview&t=639160743574057210&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBID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7D16rJpNG1JcjpiXpbloqD9RW5Gc_hHWn5Kyr1pRABJrFa-jEt89-FiQdkToF-vvwJOXbryAgZYdS03uFzUGqARs3JMMqCHrVkx6hb9oOxh_3JdEemO_dbhApyOVTfloO4kIRsgJnHI_ImFt8xm3xa9ftB0ARfJAdN_1EHgB2NdOgTvaSljVOnQY6R40lh_Wl8-s3GIhHbNwQOECXegBxeVAUVN5nGxlD8TEqKc_mX-22kBMao71zBz3JWtCING4-QzwrWj9pxmanpqYqiVGf40ZbZZihRkte0KI9zvW53Y2Smcy7&s=gmcMTZn7ekbUz_G7UDnNIu0-wA4MFawIvzAJRaivfkH4-HCAdiy2Dt-6a2t4onWBMqGCCzz-EUG1d0KkvmKU3QT_G23jUPRoks_5VqzykE1iHA9NpN6bfnVqhiUb9ED89lPlAOtSYHRdoWwSzvPgOl2hZcw-YtBhU35H0uhxzPA7KonDmJFqJ_fm4yMRbZlQ0xKZWTr7dOdFg1t4MQChxviZYC7MJw2w1PR4dinCKQEiO5P21p3XTkum7gtXU75juSx1uEw9FCsrkYcOkcTSpbghjK5LRFwQ3mw0jWMwPIItcgqi6XOYBIPN5GLpHu0ubFFax3WY_POAiP2fxLvB4g&h=Bj20ykr_xz_FpT4Ky3QC68MiUxzYLvEf40LfdPScG-s + response: + body: + string: '{"name":"9903ac31-d979-488c-92f5-7f884cc4f134","status":"InProgress","startTime":"2026-06-03T09:05:57.337Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:06:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/c4c05d23-ff57-4c9f-9aa5-9351f45f3a04 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 11E851ED0FA243D0936F52F54B3E169A Ref B: SN4AA2022305033 Ref C: 2026-06-03T09:06:02Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/9903ac31-d979-488c-92f5-7f884cc4f134?api-version=2024-11-01-preview&t=639160743574057210&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0MTUzOVowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDealc9e2xWlYn0dX5zgxycoyRECfCn-ACb8WxKGmsKAA5yFa8bggPwuauZjSPSntq3xw99b6CFXZ6EM34WjxaWokZKYj8bbRT14WzrQHemPN5KUaI3SFtZidaSdEAzhm7Ha1a74SG8rDZU8qVqbaoCPQk9Iblv0LucrVV5BAMOwvi-5j-7X9vehxsheuxPwrVmGy_WrXI_3Qflmizp5BND_I3p4BIRjEcaQw_EBd3dhAC52EO5bT3FKSdM6N5xgpZvtjHjxRG2WG_8Gh07OrI0Ib0mnTB1_HNhiEw3_VzdnINXV0_Fsm7HMV-qCCkY5pyJIZj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0xKZWTr7dOdFg1t4MQChxviZYC7MJw2w1PR4dinCKQEiO5P21p3XTkum7gtXU75juSx1uEw9FCsrkYcOkcTSpbghjK5LRFwQ3mw0jWMwPIItcgqi6XOYBIPN5GLpHu0ubFFax3WY_POAiP2fxLvB4g&h=Bj20ykr_xz_FpT4Ky3QC68MiUxzYLvEf40LfdPScG-s + response: + body: + string: '{"name":"9903ac31-d979-488c-92f5-7f884cc4f134","status":"InProgress","startTime":"2026-06-03T09:05:57.337Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:06:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/926f00b4-dd7a-41e9-9daa-1932ddf18a13 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: E4EA88FBEE794FAF8CC5D56D1E9D3923 Ref B: SN4AA2022305053 Ref C: 2026-06-03T09:06:05Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/9903ac31-d979-488c-92f5-7f884cc4f134?api-version=2024-11-01-preview&t=639160743574057210&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhk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jY21lZWFzdHVzMmljYTAxMA0GCSqGSIb3DQEBCwUAA4IBAQAxSvsyw-aQGPuLg3sIv-zDLSqhHgP__v9DGyP7D16rJpNG1JcjpiXpbloqD9RW5Gc_hHWn5Kyr1pRABJrFa-jEt89-FiQdkToF-vvwJOXbryAgZYdS03uFzUGqARs3JMMqCHrVkx6hb9oOxh_3JdEemO_dbhApyOVTfloO4kIRsgJnHI_ImFt8xm3xa9ftB0ARfJAdN_1EHgB2NdOgTvaSljVOnQY6R40lh_Wl8-s3GIhHbNwQOECXegBxeVAUVN5nGxlD8TEqKc_mX-22kBMao71zBz3JWtCING4-QzwrWj9pxmanpqYqiVGf40ZbZZihRkte0KI9zvW53Y2Smcy7&s=gmcMTZn7ekbUz_G7UDnNIu0-wA4MFawIvzAJRaivfkH4-HCAdiy2Dt-6a2t4onWBMqGCCzz-EUG1d0KkvmKU3QT_G23jUPRoks_5VqzykE1iHA9NpN6bfnVqhiUb9ED89lPlAOtSYHRdoWwSzvPgOl2hZcw-YtBhU35H0uhxzPA7KonDmJFqJ_fm4yMRbZlQ0xKZWTr7dOdFg1t4MQChxviZYC7MJw2w1PR4dinCKQEiO5P21p3XTkum7gtXU75juSx1uEw9FCsrkYcOkcTSpbghjK5LRFwQ3mw0jWMwPIItcgqi6XOYBIPN5GLpHu0ubFFax3WY_POAiP2fxLvB4g&h=Bj20ykr_xz_FpT4Ky3QC68MiUxzYLvEf40LfdPScG-s + response: + body: + string: '{"name":"9903ac31-d979-488c-92f5-7f884cc4f134","status":"InProgress","startTime":"2026-06-03T09:05:57.337Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:06:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/f16f983b-16c3-4c77-8eb1-fe4c117edfb0 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: F1503D2B18BC4CACA6ACEF8BDBE5CD3D Ref B: SN4AA2022302009 Ref C: 2026-06-03T09:06:26Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/9903ac31-d979-488c-92f5-7f884cc4f134?api-version=2024-11-01-preview&t=639160743574057210&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0MTUzOVowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDealc9e2xWlYn0dX5zgxycoyRECfCn-ACb8WxKGmsKAA5yFa8bggPwuauZjSPSntq3xw99b6CFXZ6EM34WjxaWokZKYj8bbRT14WzrQHemPN5KUaI3SFtZidaSdEAzhm7Ha1a74SG8rDZU8qVqbaoCPQk9Iblv0LucrVV5BAMOwvi-5j-7X9vehxsheuxPwrVmGy_WrXI_3Qflmizp5BND_I3p4BIRjEcaQw_EBd3dhAC52E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ykE1iHA9NpN6bfnVqhiUb9ED89lPlAOtSYHRdoWwSzvPgOl2hZcw-YtBhU35H0uhxzPA7KonDmJFqJ_fm4yMRbZlQ0xKZWTr7dOdFg1t4MQChxviZYC7MJw2w1PR4dinCKQEiO5P21p3XTkum7gtXU75juSx1uEw9FCsrkYcOkcTSpbghjK5LRFwQ3mw0jWMwPIItcgqi6XOYBIPN5GLpHu0ubFFax3WY_POAiP2fxLvB4g&h=Bj20ykr_xz_FpT4Ky3QC68MiUxzYLvEf40LfdPScG-s + response: + body: + string: '{"name":"9903ac31-d979-488c-92f5-7f884cc4f134","status":"InProgress","startTime":"2026-06-03T09:05:57.337Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:06:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/5a9b4df2-5774-4536-a66c-78062a01c444 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 26E41D975D0D426EB9D1EBDC0F68B9AC Ref B: SN4AA2022304027 Ref C: 2026-06-03T09:06:48Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/9903ac31-d979-488c-92f5-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L2NjbWVlYXN0dXMycGtpLmVhc3R1czIucGtpLmNvcmUud2luZG93cy5uZXQvY2VydGlmaWNhdGVBdXRob3JpdGllcy9jY21lZWFzdHVzMmljYTAxMA0GCSqGSIb3DQEBCwUAA4IBAQAxSvsyw-aQGPuLg3sIv-zDLSqhHgP__v9DGyP7D16rJpNG1JcjpiXpbloqD9RW5Gc_hHWn5Kyr1pRABJrFa-jEt89-FiQdkToF-vvwJOXbryAgZYdS03uFzUGqARs3JMMqCHrVkx6hb9oOxh_3JdEemO_dbhApyOVTfloO4kIRsgJnHI_ImFt8xm3xa9ftB0ARfJAdN_1EHgB2NdOgTvaSljVOnQY6R40lh_Wl8-s3GIhHbNwQOECXegBxeVAUVN5nGxlD8TEqKc_mX-22kBMao71zBz3JWtCING4-QzwrWj9pxmanpqYqiVGf40ZbZZihRkte0KI9zvW53Y2Smcy7&s=gmcMTZn7ekbUz_G7UDnNIu0-wA4MFawIvzAJRaivfkH4-HCAdiy2Dt-6a2t4onWBMqGCCzz-EUG1d0KkvmKU3QT_G23jUPRoks_5VqzykE1iHA9NpN6bfnVqhiUb9ED89lPlAOtSYHRdoWwSzvPgOl2hZcw-YtBhU35H0uhxzPA7KonDmJFqJ_fm4yMRbZlQ0xKZWTr7dOdFg1t4MQChxviZYC7MJw2w1PR4dinCKQEiO5P21p3XTkum7gtXU75juSx1uEw9FCsrkYcOkcTSpbghjK5LRFwQ3mw0jWMwPIItcgqi6XOYBIPN5GLpHu0ubFFax3WY_POAiP2fxLvB4g&h=Bj20ykr_xz_FpT4Ky3QC68MiUxzYLvEf40LfdPScG-s + response: + body: + string: '{"name":"9903ac31-d979-488c-92f5-7f884cc4f134","status":"Succeeded","startTime":"2026-06-03T09:05:57.337Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:07:09 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/228d9e74-399d-4167-ac75-e8ab5fee86b6 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 6EF369492DE94E95AEFF18D21398C61F Ref B: SN4AA2022304035 Ref C: 2026-06-03T09:07:10Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002?api-version=2024-11-01-preview + response: + body: + string: '{"kind":"v12.0","properties":{"administratorLogin":"CloudSAb3494dfd","version":"12.0","state":"Ready","fullyQualifiedDomainName":"vasqlsrv000002.database.windows.net","privateEndpointConnections":[],"minimalTlsVersion":"1.2","publicNetworkAccess":"Enabled","administrators":{"administratorType":"ActiveDirectory","principalType":"User","login":"test@example.com","sid":"55210075-c637-4a28-8fac-6606d186eebc","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","azureADOnlyAuthentication":true},"restrictOutboundNetworkAccess":"Disabled","externalGovernanceStatus":"Disabled","retentionDays":-1},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002","name":"vasqlsrv000002","type":"Microsoft.Sql/servers"}' + headers: + cache-control: + - no-cache + content-length: + - '819' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:07:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: C1EC07856EEA405FBE69EF8BBA60782C Ref B: SN4AA2022304053 Ref C: 2026-06-03T09:07:11Z' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"startIpAddress": "0.0.0.0", "endIpAddress": "0.0.0.0"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server firewall-rule create + Connection: + - keep-alive + Content-Length: + - '72' + Content-Type: + - application/json + ParameterSetName: + - -g --server --name --start-ip-address --end-ip-address + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/firewallRules/AllowAzureServices?api-version=2024-11-01-preview + response: + body: + string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"0.0.0.0"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/firewallRules/AllowAzureServices","name":"AllowAzureServices","type":"Microsoft.Sql/servers/firewallRules"}' + headers: + cache-control: + - no-cache + content-length: + - '325' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:07:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/16c2d33e-686f-49c2-b5a1-bde89b2acab3 + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 5637DB626BF24F04BA7048F615E1BB16 Ref B: SN4AA2022301039 Ref C: 2026-06-03T09:07:15Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002?api-version=2024-11-01-preview + response: + body: + string: '{"kind":"v12.0","properties":{"administratorLogin":"CloudSAb3494dfd","version":"12.0","state":"Ready","fullyQualifiedDomainName":"vasqlsrv000002.database.windows.net","privateEndpointConnections":[],"minimalTlsVersion":"1.2","publicNetworkAccess":"Enabled","administrators":{"administratorType":"ActiveDirectory","principalType":"User","login":"test@example.com","sid":"55210075-c637-4a28-8fac-6606d186eebc","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","azureADOnlyAuthentication":true},"restrictOutboundNetworkAccess":"Disabled","externalGovernanceStatus":"Disabled","retentionDays":-1},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002","name":"vasqlsrv000002","type":"Microsoft.Sql/servers"}' + headers: + cache-control: + - no-cache + content-length: + - '819' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:07:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 7AA54023C0694A3E9F370E46A1479E61 Ref B: SN4AA2022305017 Ref C: 2026-06-03T09:07:17Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002?api-version=2024-11-01-preview + response: + body: + string: '{"kind":"v12.0","properties":{"administratorLogin":"CloudSAb3494dfd","version":"12.0","state":"Ready","fullyQualifiedDomainName":"vasqlsrv000002.database.windows.net","privateEndpointConnections":[],"minimalTlsVersion":"1.2","publicNetworkAccess":"Enabled","administrators":{"administratorType":"ActiveDirectory","principalType":"User","login":"test@example.com","sid":"55210075-c637-4a28-8fac-6606d186eebc","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","azureADOnlyAuthentication":true},"restrictOutboundNetworkAccess":"Disabled","externalGovernanceStatus":"Disabled","retentionDays":-1},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002","name":"vasqlsrv000002","type":"Microsoft.Sql/servers"}' + headers: + cache-control: + - no-cache + content-length: + - '819' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:07:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 940DD927D86545638D8338EF3AA404EF Ref B: SN4AA2022301021 Ref C: 2026-06-03T09:07:18Z' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "sku": {"name": "S0"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + Content-Length: + - '45' + Content-Type: + - application/json + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/databases/vasqldb000003?api-version=2024-11-01-preview + response: + body: + string: '{"operation":"CreateLogicalDatabase","startTime":"2026-06-03T09:07:20.623Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/locations/eastus/databaseAzureAsyncOperation/194ae75f-076d-481b-ad2c-f31d95359fe9?api-version=2024-11-01-preview&t=639160744406958555&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0MTUzOVowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDealc9e2xWlYn0dX5zgxycoyRECfCn-ACb8WxKGmsKAA5yFa8bggPwuauZjSPSntq3xw99b6CFXZ6EM34WjxaWokZKYj8bbRT14WzrQHemPN5KUaI3SFtZidaSdEAzhm7Ha1a74SG8rDZU8qVqbaoCPQk9Iblv0LucrVV5BAMOwvi-5j-7X9vehxsheuxPwrVmGy_WrXI_3Qflmizp5BND_I3p4BIRjEcaQw_EBd3dhAC52EO5bT3FKSdM6N5xgpZ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4JBoXrKdl8OCW3HHkqZQ7exw_lZWkuPZimS6HI7Kydv3qMe1OvbTPmJgeoP35JaawIjSzq4SEP5NpdvrHsQjmNppzgK9FopyWhM1WBHDtOmrxXPOSe6mI5K8x1d-ha_A9qMps70N1tR1F4RJqTzOkBfxIwdKXA18P-3_Xn51b2FJhMPo7sTndefqpnNk7YiJvyHrAj_afl3Oi4LopLw1aHw&h=7I4WiCU94_Zgf3XmpCGoiwpu2kWfpMBYeThgWzTH37I + cache-control: + - no-cache + content-length: + - '76' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:07:20 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/locations/eastus/databaseOperationResults/194ae75f-076d-481b-ad2c-f31d95359fe9?api-version=2024-11-01-preview&t=639160744407271271&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0MTUzOVowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDealc9e2xWlYn0dX5zgxycoyRECfCn-ACb8WxKGmsKAA5yFa8bggPwuauZjSPSntq3xw99b6CFXZ6EM34WjxaWokZKYj8bbRT14WzrQHemPN5KUaI3SFtZidaSdEAzhm7Ha1a74SG8rDZU8qVqbaoCPQk9Iblv0LucrVV5BAMOwvi-5j-7X9vehxsheuxPwrVmGy_WrXI_3Qflmizp5BND_I3p4BIRjEcaQw_EBd3dhAC52EO5bT3FKSdM6N5xgpZvtjHjxRG2WG_8Gh07OrI0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gHmCbzW-gXK7DgXWGmaqIu9OV6OcSe5CLbv2yOf5_lDngbsuY5lVm5YqEiDAraFmyXPN0_HskKibKEQd_qz2AjlXTqLJSmOnh9bMQcsVqimhwwn0gisCWghRs1X7Gc-AjCtUuUBtXDYPqiBOS9aMwOBIYNNjmqKUGY6UcL26dpniOsG56Q574sU9msdR939Q&h=kJI9EHE7AEBviU8l_ZrAQ0skHypMKD7PwsWYsPzakQA + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/cfcae082-7255-4451-a2b8-289c00bbb890 + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: F93366292EC0450ABC67CEC46D8E2D79 Ref B: SN4AA2022301029 Ref C: 2026-06-03T09:07:20Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/locations/eastus/databaseAzureAsyncOperation/194ae75f-076d-481b-ad2c-f31d95359fe9?api-version=2024-11-01-preview&t=639160744406958555&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0MT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ABJrFa-jEt89-FiQdkToF-vvwJOXbryAgZYdS03uFzUGqARs3JMMqCHrVkx6hb9oOxh_3JdEemO_dbhApyOVTfloO4kIRsgJnHI_ImFt8xm3xa9ftB0ARfJAdN_1EHgB2NdOgTvaSljVOnQY6R40lh_Wl8-s3GIhHbNwQOECXegBxeVAUVN5nGxlD8TEqKc_mX-22kBMao71zBz3JWtCING4-QzwrWj9pxmanpqYqiVGf40ZbZZihRkte0KI9zvW53Y2Smcy7&s=rfw1VyMaynwI2BIEylzN3DFoKYOZs0snLExKt_nXNBsNcfj2u667A7a0lJqVuoMxuy-ZXC7Ni5KO2DZGasY3507Y16K-FJId23__2mCuHg61SD1P2KqRf7i8AqrV5xt4JBoXrKdl8OCW3HHkqZQ7exw_lZWkuPZimS6HI7Kydv3qMe1OvbTPmJgeoP35JaawIjSzq4SEP5NpdvrHsQjmNppzgK9FopyWhM1WBHDtOmrxXPOSe6mI5K8x1d-ha_A9qMps70N1tR1F4RJqTzOkBfxIwdKXA18P-3_Xn51b2FJhMPo7sTndefqpnNk7YiJvyHrAj_afl3Oi4LopLw1aHw&h=7I4WiCU94_Zgf3XmpCGoiwpu2kWfpMBYeThgWzTH37I + response: + body: + string: '{"name":"194ae75f-076d-481b-ad2c-f31d95359fe9","status":"InProgress","startTime":"2026-06-03T09:07:20.623Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:07:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/94741331-5c95-4120-8a07-d4fc4afddd73 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 9A34B5087BA3407785E3D9FC09531253 Ref B: SN4AA2022304053 Ref C: 2026-06-03T09:07:22Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/locations/eastus/databaseAzureAsyncOperation/194ae75f-076d-481b-ad2c-f31d95359fe9?api-version=2024-11-01-preview&t=639160744406958555&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0MTUzOVowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDealc9e2xWlYn0dX5zgxycoyRECfCn-ACb8WxKGmsKAA5yFa8bggPwuauZjSPSntq3xw99b6CFXZ6EM34WjxaWokZKYj8bbRT14WzrQHemPN5KUaI3SFtZidaSdEAzhm7Ha1a74SG8rDZU8qVqbaoCPQk9Iblv0LucrVV5BAMOwvi-5j-7X9vehxsheuxPwrVmGy_WrXI_3Qflmizp5BND_I3p4BIRjEcaQw_EBd3dhAC52EO5bT3FKSdM6N5xgpZvtjHjxRG2WG_8Gh07OrI0Ib0mnTB1_HNhiEw3_VzdnINXV0_Fsm7HMV-qCCkY5pyJIZjVX7L7FFY0PGqcqUKdAgMBAAGjggSSMIIEjjCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwY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dKXA18P-3_Xn51b2FJhMPo7sTndefqpnNk7YiJvyHrAj_afl3Oi4LopLw1aHw&h=7I4WiCU94_Zgf3XmpCGoiwpu2kWfpMBYeThgWzTH37I + response: + body: + string: '{"name":"194ae75f-076d-481b-ad2c-f31d95359fe9","status":"InProgress","startTime":"2026-06-03T09:07:20.623Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:07:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/face0713-3585-4ea8-946a-e7a07742e649 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 4FC9B713A6414AB9B562876BFD1032BA Ref B: SN4AA2022302019 Ref C: 2026-06-03T09:07:38Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/locations/eastus/databaseAzureAsyncOperation/194ae75f-076d-481b-ad2c-f31d95359fe9?api-version=2024-11-01-preview&t=639160744406958555&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0M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RABJrFa-jEt89-FiQdkToF-vvwJOXbryAgZYdS03uFzUGqARs3JMMqCHrVkx6hb9oOxh_3JdEemO_dbhApyOVTfloO4kIRsgJnHI_ImFt8xm3xa9ftB0ARfJAdN_1EHgB2NdOgTvaSljVOnQY6R40lh_Wl8-s3GIhHbNwQOECXegBxeVAUVN5nGxlD8TEqKc_mX-22kBMao71zBz3JWtCING4-QzwrWj9pxmanpqYqiVGf40ZbZZihRkte0KI9zvW53Y2Smcy7&s=rfw1VyMaynwI2BIEylzN3DFoKYOZs0snLExKt_nXNBsNcfj2u667A7a0lJqVuoMxuy-ZXC7Ni5KO2DZGasY3507Y16K-FJId23__2mCuHg61SD1P2KqRf7i8AqrV5xt4JBoXrKdl8OCW3HHkqZQ7exw_lZWkuPZimS6HI7Kydv3qMe1OvbTPmJgeoP35JaawIjSzq4SEP5NpdvrHsQjmNppzgK9FopyWhM1WBHDtOmrxXPOSe6mI5K8x1d-ha_A9qMps70N1tR1F4RJqTzOkBfxIwdKXA18P-3_Xn51b2FJhMPo7sTndefqpnNk7YiJvyHrAj_afl3Oi4LopLw1aHw&h=7I4WiCU94_Zgf3XmpCGoiwpu2kWfpMBYeThgWzTH37I + response: + body: + string: '{"name":"194ae75f-076d-481b-ad2c-f31d95359fe9","status":"InProgress","startTime":"2026-06-03T09:07:20.623Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:07:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/f69a61f9-2ce4-43ea-a998-c36c5ebd6a2f + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 3F130BAB4BE34E91AE5A664C045D54B1 Ref B: SN4AA2022304033 Ref C: 2026-06-03T09:07:54Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/locations/eastus/databaseAzureAsyncOperation/194ae75f-076d-481b-ad2c-f31d95359fe9?api-version=2024-11-01-preview&t=639160744406958555&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0MTUzOVowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDealc9e2xWlYn0dX5zgxycoyRECfCn-ACb8WxKGmsKAA5yFa8bggPwuauZjSPSntq3xw99b6CFXZ6EM34WjxaWokZKYj8bbRT14WzrQHemPN5KUaI3SFtZidaSdEAzhm7Ha1a74SG8rDZU8qVqbaoCPQk9Iblv0LucrVV5BAMOwvi-5j-7X9vehxsheuxPwrVmGy_WrXI_3Qflmizp5BND_I3p4BIRjEcaQw_EBd3dhAC52EO5bT3FKSdM6N5xgpZvtjHjxRG2WG_8Gh07OrI0Ib0mnTB1_HNhiEw3_VzdnINXV0_Fsm7HMV-qCCkY5pyJIZjVX7L7FFY0PGqcqUKdAgMBAAGjggSSMIIEjjCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQ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TzOkBfxIwdKXA18P-3_Xn51b2FJhMPo7sTndefqpnNk7YiJvyHrAj_afl3Oi4LopLw1aHw&h=7I4WiCU94_Zgf3XmpCGoiwpu2kWfpMBYeThgWzTH37I + response: + body: + string: '{"name":"194ae75f-076d-481b-ad2c-f31d95359fe9","status":"InProgress","startTime":"2026-06-03T09:07:20.623Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:08:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/cf48fe5a-d0b1-4ee2-a705-c691678a5cd1 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 6087EA28421749BEA9D271D388B5CE31 Ref B: SN4AA2022304021 Ref C: 2026-06-03T09:08:10Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/locations/eastus/databaseAzureAsyncOperation/194ae75f-076d-481b-ad2c-f31d95359fe9?api-version=2024-11-01-preview&t=639160744406958555&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOV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Gc_hHWn5Kyr1pRABJrFa-jEt89-FiQdkToF-vvwJOXbryAgZYdS03uFzUGqARs3JMMqCHrVkx6hb9oOxh_3JdEemO_dbhApyOVTfloO4kIRsgJnHI_ImFt8xm3xa9ftB0ARfJAdN_1EHgB2NdOgTvaSljVOnQY6R40lh_Wl8-s3GIhHbNwQOECXegBxeVAUVN5nGxlD8TEqKc_mX-22kBMao71zBz3JWtCING4-QzwrWj9pxmanpqYqiVGf40ZbZZihRkte0KI9zvW53Y2Smcy7&s=rfw1VyMaynwI2BIEylzN3DFoKYOZs0snLExKt_nXNBsNcfj2u667A7a0lJqVuoMxuy-ZXC7Ni5KO2DZGasY3507Y16K-FJId23__2mCuHg61SD1P2KqRf7i8AqrV5xt4JBoXrKdl8OCW3HHkqZQ7exw_lZWkuPZimS6HI7Kydv3qMe1OvbTPmJgeoP35JaawIjSzq4SEP5NpdvrHsQjmNppzgK9FopyWhM1WBHDtOmrxXPOSe6mI5K8x1d-ha_A9qMps70N1tR1F4RJqTzOkBfxIwdKXA18P-3_Xn51b2FJhMPo7sTndefqpnNk7YiJvyHrAj_afl3Oi4LopLw1aHw&h=7I4WiCU94_Zgf3XmpCGoiwpu2kWfpMBYeThgWzTH37I + response: + body: + string: '{"name":"194ae75f-076d-481b-ad2c-f31d95359fe9","status":"InProgress","startTime":"2026-06-03T09:07:20.623Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:08:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/fd79cdb2-05f3-4e19-b17a-4021fead3ee2 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: BEC1E70AB4654D599845B27EF8953140 Ref B: SN4AA2022301027 Ref C: 2026-06-03T09:08:27Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/locations/eastus/databaseAzureAsyncOperation/194ae75f-076d-481b-ad2c-f31d95359fe9?api-version=2024-11-01-preview&t=639160744406958555&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0MTUzOVowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDealc9e2xWlYn0dX5zgxycoyRECfCn-ACb8WxKGmsKAA5yFa8bggPwuauZjSPSntq3xw99b6CFXZ6EM34WjxaWokZKYj8bbRT14WzrQHemPN5KUaI3SFtZidaSdEAzhm7Ha1a74SG8rDZU8qVqbaoCPQk9Iblv0LucrVV5BAMOwvi-5j-7X9vehxsheuxPwrVmGy_WrXI_3Qflmizp5BND_I3p4BIRjEcaQw_EBd3dhAC52EO5bT3FKSdM6N5xgpZvtjHjxRG2WG_8Gh07OrI0Ib0mnTB1_HNhiEw3_VzdnINXV0_Fsm7HMV-qCCkY5pyJIZjVX7L7FFY0PGqcqUKdAgMBAAGjggSSMIIEjjCBnQYDVR0gBIGVMIGSMAwGCisG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N1tR1F4RJqTzOkBfxIwdKXA18P-3_Xn51b2FJhMPo7sTndefqpnNk7YiJvyHrAj_afl3Oi4LopLw1aHw&h=7I4WiCU94_Zgf3XmpCGoiwpu2kWfpMBYeThgWzTH37I + response: + body: + string: '{"name":"194ae75f-076d-481b-ad2c-f31d95359fe9","status":"Succeeded","startTime":"2026-06-03T09:07:20.623Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:08:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/f42382ac-54a9-48c3-a8ad-12e593ed1d7d + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 696D1C9675FA4167AFB536594BD069F8 Ref B: SN4AA2022301047 Ref C: 2026-06-03T09:08:43Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/databases/vasqldb000003?api-version=2024-11-01-preview + response: + body: + string: '{"sku":{"name":"Standard","tier":"Standard","capacity":10},"kind":"v12.0,user","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":268435456000,"status":"Online","databaseId":"63727115-a51b-4f22-b7f0-62901fd110f8","creationDate":"2026-06-03T09:08:31.633Z","currentServiceObjectiveName":"S0","requestedServiceObjectiveName":"S0","defaultSecondaryLocation":"westus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"readScale":"Disabled","currentSku":{"name":"Standard","tier":"Standard","capacity":10},"currentBackupStorageRedundancy":"Geo","requestedBackupStorageRedundancy":"Geo","maintenanceConfigurationId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default","isLedgerOn":false,"isInfraEncryptionEnabled":false,"availabilityZone":"NoPreference"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/databases/vasqldb000003","name":"vasqldb000003","type":"Microsoft.Sql/servers/databases"}' + headers: + cache-control: + - no-cache + content-length: + - '1129' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:08:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: DB19A57644074DB29600F15103A3E05B Ref B: SN4AA2022301017 Ref C: 2026-06-03T09:08:44Z' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"state": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql create + Connection: + - keep-alive + Content-Length: + - '36' + Content-Type: + - application/json + ParameterSetName: + - --resource-id --state + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default","name":"default","type":"Microsoft.Security/sqlVulnerabilityAssessments","properties":{"creationTime":"2026-06-03T09:08:49.12+00:00","state":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '369' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:08:48 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/5a7aca7e-39d8-44b7-bfa2-a4bc8574e871 + x-ms-ratelimit-remaining-subscription-resource-requests: + - '199' + x-msedge-ref: + - 'Ref A: D59D80373AA742DC8BD9FB07A4AA4A11 Ref B: SN4AA2022302033 Ref C: 2026-06-03T09:08:47Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans initiate-scan + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-id --database-name + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: POST + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/initiateScan?databaseName=vasqldb000003&api-version=2026-04-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 03 Jun 2026 09:08:50 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/fb39c667-d21d-49e6-98cc-4b65b939c0fc?api-version=2026-04-01-preview&databaseName=vasqldb000003&t=639160745315569126&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0MTUzOVowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDealc9e2xWlYn0dX5zgxycoyRECfCn-ACb8WxKGmsKAA5yFa8bggPwuauZjSPSntq3xw99b6CFXZ6EM34WjxaWokZKYj8bbRT14WzrQHemPN5KUaI3SFtZidaSdEAzhm7Ha1a74SG8rDZU8qVqbaoCPQk9Iblv0LucrVV5BAMOwvi-5j-7X9vehxsheuxPwrVmGy_WrXI_3Qflmizp5BND_I3p4BIRjEcaQw_EBd3dhAC52EO5bT3FKSdM6N5xgpZvtjHjxRG2WG_8Gh07OrI0Ib0mnTB1_HNhiEw3_VzdnINXV0_Fsm7HMV-qCCkY5pyJIZjVX7L7FFY0PGqcqUK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GWfTBMjmuFpsiU5iOzcgv5jZF-O91b3XJ-srWy-WWSNHe_IsOLiXMCVUBA4v8sAF8VDVjbqVR8IUOvAQNA17jd2Usj27pt2aAH0rRYYRThUAD-SHlPDt4chzQR1gdDKZdzng&h=uDbV0F3IrjyywT6O-DtC1kjBmCXcXyMlas2b5ljQmsw + pragma: + - no-cache + set-cookie: + - ARRAffinity=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/16dd9ae6-5d87-4a4d-97a1-51a8c5b9f00d + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: F10B3CF150AB4C9D8ECB147F23F8EAC6 Ref B: SN4AA2022302051 Ref C: 2026-06-03T09:08:50Z' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans initiate-scan + Connection: + - keep-alive + ParameterSetName: + - --resource-id --database-name + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/fb39c667-d21d-49e6-98cc-4b65b939c0fc?api-version=2026-04-01-preview&databaseName=vasqldb000003&t=639160745315569126&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0MTUzOVowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDealc9e2xWlYn0dX5zgxycoyRECfCn-ACb8WxKGmsKAA5yFa8bggPwuauZjSPSntq3xw99b6CFXZ6EM34WjxaWokZKYj8bbRT14WzrQHemPN5KUaI3SFtZidaSdEAzhm7Ha1a74SG8rDZU8qVqbaoCPQk9Iblv0LucrVV5BAMOwvi-5j-7X9vehxsheuxPwrVmGy_WrXI_3Qflmizp5BND_I3p4BIRjEcaQw_EBd3dhAC52EO5bT3FKSdM6N5xgpZvtjHjxRG2WG_8Gh07OrI0Ib0mnTB1_HNhiEw3_VzdnINXV0_Fsm7HMV-qCCkY5pyJIZjVX7L7FFY0PGqcqUKdAgMBAAGjggSSMIIEjjCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBSZIRQPs2If06iDFyiGbMnvIxenBzAfBg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XJ0LmNlcjBmBggrBgEFBQcwAoZaaHR0cDovL2NjbWVlYXN0dXMycGtpLmVhc3R1czIucGtpLmNvcmUud2luZG93cy5uZXQvY2VydGlmaWNhdGVBdXRob3JpdGllcy9jY21lZWFzdHVzMmljYTAxMA0GCSqGSIb3DQEBCwUAA4IBAQAxSvsyw-aQGPuLg3sIv-zDLSqhHgP__v9DGyP7D16rJpNG1JcjpiXpbloqD9RW5Gc_hHWn5Kyr1pRABJrFa-jEt89-FiQdkToF-vvwJOXbryAgZYdS03uFzUGqARs3JMMqCHrVkx6hb9oOxh_3JdEemO_dbhApyOVTfloO4kIRsgJnHI_ImFt8xm3xa9ftB0ARfJAdN_1EHgB2NdOgTvaSljVOnQY6R40lh_Wl8-s3GIhHbNwQOECXegBxeVAUVN5nGxlD8TEqKc_mX-22kBMao71zBz3JWtCING4-QzwrWj9pxmanpqYqiVGf40ZbZZihRkte0KI9zvW53Y2Smcy7&s=HFFvZFENndMWZrNCwY4p3H9GvCj_Fc0bJyP9-4X9s9Ea1DonyNc90NN0yJJ9fq81DHYDGWZ3_oArrKouDiBE8vclZYprmzf4iZYs5t7u06kQ9rUS_We9ej-muf-k3o1dJrRWXgKPeeFnkpfok65mQ3rJzZWiYAqNJ35EMIjLJZco4xTHYpoI4cg7N_At-yQEq8K4h8XKHtnFW1FJQ0GWfTBMjmuFpsiU5iOzcgv5jZF-O91b3XJ-srWy-WWSNHe_IsOLiXMCVUBA4v8sAF8VDVjbqVR8IUOvAQNA17jd2Usj27pt2aAH0rRYYRThUAD-SHlPDt4chzQR1gdDKZdzng&h=uDbV0F3IrjyywT6O-DtC1kjBmCXcXyMlas2b5ljQmsw + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/fb39c667-d21d-49e6-98cc-4b65b939c0fc","name":"fb39c667-d21d-49e6-98cc-4b65b939c0fc","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanOperationResults","properties":{"operationId":"fb39c667-d21d-49e6-98cc-4b65b939c0fc","scanStatus":"InProgress"}}' + headers: + cache-control: + - no-cache + content-length: + - '504' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:08:53 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/3b87d1bb-ec52-44c3-8220-46c13d5b2c40 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 76E03F469E4B4AA3A9EF94D74D20485C Ref B: SN4AA2022301045 Ref C: 2026-06-03T09:08:52Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --database-name --scan-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest?databaseName=vasqldb000003&api-version=2026-04-01-preview + response: + body: + string: '{"code":"ResultsAreNotAvailableYet","message":"Results are not available + yet"}' + headers: + cache-control: + - no-cache + content-length: + - '78' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:08:55 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/706de3ba-ca84-463e-b07d-92f4faca68a4 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 1269094E7E084E31AEE555314A74E232 Ref B: SN4AA2022301017 Ref C: 2026-06-03T09:08:54Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --database-name --scan-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest?databaseName=vasqldb000003&api-version=2026-04-01-preview + response: + body: + string: '{"code":"ResultsAreNotAvailableYet","message":"Results are not available + yet"}' + headers: + cache-control: + - no-cache + content-length: + - '78' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:09:17 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/3dfd7b03-e44e-4c95-923e-f49613d175df + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 3480B318764C43D58B8C93FDCEF1BE99 Ref B: SN4AA2022303045 Ref C: 2026-06-03T09:09:16Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --database-name --scan-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest?databaseName=vasqldb000003&api-version=2026-04-01-preview + response: + body: + string: '{"code":"ResultsAreNotAvailableYet","message":"Results are not available + yet"}' + headers: + cache-control: + - no-cache + content-length: + - '78' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:09:38 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/50e8fd83-14a6-46f1-8085-2cfdf88981ac + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 7666AFC34A094E0394ED4DCA0BC1FB32 Ref B: SN4AA2022304025 Ref C: 2026-06-03T09:09:38Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --database-name --scan-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest?databaseName=vasqldb000003&api-version=2026-04-01-preview + response: + body: + string: '{"code":"ResultsAreNotAvailableYet","message":"Results are not available + yet"}' + headers: + cache-control: + - no-cache + content-length: + - '78' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:09:59 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/80c9ac2d-c828-48ea-9684-ea3924a682f9 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 3F5A8030B9F143B28959C19F25A19C74 Ref B: SN4AA2022304051 Ref C: 2026-06-03T09:10:00Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --database-name --scan-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest?databaseName=vasqldb000003&api-version=2026-04-01-preview + response: + body: + string: '{"code":"ResultsAreNotAvailableYet","message":"Results are not available + yet"}' + headers: + cache-control: + - no-cache + content-length: + - '78' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:10:21 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/75de31fc-288d-4884-84e8-81ce9add2765 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 8C95ADA5FF3E4102947FA0FB4BFAF6A0 Ref B: SN4AA2022301011 Ref C: 2026-06-03T09:10:21Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --database-name --scan-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest?databaseName=vasqldb000003&api-version=2026-04-01-preview + response: + body: + string: '{"code":"ResultsAreNotAvailableYet","message":"Results are not available + yet"}' + headers: + cache-control: + - no-cache + content-length: + - '78' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:10:43 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/11b1d44a-be56-4176-b820-48e4c6e60864 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 359A47B5760046E7993386F1E04D5D2A Ref B: SN4AA2022303037 Ref C: 2026-06-03T09:10:43Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --database-name --scan-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest?databaseName=vasqldb000003&api-version=2026-04-01-preview + response: + body: + string: '{"code":"ResultsAreNotAvailableYet","message":"Results are not available + yet"}' + headers: + cache-control: + - no-cache + content-length: + - '78' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:11:05 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/c22e8c3c-6a5e-40d2-8de9-dffc63097a99 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: EE2B62E4AE024269A74C86A96934FFE3 Ref B: SN4AA2022302051 Ref C: 2026-06-03T09:11:05Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --database-name --scan-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest?databaseName=vasqldb000003&api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123","name":"86c24eb1-366b-410b-b6f0-5b2276acd123","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans","properties":{"triggerType":"OnDemand","state":"Failed","server":"vasqlsrv000002","database":"vasqldb000003","sqlVersion":"17.0.9114","startTime":"2026-06-03T09:09:03.3021859+00:00","endTime":"2026-06-03T09:09:06.2608174+00:00","highSeverityFailedRulesCount":0,"mediumSeverityFailedRulesCount":1,"lowSeverityFailedRulesCount":0,"totalPassedRulesCount":23,"totalFailedRulesCount":1,"totalRulesCount":24,"isBaselineApplied":false,"lastScanTime":"2026-06-03T09:09:06.2608174+00:00"}}' + headers: + cache-control: + - no-cache + content-length: + - '898' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:11:26 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/7a8519b3-09ba-40c3-a8b8-901690d2a63f + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: E3E097DBB9764AC7A476DA3E6053B704 Ref B: SN4AA2022301021 Ref C: 2026-06-03T09:11:26Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"latestScan": true}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql baseline add + Connection: + - keep-alive + Content-Length: + - '20' + Content-Type: + - application/json + ParameterSetName: + - --resource-id --database-name --latest-scan + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: POST + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules?databaseName=vasqldb000003&api-version=2026-04-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1143","name":"VA1143","type":"Microsoft.Security/sqlVulnerabilityAssessments/baselineRules","properties":{"results":[["True"]]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1219","name":"VA1219","type":"Microsoft.Security/sqlVulnerabilityAssessments/baselineRules","properties":{"results":[["False"]]}}]}' + headers: + cache-control: + - no-cache + content-length: + - '834' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:11:30 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/4d2a0671-7ca7-4623-b29e-e53d82bada16 + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 26C677F0E1BF4C51839DBD81F88DECD7 Ref B: SN4AA2022303049 Ref C: 2026-06-03T09:11:28Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql baseline list + Connection: + - keep-alive + ParameterSetName: + - --resource-id --database-name + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules?databaseName=vasqldb000003&api-version=2026-04-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1143","name":"VA1143","type":"Microsoft.Security/sqlVulnerabilityAssessments/baselineRules","properties":{"results":[["True"]]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1219","name":"VA1219","type":"Microsoft.Security/sqlVulnerabilityAssessments/baselineRules","properties":{"results":[["False"]]}}]}' + headers: + cache-control: + - no-cache + content-length: + - '834' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:11:31 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/9cbc2ce1-6069-49c2-9afa-82b5e0917003 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: D6ED54BED42B40D2B7C12C4F6FAC6B03 Ref B: SN4AA2022305025 Ref C: 2026-06-03T09:11:31Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql baseline show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --database-name --rule-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1143?databaseName=vasqldb000003&api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1143","name":"VA1143","type":"Microsoft.Security/sqlVulnerabilityAssessments/baselineRules","properties":{"results":[["True"]]}}' + headers: + cache-control: + - no-cache + content-length: + - '410' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:11:32 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/1dbb46d0-bb7b-46a2-92c3-ae4f7fe7e9b3 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 6644E03B5AF04A77B5921F4A9E9378A1 Ref B: SN4AA2022301031 Ref C: 2026-06-03T09:11:33Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql results list + Connection: + - keep-alive + ParameterSetName: + - --resource-id --database-name --scan-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest/scanResults?databaseName=vasqldb000003&api-version=2026-04-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1020","name":"VA1020","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1020","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Remove + the special user GUEST from all roles.","scripts":[],"automated":true,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1020","severity":"High","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"Database + user GUEST should not be a member of any role","description":"The guest user + permits access to a database for any logins that are not mapped to a specific + database user. This rule checks that no database roles are assigned to the + Guest user.","rationale":"Database Roles are the basic building block at the + heart of separation of duties and the principle of least permission. Granting + the Guest user membership to specific roles defeats this purpose.","queryCheck":{"query":"SELECT + roles.[name] AS [Role]\nFROM sys.database_role_members AS drms\nINNER JOIN + sys.database_principals AS roles ON drms.role_principal_id = roles.principal_id\nINNER + JOIN sys.database_principals AS users ON drms.member_principal_id = users.principal_id\nWHERE + users.[name] = ''guest''","expectedResult":[],"columnNames":["Role"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1054","name":"VA1054","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1054","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Revoke + unnecessary permissions granted to PUBLIC","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1054","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"Excessive + permissions should not be granted to PUBLIC role on objects or columns","description":"Every + SQL Server login belongs to the public server role. When a server principal + has not been granted or denied specific permissions on a securable object, + the user inherits the permissions granted to public on that object. This rule + displays a list of all securable objects or columns that are accessible to + all users through the PUBLIC role.","rationale":"Database Roles are the basic + building block at the heart of separation of duties and the principle of least + permission. Granting permissions to principals through the default PUBLIC + role defeats this purpose.","queryCheck":{"query":"SELECT permission_name + AS [Permission]\n ,schema_name AS [Schema]\n ,object_name AS [Object]\nFROM + (\n SELECT objs.TYPE COLLATE database_default AS object_type\n ,schema_name(schema_id) + COLLATE database_default AS schema_name\n ,objs.name COLLATE database_default + AS object_name\n ,user_name(grantor_principal_id) COLLATE database_default + AS grantor_principal_name\n ,permission_name COLLATE database_default + AS permission_name\n ,perms.TYPE COLLATE database_default AS TYPE\n ,STATE + COLLATE database_default AS STATE\n FROM sys.database_permissions AS perms\n + INNER JOIN sys.objects AS objs\n ON objs.object_id = perms.major_id\n WHERE + perms.class = 1 -- objects or columns. Other cases are handled by VA1095 which + has different remediation syntax\n AND grantee_principal_id = DATABASE_PRINCIPAL_ID(''public'')\n AND + [state] IN (\n ''G''\n ,''W''\n )\n AND NOT (\n -- These permissions + are granted by default to public\n permission_name = ''EXECUTE''\n AND + schema_name(schema_id) = ''dbo''\n AND STATE = ''G''\n AND objs.name IN + (\n ''fn_sysdac_is_dac_creator''\n ,''fn_sysdac_is_currentuser_sa''\n ,''fn_sysdac_is_login_creator''\n ,''fn_sysdac_get_username''\n ,''sp_sysdac_ensure_dac_creator''\n ,''sp_sysdac_add_instance''\n ,''sp_sysdac_add_history_entry''\n ,''sp_sysdac_delete_instance''\n ,''sp_sysdac_upgrade_instance''\n ,''sp_sysdac_drop_database''\n ,''sp_sysdac_rename_database''\n ,''sp_sysdac_setreadonly_database''\n ,''sp_sysdac_rollback_committed_step''\n ,''sp_sysdac_update_history_entry''\n ,''sp_sysdac_resolve_pending_entry''\n ,''sp_sysdac_rollback_pending_object''\n ,''sp_sysdac_rollback_all_pending_objects''\n ,''fn_sysdac_get_currentusername''\n )\n OR + permission_name = ''SELECT''\n AND schema_name(schema_id) = ''sys''\n AND + STATE = ''G''\n AND objs.name IN (\n ''firewall_rules''\n ,''database_firewall_rules''\n ,''ipv6_database_firewall_rules''\n ,''bandwidth_usage''\n ,''database_usage''\n ,''external_library_setup_errors''\n ,''sql_feature_restrictions''\n ,''resource_stats''\n ,''elastic_pool_resource_stats''\n ,''dm_database_copies''\n ,''geo_replication_links''\n ,''database_error_stats''\n ,''event_log''\n ,''database_connection_stats''\n )\n OR + permission_name = ''SELECT''\n AND schema_name(schema_id) = ''dbo''\n AND + STATE = ''G''\n AND objs.name IN (\n ''sysdac_instances_internal''\n ,''sysdac_history_internal''\n ,''sysdac_instances''\n )\n )\n\n + ) t","expectedResult":[],"columnNames":["Permission","Schema","Object"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1095","name":"VA1095","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1095","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Revoke + any unnecessary permissions granted to PUBLIC, but avoid changing permissions + granted out of the box.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1095","severity":"Medium","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"Excessive + permissions should not be granted to PUBLIC role","description":"Every SQL + Server login belongs to the public server role. When a server principal has + not been granted or denied specific permissions on a securable object, the + user inherits the permissions granted to public on that object. This displays + a list of all permissions that are granted to the PUBLIC role.","rationale":"Database + Roles are the basic building block at the heart of separation of duties and + the principle of least permission. Granting permissions to principals through + the default PUBLIC role defeats this purpose.","queryCheck":{"query":"SELECT + REPLACE(perms.class_desc, ''_'', '' '') AS [Permission Class]\n ,CASE\n WHEN + perms.class = 0\n THEN db_name() -- database\n WHEN perms.class + = 3\n THEN schema_name(major_id) -- schema\n WHEN perms.class + = 4\n THEN printarget.NAME -- principal\n WHEN perms.class + = 5\n THEN asm.NAME -- assembly\n WHEN perms.class = 6\n THEN + type_name(major_id) -- type\n WHEN perms.class = 10\n THEN + xmlsc.NAME -- xml schema\n WHEN perms.class = 15\n THEN + msgt.NAME COLLATE DATABASE_DEFAULT -- message types\n WHEN perms.class + = 16\n THEN svcc.NAME COLLATE DATABASE_DEFAULT -- service contracts\n WHEN + perms.class = 17\n THEN svcs.NAME COLLATE DATABASE_DEFAULT -- services\n WHEN + perms.class = 18\n THEN rsb.NAME COLLATE DATABASE_DEFAULT -- remote + service bindings\n WHEN perms.class = 19\n THEN rts.NAME + COLLATE DATABASE_DEFAULT -- routes\n WHEN perms.class = 23\n THEN + ftc.NAME -- full text catalog\n WHEN perms.class = 24\n THEN + sym.NAME -- symmetric key\n WHEN perms.class = 25\n THEN + crt.NAME -- certificate\n WHEN perms.class = 26\n THEN asym.NAME + -- assymetric key\n END AS [Object]\n ,perms.permission_name AS + Permission\nFROM sys.database_permissions AS perms\nLEFT JOIN sys.database_principals + AS prin ON perms.grantee_principal_id = prin.principal_id\nLEFT JOIN sys.assemblies + AS asm ON perms.major_id = asm.assembly_id\nLEFT JOIN sys.xml_schema_collections + AS xmlsc ON perms.major_id = xmlsc.xml_collection_id\nLEFT JOIN sys.service_message_types + AS msgt ON perms.major_id = msgt.message_type_id\nLEFT JOIN sys.service_contracts + AS svcc ON perms.major_id = svcc.service_contract_id\nLEFT JOIN sys.services + AS svcs ON perms.major_id = svcs.service_id\nLEFT JOIN sys.remote_service_bindings + AS rsb ON perms.major_id = rsb.remote_service_binding_id\nLEFT JOIN sys.routes + AS rts ON perms.major_id = rts.route_id\nLEFT JOIN sys.database_principals + AS printarget ON perms.major_id = printarget.principal_id\nLEFT JOIN sys.symmetric_keys + AS sym ON perms.major_id = sym.symmetric_key_id\nLEFT JOIN sys.asymmetric_keys + AS asym ON perms.major_id = asym.asymmetric_key_id\nLEFT JOIN sys.certificates + AS crt ON perms.major_id = crt.certificate_id\nLEFT JOIN sys.fulltext_catalogs + AS ftc ON perms.major_id = ftc.fulltext_catalog_id\nWHERE perms.grantee_principal_id + = DATABASE_PRINCIPAL_ID(''public'')\n AND class != 1 -- Object or Columns + (class = 1) are handled by VA1054 and have different remediation syntax\n AND + [state] IN (''G'',''W'')\n AND NOT (\n perms.class = 0\n AND + prin.NAME = ''public''\n AND perms.major_id = 0\n AND perms.minor_id + = 0\n AND permission_name IN (\n ''VIEW ANY COLUMN ENCRYPTION + KEY DEFINITION''\n ,''VIEW ANY COLUMN MASTER KEY DEFINITION''\n )\n )","expectedResult":[],"columnNames":["Permission + Class","Object","Permission"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1096","name":"VA1096","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1096","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Revoke + any unnecessary permissions granted to the special account GUEST","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1096","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"Principal + GUEST should not be granted permissions in the database","description":"Each + database includes a user called GUEST. Permissions granted to GUEST are inherited + by users who have access to the database, but who do not have a user account + in the database. This rule checks that all permissions have been revoked from + the GUEST user.","rationale":"The special user GUEST is used to map any logins + that are not mapped to a specific database user. This can result in principals + gaining access to a database without having been explicitly granted permission + to do so.","queryCheck":{"query":"SELECT perms.permission_name AS [Permission]\nFROM + sys.database_permissions AS perms\nINNER JOIN sys.database_principals AS prin + ON perms.grantee_principal_id = prin.principal_id\nWHERE prin.[name] = ''guest''\n AND + perms.class = 0\n AND [state] IN (''G'', ''W'')","expectedResult":[],"columnNames":["Permission"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1097","name":"VA1097","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1097","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Revoke + any unnecessary permissions granted to the special account GUEST","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1097","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"Principal + GUEST should not be granted permissions on objects or columns","description":"Each + database includes a user called GUEST. Permissions granted to GUEST are inherited + by users who have access to the database, but who do not have a user account + in the database. This rule checks that all permissions have been revoked from + the GUEST user.","rationale":"The special user GUEST is used to map any logins + that are not mapped to a specific database user. This can result in principals + gaining access to a database without having been explicitly granted permission + to do so.","queryCheck":{"query":"SELECT object_schema_name(major_id) AS [Schema]\n ,object_name(major_id) + AS [Object]\n ,perms.permission_name AS [Permission]\nFROM sys.database_permissions + AS perms\nINNER JOIN sys.database_principals AS prin ON perms.grantee_principal_id + = prin.principal_id\nWHERE prin.[name] = ''guest''\n AND perms.class = + 1\n AND [state] IN (''G'', ''W'')","expectedResult":[],"columnNames":["Schema","Object","Permission"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1099","name":"VA1099","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1099","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Revoke + any unnecessary permissions granted to the special account GUEST","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1099","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"GUEST + user should not be granted permissions on database securables","description":"Each + database includes a user called GUEST. Permissions granted to GUEST are inherited + by users who have access to the database, but who do not have a user account + in the database. This rule checks that all permissions have been revoked from + the GUEST user.","rationale":"The special user GUEST is used to map any logins + that are not mapped to a specific database user. This can result in principals + gaining access to a database without having been explicitly granted permission + to do so.","queryCheck":{"query":"DECLARE @guestId INT\n\nSELECT @guestId + = principal_id\nFROM sys.database_principals\nWHERE [name] = ''guest''\n\nSELECT + REPLACE(perms.class_desc, ''_'', '' '') AS [Permission Class]\n ,CASE\n WHEN + perms.class = 3\n THEN schema_name(major_id) -- schema\n WHEN + perms.class = 4\n THEN printarget.name -- principal\n WHEN + perms.class = 5\n THEN asm.name -- assembly\n WHEN perms.class + = 6\n THEN type_name(major_id) -- type\n WHEN perms.class + = 24\n THEN sym.name -- symmetric key\n WHEN perms.class + = 25\n THEN crt.name -- certificate\n END AS [Object]\n ,perms.permission_name + AS Permission\nFROM sys.database_permissions AS perms\nLEFT JOIN sys.database_principals + AS prin ON perms.grantee_principal_id = prin.principal_id\nLEFT JOIN sys.assemblies + AS asm ON perms.major_id = asm.assembly_id\nLEFT JOIN sys.database_principals + AS printarget ON perms.major_id = printarget.principal_id\nLEFT JOIN sys.symmetric_keys + AS sym ON perms.major_id = sym.symmetric_key_id\nLEFT JOIN sys.certificates + AS crt ON perms.major_id = crt.certificate_id\nWHERE grantee_principal_id + = @guestId\n AND class IN (3, 4, 5, 6, 10, 15, 16, 17, 18, 19, 23, 24, + 25, 26)","expectedResult":[],"columnNames":["Permission Class","Object","Permission"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1143","name":"VA1143","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1143","status":"Finding","isTrimmed":false,"queryResults":[["True"]],"remediation":{"description":"Create + users with low privileges to access the DB and any data stored in it with + the appropriate set of permissions.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":{"baseline":{"expectedResults":[["True"]],"updatedTime":"2026-06-03T09:11:29.807488+00:00"},"status":"NonFinding","resultsNotInBaseline":[],"resultsOnlyInBaseline":[]},"ruleMetadata":{"ruleId":"VA1143","severity":"Medium","category":"SurfaceAreaReduction","ruleType":"Binary","title":"''dbo'' + user should not be used for normal service operation","description":"The ''dbo'', + or database owner, is a user account that has implied permissions to perform + all activities in the database. Members of the sysadmin fixed server role + are automatically mapped to dbo. This rule checks that dbo is not the only + account allowed to access this database. Please note that on a newly created + clean database this rule will fail until additional roles are created.","rationale":"A + compromised service that accesses the database with the ''dbo'' user account + will have full control of the database. To avoid this situation, lower privileged + users should be defined for normal service operation, while the ''dbo'' account + should only be used for administrative tasks that require this privilege.","queryCheck":{"query":"IF((SELECT + count(*) from sys.database_principals WHERE principal_id >= 5 AND principal_id + < 16384 ) > 0) SELECT 0 AS [Violation]\nELSE SELECT 1 AS [Violation]","expectedResult":[["0"]],"columnNames":["Violation"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1219","name":"VA1219","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1219","status":"NonFinding","isTrimmed":false,"queryResults":[["False"]],"remediation":{"description":"Enable + TDE on the affected databases","scripts":[],"automated":false,"portalLink":"EnableTDE"},"baselineAdjustedResult":{"baseline":{"expectedResults":[["False"]],"updatedTime":"2026-06-03T09:11:29.8074885+00:00"},"status":"NonFinding","resultsNotInBaseline":[],"resultsOnlyInBaseline":[]},"ruleMetadata":{"ruleId":"VA1219","severity":"Medium","category":"DataProtection","ruleType":"Binary","title":"Transparent + data encryption should be enabled","description":"Transparent data encryption + (TDE) helps to protect the database files against information disclosure by + performing real-time encryption and decryption of the database, associated + backups, and transaction log files ''at rest'', without requiring changes + to the application. This rule checks that TDE is enabled on the database.","rationale":"Transparent + Data Encryption (TDE) protects data ''at rest'', meaning the data and log + files are encrypted when stored on disk.","queryCheck":{"query":"SELECT CASE\n WHEN + EXISTS (\n SELECT * \n FROM sys.dm_database_encryption_keys + \n WHERE db_name(database_id) = db_name() \n AND + (encryption_state != 5 and encryption_state != 1)\n )\n THEN + 0\n ELSE 1\n END AS [Violation]","expectedResult":[["0"]],"columnNames":["Violation"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1221","name":"VA1221","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1221","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Regenerate + the DEK using AES","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1221","severity":"High","category":"DataProtection","ruleType":"NegativeList","title":"Database + Encryption Symmetric Keys should use AES algorithm","description":"SQL Server + uses encryption keys to help secure data, credentials, and connection information + that is stored in a server database. SQL Server has two kinds of keys: symmetric + and asymmetric. This rule checks that Database Encryption Symmetric Keys use + AES algorithm.","rationale":"Weak encryption algorithms may lead to weaknesses + in the data-at-rest protection.","queryCheck":{"query":"SELECT db_name(database_id) + AS [Database]\n ,encryption_state AS [Encryption State]\n ,key_algorithm + AS [Key Algorithm]\n ,key_length AS [Key Length]\n ,encryptor_type AS + [Encryptor Type]\nFROM sys.dm_database_encryption_keys\nWHERE key_algorithm + != ''AES''","expectedResult":[],"columnNames":["Database","Encryption State","Key + Algorithm","Key Length","Encryptor Type"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1223","name":"VA1223","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1223","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Create + new certificates, re-encrypt the data/sign-data using the new key, and drop + the affected keys.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1223","severity":"High","category":"DataProtection","ruleType":"NegativeList","title":"Certificate + keys should use at least 2048 bits","description":"Certificate keys are used + in RSA and other encryption algorithms to protect data. These keys need to + be of enough length to secure the user''s data. This rule checks that the + key''s length is at least 2048 bits for all certificates.","rationale":"Key + length defines the upper-bound on the encryption algorithm''s security. Using + short keys in encryption algorithms may lead to weaknesses in data-at-rest + protection.","queryCheck":{"query":"SELECT name AS [Certificate Name], thumbprint + AS [Thumbprint]\nFROM sys.certificates\nWHERE key_length < 2048","expectedResult":[],"columnNames":["Certificate + Name","Thumbprint"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1224","name":"VA1224","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1224","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Create + new asymmetric Keys, re-encrypt the data/sign-data using the new key, and + drop the affected keys.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1224","severity":"High","category":"DataProtection","ruleType":"NegativeList","title":"Asymmetric + keys'' length should be at least 2048 bits","description":"Database asymmetric + keys are used in many encryption algorithms, these keys need to be of enough + length to secure the encrypted data, this rule checks that all asymmetric + keys stored in the database are of length of at least 2048 bits","rationale":"Key + length defines the upper-bound on the encryption algorithm''s security, using + short keys in encryption algorithms may lead to weaknesses in the data-at-rest + protection","queryCheck":{"query":"SELECT name AS [Key Name], pvt_key_encryption_type_desc + AS [Encryption Type], algorithm_desc AS [Key Algorithm]\nFROM sys.asymmetric_keys\nWHERE + key_length < 2048\nAND NOT (DB_NAME() = ''master'' AND name = ''MS_SQLEnableSystemAssemblyLoadingKey'')","expectedResult":[],"columnNames":["Key + Name","Encryption Type","Key Algorithm"]},"benchmarkReferences":[{"benchmark":"CIS","reference":"v1.0.0-08-11-2017:7.2"},{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1246","name":"VA1246","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1246","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Remove + the application roles. Use users without login as a permission-based replacement","scripts":[],"automated":true,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1246","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"Application + roles should not be used","description":"An application role is a database + principal that enables an application to run with its own user-like permissions. + Application roles enable that only users connecting through a particular application + can access specific data. Application roles are password-based (which applications + typically hardcode) and not permission based, which exposes the database to + approle impersonation by password-guessing. This rule checks that no application + roles are defined in the database.","rationale":"It is important to limit + the possibility of acquiring user-like permissions to the database, and since + application roles are password based, they can lead to impersonation of the + application role via password-guessing.","queryCheck":{"query":"SELECT name + AS [Role]\nFROM sys.database_principals\nWHERE type = ''A''","expectedResult":[],"columnNames":["Role"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1248","name":"VA1248","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1248","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Remove + user defined roles from fixed-database roles","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1248","severity":"Medium","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"User-defined + database roles should not be members of fixed roles","description":"To easily + manage the permissions in your databases, SQL Server provides several roles + which are security principals that group other principals. They are like groups + in the Microsoft Windows operating system. Database accounts and other SQL + Server roles can be added into database-level roles. Each member of a fixed-database + role can add other users to that same role. This rule checks that no user-defined + roles are members of fixed roles","rationale":"Adding user defined database + roles as members of fixed roles could enable unintended privilege escalation, + also finding any metadata indicating that the fixed roles have been modified + is typically a sign of data corruption or signs of somebody corrupting the + metadata in order to hide unusual activity.","queryCheck":{"query":"SELECT + user_name(roles.role_principal_id) AS [Role]\n ,user_name(roles.member_principal_id) + AS [Member]\nFROM sys.database_role_members AS roles\nINNER JOIN sys.database_principals + AS users\nON roles.member_principal_id = users.principal_id\n AND (\n roles.role_principal_id + >= 16384\n AND roles.role_principal_id <= 16393\n )\n AND + users.type = ''R''","expectedResult":[],"columnNames":["Role","Member"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1258","name":"VA1258","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1258","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Keep + track of database owners. Remove unnecessary database owners to avoid granting + excessive permissions or update the baseline to reflect the approved list + of owners.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1258","severity":"High","category":"AuditingAndLogging","ruleType":"BaselineExpected","title":"Database + owners are as expected","description":"Database owners can perform all configuration + and maintenance activities on the database, and can also drop databases in + SQL Server. Tracking database owners is important to avoid having excessive + permission for some principals. Create a baseline which defines the expected + database owners for the database. This rule checks whether the database owners + are as defined in the baseline.","rationale":"Keeping track of database owners + is important to avoid granting excessive permissions.","queryCheck":{"query":"SELECT + USER_NAME(member_principal_id) AS [Owner]\nFROM sys.database_role_members\nWHERE + USER_NAME(role_principal_id) = ''db_owner''\n AND USER_NAME(member_principal_id) + != ''dbo''","expectedResult":[],"columnNames":["Owner"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1281","name":"VA1281","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1281","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Keep + track of role membership and remove unnecessary members from roles to avoid + granting excessive permissions or update baseline to comply with new changes","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1281","severity":"Medium","category":"AuditingAndLogging","ruleType":"BaselineExpected","title":"All + memberships for user-defined roles should be intended","description":"User-defined + roles are security principals defined by the user to group principals to easily + manage permissions. Monitoring these roles is important to avoid having excessive + permissions. Create a baseline which defines expected membership for each + user-defined role. This rule checks whether all memberships for user-defined + roles are as defined in the baseline","rationale":"Keeping track of role memberships + is important to avoid granting excessive permissions","queryCheck":{"query":"SELECT + user_name(role_principal_id) as [Role], user_name(member_principal_id) as + [Member]\nFROM sys.database_role_members\nWHERE role_principal_id NOT IN (16384,16385,16386,16387,16389,16390,16391,16392,16393)","expectedResult":[],"columnNames":["Role","Member"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1282","name":"VA1282","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1282","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Drop + the unnecessary database roles.","scripts":[],"automated":true,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1282","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"Orphan + database roles should be removed","description":"Orphan database roles are + user-defined roles that have no members. It is recommended to eliminate orphaned + roles as they are not needed on the system. This rule checks whether there + are any orphan roles","rationale":"Reduce the attack surface area by eliminating + unnecessary database roles in the system.","queryCheck":{"query":"SELECT name + AS [Role]\nFROM sys.database_principals\nWHERE type = ''R''\nAND principal_id + not in (0,16384,16385,16386,16387,16389,16390,16391,16392,16393)\nAND principal_id + not in ( \n SELECT distinct role_principal_id\n FROM sys.database_role_members\n )","expectedResult":[],"columnNames":["Role"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA2020","name":"VA2020","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA2020","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Revoke + permissions from principals where not needed. It is recommended to have at + most 1 principal granted a specific permission.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA2020","severity":"High","category":"AuthenticationAndAuthorization","ruleType":"BaselineExpected","title":"Minimal + set of principals should be granted ALTER or ALTER ANY USER database-scoped + permissions","description":"Every SQL Server securable has permissions associated + with it that can be granted to principals. Permissions can be scoped at the + server level (assigned to logins and server roles) or at the database level + (assigned to database users and database roles). These rules check that only + a minimal set of principals are granted ALTER or ALTER ANY USER database-scoped + permissions.","rationale":"Developing an application using a least-privileged + user account (LUA) approach is an important part of a defensive, in-depth + strategy for countering security threats. The LUA approach ensures that users + follow the principle of least privilege and always log on with limited user + accounts. Administrative tasks are broken out using fixed server roles, and + the use of the sysadmin fixed server role is severely restricted. Always follow + the principle of least privilege when granting permissions to database users. + Grant the minimum permissions necessary to a user or role to accomplish a + given task. See https://msdn.microsoft.com/en-us/library/bb669084(v=vs.110).aspx.","queryCheck":{"query":"SELECT + perms.class_desc AS [Permission Class]\n ,perms.permission_name AS Permission\n ,type_desc + AS [Principal Type]\n ,prin.name AS Principal\nFROM sys.database_permissions + AS perms\nINNER JOIN sys.database_principals AS prin ON perms.grantee_principal_id + = prin.principal_id\nWHERE permission_name IN (\n ''ALTER''\n ,''ALTER + ANY USER''\n )\n AND user_name(grantee_principal_id) NOT IN (\n ''guest''\n ,''public''\n )\n AND + perms.class = 0\n AND [state] IN (''G'',''W'')\n AND NOT (\n prin.type + = ''S''\n AND prin.name = ''dbo''\n AND prin.authentication_type + = 1\n AND prin.owning_principal_id IS NULL\n )","expectedResult":[],"columnNames":["Permission + Class","Permission","Principal Type","Principal"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA2033","name":"VA2033","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA2033","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Revoke + permissions from principals where not needed. It is recommended to have at + most 1 principal granted a specific permission.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA2033","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"BaselineExpected","title":"Minimal + set of principals should be granted EXECUTE permission on objects or columns","description":"This + rule checks which principals are granted EXECUTE permission on objects or + columns to ensure this permission is granted to a minimal set of principals. + Every SQL Server securable has permissions associated with it that can be + granted to principals.\nPermissions can be scoped at the server level (assigned + to logins and server roles) or at the database level (assigned to database + users, database roles or application roles). The EXECUTE permission applies + to both stored procedures and scalar functions, which can be used in computed + columns.","rationale":"Developing an application using a least-privileged + user account (LUA) approach is an important part of a defensive, in-depth + strategy for countering security threats. The LUA approach ensures that users + follow the principle of least privilege and always log on with limited user + accounts. Administrative tasks are broken out using fixed server roles, and + the use of the sysadmin fixed server role is severely restricted. Always follow + the principle of least privilege when granting permissions to database users. + Grant the minimum permissions necessary to a user or role to accomplish a + given task. See https://msdn.microsoft.com/en-us/library/bb669084(v=vs.110).aspx.","queryCheck":{"query":"SELECT + perms.class_desc AS [Permission Class]\n ,object_schema_name(major_id) + AS [Schema]\n ,object_name(major_id) AS [Object]\n ,perms.permission_name + AS [Permission]\n ,type_desc AS [Principal Type]\n ,prin.name AS [Principal]\nFROM + sys.database_permissions AS perms\nINNER JOIN sys.database_principals AS prin + ON perms.grantee_principal_id = prin.principal_id\nWHERE permission_name IN + (''EXECUTE'')\n AND grantee_principal_id NOT IN (\n SELECT principal_id\n FROM + sys.database_principals\n WHERE name IN (''guest'', ''public'')\n )\n AND + perms.class = 1\n AND [state] IN (''G'', ''W'')","expectedResult":[],"columnNames":["Permission + Class","Schema","Object","Permission","Principal Type","Principal"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/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 each database-level firewall rule does not grant access + to more than 255 IP addresses.","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 AS [Firewall Rule Name]\n ,start_ip_address AS [Start Address]\n ,end_ip_address + AS [End 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-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA2064","name":"VA2064","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA2064","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Evaluate + each of the database-level firewall rules. Remove any rules that grant unnecessary + access and set the rest as a baseline. Deviations from the baseline will be + identified and brought to your attention in subsequent scans.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA2064","severity":"High","category":"SurfaceAreaReduction","ruleType":"BaselineExpected","title":"Database-level + firewall rules should be tracked and maintained at a strict minimum","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 enumerates all the database-level firewall rules so that any changes + made to them can be identified and addressed.","rationale":"Firewall rules + should be strictly configured to allow access only to client computers that + have a valid need to connect to the database. Any superfluous entries in the + firewall may pose a threat by allowing an unauthorized source access to your + database.","queryCheck":{"query":"SELECT name AS [Firewall Rule Name]\n ,start_ip_address + AS [Start Address]\n ,end_ip_address AS [End Address]\nFROM sys.database_firewall_rules","expectedResult":[],"columnNames":["Firewall + Rule Name","Start Address","End Address"]},"benchmarkReferences":[]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA2108","name":"VA2108","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA2108","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Remove + members who should not have access to the database role","scripts":[],"automated":true,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA2108","severity":"High","category":"AuthenticationAndAuthorization","ruleType":"BaselineExpected","title":"Minimal + set of principals should be members of fixed high impact database roles","description":"SQL + Server provides roles to help manage the permissions. Roles are security principals + that group other principals. Database-level roles are database-wide in their + permission scope. This rule checks that a minimal set of principals are members + of the fixed database roles.","rationale":"Fixed database roles may have administrative + permissions on the system. Following the principle of least privilege, it + is important to minimize membership in fixed database roles and keep a baseline + of these memberships. See https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles + for additional information on database roles.","queryCheck":{"query":"SELECT + user_name(sr.member_principal_id) AS [Principal]\n ,user_name(sr.role_principal_id) + AS [Role]\n ,type_desc AS [Principal Type]\n ,authentication_type_desc + AS [Authentication Type]\nFROM sys.database_role_members AS sr\nINNER JOIN + sys.database_principals AS sp ON sp.principal_id = sr.member_principal_id\nWHERE + sr.role_principal_id IN (\n user_id(''bulkadmin''),\n user_id(''db_accessadmin''),\n user_id(''db_securityadmin''),\n user_id(''db_ddladmin''),\n user_id(''db_backupoperator''))\n OR + (sr.role_principal_id = user_id(''db_owner'')\n AND sr.member_principal_id + <> user_id(''dbo''))","expectedResult":[],"columnNames":["Principal","Role","Principal + Type","Authentication Type"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA2109","name":"VA2109","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA2109","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Remove + members who should not have access to the database role","scripts":[],"automated":true,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA2109","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"BaselineExpected","title":"Minimal + set of principals should be members of fixed low impact database roles","description":"SQL + Server provides roles to help manage the permissions. Roles are security principals + that group other principals. Database-level roles are database-wide in their + permission scope. This rule checks that a minimal set of principals are members + of the fixed database roles.","rationale":"Fixed database roles may have administrative + permissions on the system. Following the principle of least privilege, it + is important to minimize membership in fixed database roles and keep a baseline + of these memberships. See https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles + for additional information on database roles.","queryCheck":{"query":"SELECT + user_name(sr.member_principal_id) as [Principal]\n ,user_name(sr.role_principal_id) + as [Role]\n ,type_desc as [Principal Type]\n ,authentication_type_desc + as [Authentication Type]\nFROM sys.database_role_members AS sr\nINNER JOIN + sys.database_principals AS sp ON sp.principal_id = sr.member_principal_id\nWHERE + sr.role_principal_id IN (\n user_id(''db_datareader'')\n ,user_id(''db_datawriter'')\n ,user_id(''db_denydatareader'')\n ,user_id(''db_denydatawriter'')\n )","expectedResult":[],"columnNames":["Principal","Role","Principal + Type","Authentication Type"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA2129","name":"VA2129","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA2129","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Baseline + or remove the signature from the modules ","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA2129","severity":"High","category":"AuthenticationAndAuthorization","ruleType":"BaselineExpected","title":"Changes + to signed modules should be authorized","description":"You can sign a stored + procedure, function or trigger with a certificate or an asymmetric key. This + is designed for scenarios when permissions cannot be inherited through ownership + chaining or when the ownership chain is broken, such as dynamic SQL. This + rule checks for changes made to signed modules which could be an indication + of malicious use.","rationale":"Changes made to the contents of a signed module + or to the certificate or asymmetric key that is used to sign it, as well as + the introduction of new signed modules could be an an indication of an attack. + Setting the known signed modules as a baseline allows you to easily detect + changes made, and to evaluate whether the changes are intended.","queryCheck":{"query":"SELECT + \n QUOTENAME(sc.name) + ''.'' + QUOTENAME(oj.name) AS [Module]\n ,IIF(ct.certificate_id + IS NOT NULL, ct.name, ak.name) AS [Signing Object]\n ,dp.name AS [Signing + Object Owner]\n ,cp.thumbprint AS [Signing Object Thumbprint]\n ,oj.modify_date + AS [Last Definition Modify Date]\n ,IIF(ct.certificate_id IS NOT NULL, + ''CERTIFICATE'', ''ASYMMETRIC KEY'') AS [Signing Object Type]\nFROM \n sys.crypt_properties + AS cp\n INNER JOIN sys.objects AS oj ON cp.major_id = oj.object_id\n INNER + JOIN sys.schemas AS sc ON oj.schema_id = sc.schema_id\n INNER JOIN sys.sql_modules + AS md ON md.object_id = cp.major_id\n LEFT OUTER JOIN sys.certificates + AS ct ON cp.thumbprint = ct.thumbprint\n LEFT OUTER JOIN sys.asymmetric_keys + AS ak ON cp.thumbprint = ak.thumbprint\n LEFT OUTER JOIN sys.database_principals + AS dp ON (ct.sid = dp.sid OR ak.sid = dp.sid)\nWHERE \n oj.type IN (''P'',''FN'',''TR'')\n AND + cp.class_desc = ''OBJECT_OR_COLUMN''\n AND oj.is_ms_shipped = 0","expectedResult":[],"columnNames":["Module","Signing + Object","Signing Object Owner","Signing Object Thumbprint","Last Definition + Modify Date","Signing Object Type"]},"benchmarkReferences":[{"benchmark":"CIS","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA2130","name":"VA2130","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA2130","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Revoke + unnecessary access granted to users. Add the rest to the baseline. ","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA2130","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"BaselineExpected","title":"Track + all users with access to the database","description":"This check tracks all + users with access to a database. Make sure that these users are authorized + according to their current role in the organization. ","rationale":"Performing + a User Access Review helps identify accounts that were added to the server + maliciously and dormant accounts.","queryCheck":{"query":"WITH UsersAndRoles + (principal_name, sid, type) AS \n(\n SELECT DISTINCT prin.name, prin.sid, + prin.type \n FROM sys.database_principals prin \n INNER JOIN ( SELECT + *\n FROM sys.database_permissions\n WHERE + type = ''CO'' \n AND state IN (''G'', ''W'')\n ) + perm \n ON perm.grantee_principal_id = prin.principal_id \n WHERE + prin.type IN (''S'', ''X'', ''R'', ''E'', ''G'')\n UNION ALL\n SELECT + \n user_name(rls.member_principal_id), prin.sid, prin.type\n FROM + \n UsersAndRoles cte\n INNER JOIN sys.database_role_members + rls\n ON user_name(rls.role_principal_id) = cte.principal_name\n INNER + JOIN sys.database_principals prin\n ON rls.member_principal_id + = prin.principal_id\n WHERE cte.type = ''R''\n),\nUsers (database_user, + sid) AS\n(\n SELECT principal_name, sid\n FROM UsersAndRoles\n WHERE + type IN (''S'', ''X'', ''E'', ''G'')\n AND principal_name != ''dbo''\n)\nSELECT + DISTINCT database_user AS [User], sid AS [SID]\n FROM Users\n WHERE + sid != 0x01","expectedResult":[],"columnNames":["User","SID"]},"benchmarkReferences":[{"benchmark":"SOX","reference":null}]}}}]}' + headers: + cache-control: + - no-cache + content-length: + - '56483' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:11:35 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/f711ed98-a002-4073-8183-f58a99e8ea84 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 6C3997EA06204217A34FB92052B443D3 Ref B: SN4AA2022302049 Ref C: 2026-06-03T09:11:34Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql results show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --database-name --scan-id --rule-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest/scanResults/VA1143?databaseName=vasqldb000003&api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_dbname_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/86c24eb1-366b-410b-b6f0-5b2276acd123/scanResults/VA1143","name":"VA1143","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1143","status":"Finding","isTrimmed":false,"queryResults":[["True"]],"remediation":{"description":"Create + users with low privileges to access the DB and any data stored in it with + the appropriate set of permissions.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":{"baseline":{"expectedResults":[["True"]],"updatedTime":"2026-06-03T09:11:29.807488+00:00"},"status":"NonFinding","resultsNotInBaseline":[],"resultsOnlyInBaseline":[]},"ruleMetadata":{"ruleId":"VA1143","severity":"Medium","category":"SurfaceAreaReduction","ruleType":"Binary","title":"''dbo'' + user should not be used for normal service operation","description":"The ''dbo'', + or database owner, is a user account that has implied permissions to perform + all activities in the database. Members of the sysadmin fixed server role + are automatically mapped to dbo. This rule checks that dbo is not the only + account allowed to access this database. Please note that on a newly created + clean database this rule will fail until additional roles are created.","rationale":"A + compromised service that accesses the database with the ''dbo'' user account + will have full control of the database. To avoid this situation, lower privileged + users should be defined for normal service operation, while the ''dbo'' account + should only be used for administrative tasks that require this privilege.","queryCheck":{"query":"IF((SELECT + count(*) from sys.database_principals WHERE principal_id >= 5 AND principal_id + < 16384 ) > 0) SELECT 0 AS [Violation]\nELSE SELECT 1 AS [Violation]","expectedResult":[["0"]],"columnNames":["Violation"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}}' + headers: + cache-control: + - no-cache + content-length: + - '2111' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:11:37 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/19cd28a6-08c8-4987-afed-d0440ec0180c + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: D289F93283AE4ED6BB8023124F360F13 Ref B: SN4AA2022302017 Ref C: 2026-06-03T09:11:37Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql baseline delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-id --database-name --rule-id --yes + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: DELETE + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1143?databaseName=vasqldb000003&api-version=2026-04-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 03 Jun 2026 09:11:39 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/9262fc5f-55a9-43f3-a8be-3c6ec8fd4d54 + x-ms-ratelimit-remaining-subscription-deletes: + - '799' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '11999' + x-msedge-ref: + - 'Ref A: 43B50E742BDE4645BD0A9080A885E125 Ref B: SN4AA2022304049 Ref C: 2026-06-03T09:11:39Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-id --yes + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: DELETE + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_dbname_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default?api-version=2026-04-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 03 Jun 2026 09:11:42 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/4f3e6ee2-798d-4a82-a85d-e1f04f5b58ea + x-ms-ratelimit-remaining-subscription-deletes: + - '799' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '11999' + x-msedge-ref: + - 'Ref A: 6ABDB63C841148A8B897A818D13B8276 Ref B: SN4AA2022301045 Ref C: 2026-06-03T09:11:41Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/security/tests/latest/recordings/test_security_va_sql_paas_lifecycle.yaml b/src/azure-cli/azure/cli/command_modules/security/tests/latest/recordings/test_security_va_sql_paas_lifecycle.yaml new file mode 100644 index 00000000000..212d5df1b48 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/tests/latest/recordings/test_security_va_sql_paas_lifecycle.yaml @@ -0,0 +1,2966 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - ad signed-in-user show + Connection: + - keep-alive + User-Agent: + - python/3.12.10 (Windows-11-10.0.26200-SP0) AZURECLI/2.87.0 + method: GET + uri: https://graph.microsoft.com/v1.0/me + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users/$entity","businessPhones":[],"displayName":"Gal + Goldshtein","givenName":"Gal","jobTitle":"SOFTWARE ENGINEER II","mail":"test@example.com","mobilePhone":null,"officeLocation":"HAIFA-25/618","preferredLanguage":null,"surname":"Goldshtein","userPrincipalName":"test@example.com","id":"55210075-c637-4a28-8fac-6606d186eebc"}' + headers: + cache-control: + - no-cache + connection: + - keep-alive + content-length: + - '388' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Wed, 03 Jun 2026 08:54:30 GMT + odata-version: + - '4.0' + request-id: + - 4d4806c5-b0dc-4498-9137-e5939a9759c8 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Israel Central","Slice":"E","Ring":"2","ScaleUnit":"001","RoleInstance":"TL2PEPF00000691"}}' + x-ms-resource-unit: + - '1' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - group update + Connection: + - keep-alive + ParameterSetName: + - -n --tags + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_va_sql_paas_000001?api-version=2024-11-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001","name":"cli_test_va_sql_paas_000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","test":"test_security_va_sql_paas_lifecycle","date":"2026-06-03T08:54:22Z","module":"security","CreationTime":"2026-06-03T08:54:26.2290595Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '443' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:54:32 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 5685895FD615401680DFD26FA0BC36A4 Ref B: SN4AA2022301047 Ref C: 2026-06-03T08:54:32Z' + status: + code: 200 + message: OK +- request: + body: '{"properties": {}, "location": "eastus", "tags": {"AllowSqlServersWithAllNetworksEnabled": + "true"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - group update + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/json + ParameterSetName: + - -n --tags + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_va_sql_paas_000001?api-version=2024-11-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001","name":"cli_test_va_sql_paas_000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"AllowSqlServersWithAllNetworksEnabled":"true","CreationTime":"2026-06-03T08:54:34.1910888Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '353' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:54:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 1CD71DE9B01247F9826CB1562A578A24 Ref B: SN4AA2022301051 Ref C: 2026-06-03T08:54:34Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_va_sql_paas_000001?api-version=2024-11-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001","name":"cli_test_va_sql_paas_000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"AllowSqlServersWithAllNetworksEnabled":"true","CreationTime":"2026-06-03T08:54:34.1910888Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '353' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:54:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 3D5DBA0FF76F42ED80A4850280789251 Ref B: SN4AA2022304045 Ref C: 2026-06-03T08:54:36Z' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "properties": {"minimalTlsVersion": "1.2", "administrators": + {"principalType": "User", "login": "test@example.com", "sid": "55210075-c637-4a28-8fac-6606d186eebc", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", "azureADOnlyAuthentication": + true}, "createMode": "Normal"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + Content-Length: + - '298' + Content-Type: + - application/json + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002?api-version=2024-11-01-preview + response: + body: + string: '{"operation":"UpsertLogicalServer","startTime":"2026-06-03T08:54:38.537Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/ba01be50-e637-42a8-bc12-898936237474?api-version=2024-11-01-preview&t=639160736787031417&c=MIIHlTCCBn2gAwIBAgIRAPJcAXyj4PVuWaPsZt01Ea8wDQYJKoZIhvcNAQELBQAwNjE0MDIGA1UEAxMrQ0NNRSBHMSBUTFMgUlNBIDIwNDggU0hBMjU2IDIwNDkgV1VTMiBDQSAwMTAeFw0yNjA0MTMxMDI3MjdaFw0yNjEwMDgxNjI3MjdaMEAxPjA8BgNVBAMTNWFzeW5jb3BlcmF0aW9uc2lnbmluZ2NlcnRpZmljYXRlLm1hbmFnZW1lbnQuYXp1cmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvGh44O6OT9eV5zBoE7LVtpq9r87ylQlFliZM7nTFJS6yTj-Ehw3wVWNvnoX-mNFNhmSwdl67kN8W7qk2b-xaDQGvIByXgc0l_A0_66drbjOLw0cVSofjs2VuaxmZRXhJFvM-pt3sXePdevW81JLjMk1YjICdX1r66KxgNYw9bCx-F6txnRsnbEUxeVuuTSII1T4pd9kSGMoM0XsK6OuAWsqAD44880TL7KnfxAAzvx4vR90NSV3y0uLJa8HaKT-yziXCH7CgXY0sGB68jGkpbM3IU2ZOoV259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qxp3iDaPfBJf3Dj1mbYPEf0rpTd6iCWvkM5byNg24GYaVLfI31ZbuaXi8Ibg1J9DHwgJpoJe0BFXf9ZXL0YUa4NL-2FNEm1aRc0pjUIvSRwhPL_mCkR4EBQF2najKnEJMlG4Xj-o4UVTOQqBicPzuCT0SyvvsaCJtEl_7UubVXQfSPDC5yaGqg&h=BKndteTJfljFp5ZjEYGQjM14t8-aRtcWY7TMXNSeOOM + cache-control: + - no-cache + content-length: + - '74' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:54:38 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/locations/eastus/serverOperationResults/ba01be50-e637-42a8-bc12-898936237474?api-version=2024-11-01-preview&t=639160736787031417&c=MIIHlTCCBn2gAwIBAgIRAPJcAXyj4PVuWaPsZt01Ea8wDQYJKoZIhvcNAQELBQAwNjE0MDIGA1UEAxMrQ0NNRSBHMSBUTFMgUlNBIDIwNDggU0hBMjU2IDIwNDkgV1VTMiBDQSAwMTAeFw0yNjA0MTMxMDI3MjdaFw0yNjEwMDgxNjI3MjdaMEAxPjA8BgNVBAMTNWFzeW5jb3BlcmF0aW9uc2lnbmluZ2NlcnRpZmljYXRlLm1hbmFnZW1lbnQuYXp1cmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvGh44O6OT9eV5zBoE7LVtpq9r87ylQlFliZM7nTFJS6yTj-Ehw3wVWNvnoX-mNFNhmSwdl67kN8W7qk2b-xaDQGvIByXgc0l_A0_66drbjOLw0cVSofjs2VuaxmZRXhJFvM-pt3sXePdevW81JLjMk1YjICdX1r66KxgNYw9bCx-F6txnRsnbEUxeVuuTSII1T4pd9kSGMoM0XsK6OuAWsqAD44880TL7KnfxAAzvx4vR90NSV3y0uLJa8HaKT-yziXCH7CgXY0sGB68jGkpbM3IU2ZOoV259sHfU5b9LA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OgvRqvncYLVe-zsxuGC4O_oC5Zqe2-kUsSfsjjppKCqPMjb2kRxZxVvuKVilVhsIh850Qz__YDTPxG6eZwcFGl06BlMCMdhpXqlX3DNM2BfiCRmuJQIZj93ruZw6ujUhHWtzljz-8yTg_2M4oh00nD0hvtC4eXxe3PusKR33edg&h=hXo2hHbI8TlRs0jrfa3DEbmx-oGBk5EkLYlijmO2KHo + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/southcentralus/d063cb4b-197c-4412-8c73-c61abc7046c6 + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: D8570A91413642AD992690DC6A6D03D6 Ref B: SN4AA2022302039 Ref C: 2026-06-03T08:54:37Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/ba01be50-e637-42a8-bc12-898936237474?api-version=2024-11-01-preview&t=639160736787031417&c=MIIHlTCCBn2gAwIBAgIRAPJcAXyj4PVuWaPsZt01Ea8wDQYJKoZIhvcNAQELBQAwNjE0MDIGA1UEAxMrQ0NNRSBHMSBUTFMgUlNBIDIwNDggU0hBMjU2IDIwNDkgV1VTMiBDQSAwMTAeFw0yNjA0MTMxMDI3MjdaFw0y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Lks5cPaFQwJhg3L5V1bsM5ZXEPy95fL7WHprXALxsLOSFbQBHXan_PGzM8uR9YuYncRSDnWjShzs9tbd9T0Q67l77KYnEN9Hd0eLLkAPXn2AZVICXD1p0uIWNRLn1zDuKStSoEt2WiHS5Yt--0O_iZ77Bdk_aJ83VwOt8SKlGc74nyEIqYek4f2bSDaw99S97Zm10aCosKcDSLj7j7TNKhKPcgpic_bQq12NL8Nlh0jxmzIbSLV3LIjmpBqH1257FEVU4DUx_nJAP03fEg&s=sWtufGk9V3HdQCyU7mOtIo1OpQ2FAwIL6wzYcsXzp0PKVHlKyGdUCxvgYBSWtr4obEU_PA7saAQ81Fpjf3dK03_2XFsXhQXZmRRSJpV7Tet6yWokfN_z6EO4KIxYijH1GPKJavO7Ge8uhmV8QB5731YZyGryoFgUqxp3iDaPfBJf3Dj1mbYPEf0rpTd6iCWvkM5byNg24GYaVLfI31ZbuaXi8Ibg1J9DHwgJpoJe0BFXf9ZXL0YUa4NL-2FNEm1aRc0pjUIvSRwhPL_mCkR4EBQF2najKnEJMlG4Xj-o4UVTOQqBicPzuCT0SyvvsaCJtEl_7UubVXQfSPDC5yaGqg&h=BKndteTJfljFp5ZjEYGQjM14t8-aRtcWY7TMXNSeOOM + response: + body: + string: '{"name":"ba01be50-e637-42a8-bc12-898936237474","status":"InProgress","startTime":"2026-06-03T08:54:38.537Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:54:40 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/be024d5c-9aa9-4efb-b1d1-8095c1c9cd34 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 5B72C4ADA5074280BBD5F6EDF5905F5D Ref B: SN4AA2022304011 Ref C: 2026-06-03T08:54:40Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/ba01be50-e637-42a8-bc12-898936237474?api-version=2024-11-01-preview&t=639160736787031417&c=MIIHlTCCBn2gAwIBAgIRAPJcAXyj4PVuWaPsZt01Ea8wDQYJKoZIhvcNAQELBQAwNjE0MDIGA1UEAxMrQ0NNRSBHMSBUTFMgUlNBIDIwNDggU0hBMjU2IDIwNDkgV1VTMiBDQSAwMTAeFw0yNjA0MTMxMDI3MjdaFw0yNjEwMDgxNjI3MjdaMEAxPjA8BgNVBAMTNWFzeW5jb3BlcmF0aW9uc2lnbmluZ2NlcnRpZmljYXRlLm1hbmFnZW1lbnQuYXp1cmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvGh44O6OT9eV5zBoE7LVtpq9r87ylQlFliZM7nTFJS6yTj-Ehw3wVWNvnoX-mNFNhmSwdl67kN8W7qk2b-xaDQGvIByXgc0l_A0_66drbjOLw0cVSofjs2VuaxmZRXhJFvM-pt3sXePdevW81JLjMk1YjICdX1r66KxgNYw9bCx-F6txnRsnbEUxeVuuTSII1T4pd9kSGMoM0XsK6OuAWsqAD44880TL7KnfxAAzvx4vR90NSV3y0uLJa8HaKT-yziXCH7CgXY0sGB68jGkpbM3IU2ZOoV259sHfU5b9LAPFIMS11xuvr6G4i-bYfmc-Yd9iBvPW4J94HCylLRHU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ZbuaXi8Ibg1J9DHwgJpoJe0BFXf9ZXL0YUa4NL-2FNEm1aRc0pjUIvSRwhPL_mCkR4EBQF2najKnEJMlG4Xj-o4UVTOQqBicPzuCT0SyvvsaCJtEl_7UubVXQfSPDC5yaGqg&h=BKndteTJfljFp5ZjEYGQjM14t8-aRtcWY7TMXNSeOOM + response: + body: + string: '{"name":"ba01be50-e637-42a8-bc12-898936237474","status":"InProgress","startTime":"2026-06-03T08:54:38.537Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:54:41 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/23f895cb-6f95-4a0d-a719-427f2637c0b4 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 25E2B4C336FD488EA99F50B9EAEDABD8 Ref B: SN4AA2022302021 Ref C: 2026-06-03T08:54:42Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/ba01be50-e637-42a8-bc12-898936237474?api-version=2024-11-01-preview&t=639160736787031417&c=MIIHlTCCBn2gAwIBAgIRAPJcAXyj4PVuWaPsZt01Ea8wDQYJKoZIhvcNAQELBQAwNjE0M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Y2EwMTANBgkqhkiG9w0BAQsFAAOCAQEAdA_pc38CxGkQIQwsCCkLD0bJLoyzIBBC9aOoZt_62ikFeWcKd4MODmGv5o67rlzoqG9qLks5cPaFQwJhg3L5V1bsM5ZXEPy95fL7WHprXALxsLOSFbQBHXan_PGzM8uR9YuYncRSDnWjShzs9tbd9T0Q67l77KYnEN9Hd0eLLkAPXn2AZVICXD1p0uIWNRLn1zDuKStSoEt2WiHS5Yt--0O_iZ77Bdk_aJ83VwOt8SKlGc74nyEIqYek4f2bSDaw99S97Zm10aCosKcDSLj7j7TNKhKPcgpic_bQq12NL8Nlh0jxmzIbSLV3LIjmpBqH1257FEVU4DUx_nJAP03fEg&s=sWtufGk9V3HdQCyU7mOtIo1OpQ2FAwIL6wzYcsXzp0PKVHlKyGdUCxvgYBSWtr4obEU_PA7saAQ81Fpjf3dK03_2XFsXhQXZmRRSJpV7Tet6yWokfN_z6EO4KIxYijH1GPKJavO7Ge8uhmV8QB5731YZyGryoFgUqxp3iDaPfBJf3Dj1mbYPEf0rpTd6iCWvkM5byNg24GYaVLfI31ZbuaXi8Ibg1J9DHwgJpoJe0BFXf9ZXL0YUa4NL-2FNEm1aRc0pjUIvSRwhPL_mCkR4EBQF2najKnEJMlG4Xj-o4UVTOQqBicPzuCT0SyvvsaCJtEl_7UubVXQfSPDC5yaGqg&h=BKndteTJfljFp5ZjEYGQjM14t8-aRtcWY7TMXNSeOOM + response: + body: + string: '{"name":"ba01be50-e637-42a8-bc12-898936237474","status":"InProgress","startTime":"2026-06-03T08:54:38.537Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:54:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/eb39449b-4903-4963-b1b5-6e95fc4de15d + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: CB930DBC93704454A7D6221E4E182976 Ref B: SN4AA2022303025 Ref C: 2026-06-03T08:54:44Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/ba01be50-e637-42a8-bc12-898936237474?api-version=2024-11-01-preview&t=639160736787031417&c=MIIHlTCCBn2gAwIBAgIRAPJcAXyj4PVuWaPsZt01Ea8wDQYJKoZIhvcNAQELBQAwNjE0MDIGA1UEAxMrQ0NNRSBHMSBUTFMgUlNBIDIwNDggU0hBMjU2IDIwNDkgV1VTMiBDQSAwMTAeFw0yNjA0MTMxMDI3MjdaFw0yNjEwMDgxNjI3MjdaMEAxPjA8BgNVBAMTNWFzeW5jb3BlcmF0aW9uc2lnbmluZ2NlcnRpZmljYXRlLm1hbmFnZW1lbnQuYXp1cmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvGh44O6OT9eV5zBoE7LVtpq9r87ylQlFliZM7nTFJS6yTj-Ehw3wVWNvnoX-mNFNhmSwdl67kN8W7qk2b-xaDQGvIByXgc0l_A0_66drbjOLw0cVSofjs2VuaxmZRXhJFvM-pt3sXePdevW81JLjMk1YjICdX1r66KxgNYw9bCx-F6txnRsnbEUxeVuuTSII1T4pd9kSGMoM0XsK6OuAWsqAD44880TL7KnfxAAzvx4vR90NSV3y0uLJa8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KIxYijH1GPKJavO7Ge8uhmV8QB5731YZyGryoFgUqxp3iDaPfBJf3Dj1mbYPEf0rpTd6iCWvkM5byNg24GYaVLfI31ZbuaXi8Ibg1J9DHwgJpoJe0BFXf9ZXL0YUa4NL-2FNEm1aRc0pjUIvSRwhPL_mCkR4EBQF2najKnEJMlG4Xj-o4UVTOQqBicPzuCT0SyvvsaCJtEl_7UubVXQfSPDC5yaGqg&h=BKndteTJfljFp5ZjEYGQjM14t8-aRtcWY7TMXNSeOOM + response: + body: + string: '{"name":"ba01be50-e637-42a8-bc12-898936237474","status":"InProgress","startTime":"2026-06-03T08:54:38.537Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:55:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/b03b8464-5f78-4987-8d56-18bc8ecda122 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 3411BA2A43204925940CF546819C3132 Ref B: SN4AA2022305049 Ref C: 2026-06-03T08:55:06Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/ba01be50-e637-42a8-bc12-898936237474?api-version=2024-11-01-preview&t=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N0dXMyLnBraS5jb3JlLndpbmRvd3MubmV0L2NlcnRpZmljYXRlQXV0aG9yaXRpZXMvY2NtZXdlc3R1czJpY2EwMTANBgkqhkiG9w0BAQsFAAOCAQEAdA_pc38CxGkQIQwsCCkLD0bJLoyzIBBC9aOoZt_62ikFeWcKd4MODmGv5o67rlzoqG9qLks5cPaFQwJhg3L5V1bsM5ZXEPy95fL7WHprXALxsLOSFbQBHXan_PGzM8uR9YuYncRSDnWjShzs9tbd9T0Q67l77KYnEN9Hd0eLLkAPXn2AZVICXD1p0uIWNRLn1zDuKStSoEt2WiHS5Yt--0O_iZ77Bdk_aJ83VwOt8SKlGc74nyEIqYek4f2bSDaw99S97Zm10aCosKcDSLj7j7TNKhKPcgpic_bQq12NL8Nlh0jxmzIbSLV3LIjmpBqH1257FEVU4DUx_nJAP03fEg&s=sWtufGk9V3HdQCyU7mOtIo1OpQ2FAwIL6wzYcsXzp0PKVHlKyGdUCxvgYBSWtr4obEU_PA7saAQ81Fpjf3dK03_2XFsXhQXZmRRSJpV7Tet6yWokfN_z6EO4KIxYijH1GPKJavO7Ge8uhmV8QB5731YZyGryoFgUqxp3iDaPfBJf3Dj1mbYPEf0rpTd6iCWvkM5byNg24GYaVLfI31ZbuaXi8Ibg1J9DHwgJpoJe0BFXf9ZXL0YUa4NL-2FNEm1aRc0pjUIvSRwhPL_mCkR4EBQF2najKnEJMlG4Xj-o4UVTOQqBicPzuCT0SyvvsaCJtEl_7UubVXQfSPDC5yaGqg&h=BKndteTJfljFp5ZjEYGQjM14t8-aRtcWY7TMXNSeOOM + response: + body: + string: '{"name":"ba01be50-e637-42a8-bc12-898936237474","status":"InProgress","startTime":"2026-06-03T08:54:38.537Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:55:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/f6fc909e-e4d3-4201-bfae-ae6db117c0bd + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 734B27FAA4074CD59EEE57BCB07DC4C4 Ref B: SN4AA2022303011 Ref C: 2026-06-03T08:55:27Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/ba01be50-e637-42a8-bc12-898936237474?api-version=2024-11-01-preview&t=639160736787031417&c=MIIHlTCCBn2gAwIBAgIRAPJcAXyj4PVuWaPsZt01Ea8wDQYJKoZIhvcNAQELBQAwNjE0MDIGA1UEAxMrQ0NNRSBHMSBUTFMgUlNBIDIwNDggU0hBMjU2IDIwNDkgV1VTMiBDQSAwMTAeFw0yNjA0MTMxMDI3MjdaFw0yNjEwMDgxNjI3MjdaMEAxPjA8BgNVBAMTNWFzeW5jb3BlcmF0aW9uc2lnbmluZ2NlcnRpZmljYXRlLm1hbmFnZW1lbnQuYXp1cmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvGh44O6OT9eV5zBoE7LVtpq9r87ylQlFliZM7nTFJS6yTj-Ehw3wVWNvnoX-mNFNhmSwdl67kN8W7qk2b-xaDQGvIByXgc0l_A0_66drbjOLw0cVSofjs2VuaxmZRXhJFvM-pt3sXePdevW81JLjMk1YjICdX1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6wzYcsXzp0PKVHlKyGdUCxvgYBSWtr4obEU_PA7saAQ81Fpjf3dK03_2XFsXhQXZmRRSJpV7Tet6yWokfN_z6EO4KIxYijH1GPKJavO7Ge8uhmV8QB5731YZyGryoFgUqxp3iDaPfBJf3Dj1mbYPEf0rpTd6iCWvkM5byNg24GYaVLfI31ZbuaXi8Ibg1J9DHwgJpoJe0BFXf9ZXL0YUa4NL-2FNEm1aRc0pjUIvSRwhPL_mCkR4EBQF2najKnEJMlG4Xj-o4UVTOQqBicPzuCT0SyvvsaCJtEl_7UubVXQfSPDC5yaGqg&h=BKndteTJfljFp5ZjEYGQjM14t8-aRtcWY7TMXNSeOOM + response: + body: + string: '{"name":"ba01be50-e637-42a8-bc12-898936237474","status":"Succeeded","startTime":"2026-06-03T08:54:38.537Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:55:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/dcc5d58d-d0e8-49f3-becf-11e7736505ac + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 2B5F00786B1348C0A39E63CF17A4C7C4 Ref B: SN4AA2022301035 Ref C: 2026-06-03T08:55:48Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -g -n --enable-ad-only-auth --external-admin-principal-type --external-admin-name + --external-admin-sid + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002?api-version=2024-11-01-preview + response: + body: + string: '{"kind":"v12.0","properties":{"administratorLogin":"CloudSAb52f0d0f","version":"12.0","state":"Ready","fullyQualifiedDomainName":"vasqlsrv000002.database.windows.net","privateEndpointConnections":[],"minimalTlsVersion":"1.2","publicNetworkAccess":"Enabled","administrators":{"administratorType":"ActiveDirectory","principalType":"User","login":"test@example.com","sid":"55210075-c637-4a28-8fac-6606d186eebc","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","azureADOnlyAuthentication":true},"restrictOutboundNetworkAccess":"Disabled","externalGovernanceStatus":"Disabled","retentionDays":-1},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002","name":"vasqlsrv000002","type":"Microsoft.Sql/servers"}' + headers: + cache-control: + - no-cache + content-length: + - '817' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:55:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 3A898C0361CA48F9A5B61BBD0F05EB31 Ref B: SN4AA2022301017 Ref C: 2026-06-03T08:55:49Z' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"startIpAddress": "0.0.0.0", "endIpAddress": "0.0.0.0"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server firewall-rule create + Connection: + - keep-alive + Content-Length: + - '72' + Content-Type: + - application/json + ParameterSetName: + - -g --server --name --start-ip-address --end-ip-address + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/firewallRules/AllowAzureServices?api-version=2024-11-01-preview + response: + body: + string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"0.0.0.0"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/firewallRules/AllowAzureServices","name":"AllowAzureServices","type":"Microsoft.Sql/servers/firewallRules"}' + headers: + cache-control: + - no-cache + content-length: + - '323' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:55:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/ced0c7dd-c97f-418c-be2b-bc5bdb215012 + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 44669E647E974FE3BBE9E17746A72D1F Ref B: SN4AA2022305039 Ref C: 2026-06-03T08:55:50Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002?api-version=2024-11-01-preview + response: + body: + string: '{"kind":"v12.0","properties":{"administratorLogin":"CloudSAb52f0d0f","version":"12.0","state":"Ready","fullyQualifiedDomainName":"vasqlsrv000002.database.windows.net","privateEndpointConnections":[],"minimalTlsVersion":"1.2","publicNetworkAccess":"Enabled","administrators":{"administratorType":"ActiveDirectory","principalType":"User","login":"test@example.com","sid":"55210075-c637-4a28-8fac-6606d186eebc","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","azureADOnlyAuthentication":true},"restrictOutboundNetworkAccess":"Disabled","externalGovernanceStatus":"Disabled","retentionDays":-1},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002","name":"vasqlsrv000002","type":"Microsoft.Sql/servers"}' + headers: + cache-control: + - no-cache + content-length: + - '817' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:55:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 5F43AEE5FF16405798BF75D2105A0646 Ref B: SN4AA2022305049 Ref C: 2026-06-03T08:55:53Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002?api-version=2024-11-01-preview + response: + body: + string: '{"kind":"v12.0","properties":{"administratorLogin":"CloudSAb52f0d0f","version":"12.0","state":"Ready","fullyQualifiedDomainName":"vasqlsrv000002.database.windows.net","privateEndpointConnections":[],"minimalTlsVersion":"1.2","publicNetworkAccess":"Enabled","administrators":{"administratorType":"ActiveDirectory","principalType":"User","login":"test@example.com","sid":"55210075-c637-4a28-8fac-6606d186eebc","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","azureADOnlyAuthentication":true},"restrictOutboundNetworkAccess":"Disabled","externalGovernanceStatus":"Disabled","retentionDays":-1},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002","name":"vasqlsrv000002","type":"Microsoft.Sql/servers"}' + headers: + cache-control: + - no-cache + content-length: + - '817' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:55:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: FADA0A42AE554685AF5E4AE6DD7D55B6 Ref B: SN4AA2022301031 Ref C: 2026-06-03T08:55:54Z' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "sku": {"name": "S0"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + Content-Length: + - '45' + Content-Type: + - application/json + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/databases/vasqldb000003?api-version=2024-11-01-preview + response: + body: + string: '{"operation":"CreateLogicalDatabase","startTime":"2026-06-03T08:55:55.397Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/locations/eastus/databaseAzureAsyncOperation/57bb0429-52fc-4ac7-8299-4adfff319650?api-version=2024-11-01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LmVhc3R1czIucGtpLmNvcmUud2luZG93cy5uZXQvY2VydGlmaWNhdGVBdXRob3JpdGllcy9jY21lZWFzdHVzMmljYTAxMA0GCSqGSIb3DQEBCwUAA4IBAQAxSvsyw-aQGPuLg3sIv-zDLSqhHgP__v9DGyP7D16rJpNG1JcjpiXpbloqD9RW5Gc_hHWn5Kyr1pRABJrFa-jEt89-FiQdkToF-vvwJOXbryAgZYdS03uFzUGqARs3JMMqCHrVkx6hb9oOxh_3JdEemO_dbhApyOVTfloO4kIRsgJnHI_ImFt8xm3xa9ftB0ARfJAdN_1EHgB2NdOgTvaSljVOnQY6R40lh_Wl8-s3GIhHbNwQOECXegBxeVAUVN5nGxlD8TEqKc_mX-22kBMao71zBz3JWtCING4-QzwrWj9pxmanpqYqiVGf40ZbZZihRkte0KI9zvW53Y2Smcy7&s=CxWcLTEQPc_r-0JRHKC2F7vr6RcT4TBNkCI3IXMS8EZNzGuhaY2mrVyIh7stGOXHRwf8aDRwCkJY7ErR8A4a9PKqtJeVyA86NBEwSvs1weiBYLS0YetMCcphY7PfiE0InTZMFFi6ach8yKpy8vXAtPS0qFqPKpfpgYkWUxT8UIGfXWKocdOx8KhRFup-DQZngQvtiDbpo6-W9YFFfsUpIuMWjguzaAf6Tz1sbaCNxHKQgpLGWfwTwJV5COQY9t0sDIyLg0SP6kQeNo6aDQI19S5Y0bIDQqlV6fEbMk4YXfQe-6jpoQwZsA6iRZaVM3UzEZTIiLb34Q5GIT4GUfEsDg&h=pEiR921T0s3Hiec3as2U9GMd7eBuVhqmnzpT5GTyKIA + cache-control: + - no-cache + content-length: + - '76' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:55:55 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/locations/eastus/databaseOperationResults/57bb0429-52fc-4ac7-8299-4adfff319650?api-version=2024-11-01-preview&t=639160737554842177&c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LmNvcmUud2luZG93cy5uZXQvY2VydGlmaWNhdGVBdXRob3JpdGllcy9jY21lZWFzdHVzMmljYTAxMA0GCSqGSIb3DQEBCwUAA4IBAQAxSvsyw-aQGPuLg3sIv-zDLSqhHgP__v9DGyP7D16rJpNG1JcjpiXpbloqD9RW5Gc_hHWn5Kyr1pRABJrFa-jEt89-FiQdkToF-vvwJOXbryAgZYdS03uFzUGqARs3JMMqCHrVkx6hb9oOxh_3JdEemO_dbhApyOVTfloO4kIRsgJnHI_ImFt8xm3xa9ftB0ARfJAdN_1EHgB2NdOgTvaSljVOnQY6R40lh_Wl8-s3GIhHbNwQOECXegBxeVAUVN5nGxlD8TEqKc_mX-22kBMao71zBz3JWtCING4-QzwrWj9pxmanpqYqiVGf40ZbZZihRkte0KI9zvW53Y2Smcy7&s=pSL5_7By3V81SeV_JMzEUKOqM5TJ_WShYE1Z_aDhcxOXAdAoipUHcHw4qba_3sodfObJ_wkjjZrercMu06Fk6WuFVoykUdzHmxP8UrLVoeECfBwbI2UKYb6AFF1YK-5hQmH0KymkIKEyrYBqvkJ5NY29fx6SRXEEwVARlTMgaSixg58RtIcElcpDIduUeTPVFlVn4JuTcXHE7GXeAu-6tel4UEzDzO6G45x-ufIUdLwLO8lfyi0Pqu2QWJ8d_IftqUDZRg9X9sFRX-Ac2GrLPD7ut8FbHgvghXjlzGe0H-42OvMaNp0eVflQJaglJZnf9UOW6u9-7PzcKz3o23StZw&h=8FjyspSJBCeDrjkmThzNq8tZViGoI1hDJoP1M0SpITo + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/8d60e42f-532d-4459-859f-a91e3308254c + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: C90737C38CF94B12A1E910752DAE01E8 Ref B: SN4AA2022301025 Ref C: 2026-06-03T08:55:55Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/locations/eastus/databaseAzureAsyncOperation/57bb0429-52fc-4ac7-8299-4adfff319650?api-version=2024-11-01-preview&t=639160737554685921&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0MTUzOVowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDealc9e2xWlYn0dX5zgxycoyRECfCn-ACb8WxKGmsKAA5yFa8bggPwuauZjSPSntq3xw99b6CFXZ6EM34WjxaWokZKYj8bbRT14WzrQHemPN5KUaI3SFtZidaSdEAzhm7Ha1a74SG8rDZU8qVqbaoCPQk9Iblv0LucrVV5BAMOwvi-5j-7X9vehxsheuxPwrVmGy_WrXI_3Qflmizp5BND_I3p4BIRjEcaQw_EBd3dhAC52EO5bT3FKSdM6N5xgpZvtjHjxRG2WG_8Gh07OrI0Ib0mnTB1_HNhiEw3_VzdnINXV0_Fsm7HMV-qCCkY5pyJIZjVX7L7FFY0PGqcqUKdAgMBAAGjggSSMIIEjjCBnQ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HKQgpLGWfwTwJV5COQY9t0sDIyLg0SP6kQeNo6aDQI19S5Y0bIDQqlV6fEbMk4YXfQe-6jpoQwZsA6iRZaVM3UzEZTIiLb34Q5GIT4GUfEsDg&h=pEiR921T0s3Hiec3as2U9GMd7eBuVhqmnzpT5GTyKIA + response: + body: + string: '{"name":"57bb0429-52fc-4ac7-8299-4adfff319650","status":"InProgress","startTime":"2026-06-03T08:55:55.397Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:55:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/6410f87c-cd24-4d97-89ba-592bf246a7d3 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 79B325AE71A646908A98A12EDA52418D Ref B: SN4AA2022301029 Ref C: 2026-06-03T08:55:56Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/locations/eastus/databaseAzureAsyncOperation/57bb0429-52fc-4ac7-8299-4adfff319650?api-version=2024-11-01-preview&t=639160737554685921&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBF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gP__v9DGyP7D16rJpNG1JcjpiXpbloqD9RW5Gc_hHWn5Kyr1pRABJrFa-jEt89-FiQdkToF-vvwJOXbryAgZYdS03uFzUGqARs3JMMqCHrVkx6hb9oOxh_3JdEemO_dbhApyOVTfloO4kIRsgJnHI_ImFt8xm3xa9ftB0ARfJAdN_1EHgB2NdOgTvaSljVOnQY6R40lh_Wl8-s3GIhHbNwQOECXegBxeVAUVN5nGxlD8TEqKc_mX-22kBMao71zBz3JWtCING4-QzwrWj9pxmanpqYqiVGf40ZbZZihRkte0KI9zvW53Y2Smcy7&s=CxWcLTEQPc_r-0JRHKC2F7vr6RcT4TBNkCI3IXMS8EZNzGuhaY2mrVyIh7stGOXHRwf8aDRwCkJY7ErR8A4a9PKqtJeVyA86NBEwSvs1weiBYLS0YetMCcphY7PfiE0InTZMFFi6ach8yKpy8vXAtPS0qFqPKpfpgYkWUxT8UIGfXWKocdOx8KhRFup-DQZngQvtiDbpo6-W9YFFfsUpIuMWjguzaAf6Tz1sbaCNxHKQgpLGWfwTwJV5COQY9t0sDIyLg0SP6kQeNo6aDQI19S5Y0bIDQqlV6fEbMk4YXfQe-6jpoQwZsA6iRZaVM3UzEZTIiLb34Q5GIT4GUfEsDg&h=pEiR921T0s3Hiec3as2U9GMd7eBuVhqmnzpT5GTyKIA + response: + body: + string: '{"name":"57bb0429-52fc-4ac7-8299-4adfff319650","status":"InProgress","startTime":"2026-06-03T08:55:55.397Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:56:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/a9ab3df9-7612-46d8-8d41-182ac40579d9 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 2A1B6BA62CC64209ABB62BD8E22D63FB Ref B: SN4AA2022305037 Ref C: 2026-06-03T08:56:13Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/locations/eastus/databaseAzureAsyncOperation/57bb0429-52fc-4ac7-8299-4adfff319650?api-version=2024-11-01-preview&t=639160737554685921&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0MTUzOVowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDealc9e2xWlYn0dX5zgxycoyRECfCn-ACb8WxKGmsKAA5yFa8bggPwuauZjSPSntq3xw99b6CFXZ6EM34WjxaWokZKYj8bbRT14WzrQHemPN5KUaI3SFtZidaSdEAzhm7Ha1a74SG8rDZU8qVqbaoCPQk9Iblv0LucrVV5BAMOwvi-5j-7X9vehxsheuxPwrVmGy_WrXI_3Qflmizp5BND_I3p4BIRjEcaQw_EBd3dhAC52EO5bT3FKSdM6N5xgpZvtjHjxRG2WG_8Gh07OrI0Ib0mnTB1_HNhiEw3_VzdnINXV0_Fsm7HMV-qCCkY5pyJIZjVX7L7FFY0PGqcqUK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pIuMWjguzaAf6Tz1sbaCNxHKQgpLGWfwTwJV5COQY9t0sDIyLg0SP6kQeNo6aDQI19S5Y0bIDQqlV6fEbMk4YXfQe-6jpoQwZsA6iRZaVM3UzEZTIiLb34Q5GIT4GUfEsDg&h=pEiR921T0s3Hiec3as2U9GMd7eBuVhqmnzpT5GTyKIA + response: + body: + string: '{"name":"57bb0429-52fc-4ac7-8299-4adfff319650","status":"InProgress","startTime":"2026-06-03T08:55:55.397Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:56:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/780dda50-2e62-4df4-ae08-321be879bcb5 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 33C6D5A5863A44A5942443E7FA03094A Ref B: SN4AA2022302025 Ref C: 2026-06-03T08:56:30Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/locations/eastus/databaseAzureAsyncOperation/57bb0429-52fc-4ac7-8299-4adfff319650?api-version=2024-11-01-preview&t=639160737554685921&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMj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yw-aQGPuLg3sIv-zDLSqhHgP__v9DGyP7D16rJpNG1JcjpiXpbloqD9RW5Gc_hHWn5Kyr1pRABJrFa-jEt89-FiQdkToF-vvwJOXbryAgZYdS03uFzUGqARs3JMMqCHrVkx6hb9oOxh_3JdEemO_dbhApyOVTfloO4kIRsgJnHI_ImFt8xm3xa9ftB0ARfJAdN_1EHgB2NdOgTvaSljVOnQY6R40lh_Wl8-s3GIhHbNwQOECXegBxeVAUVN5nGxlD8TEqKc_mX-22kBMao71zBz3JWtCING4-QzwrWj9pxmanpqYqiVGf40ZbZZihRkte0KI9zvW53Y2Smcy7&s=CxWcLTEQPc_r-0JRHKC2F7vr6RcT4TBNkCI3IXMS8EZNzGuhaY2mrVyIh7stGOXHRwf8aDRwCkJY7ErR8A4a9PKqtJeVyA86NBEwSvs1weiBYLS0YetMCcphY7PfiE0InTZMFFi6ach8yKpy8vXAtPS0qFqPKpfpgYkWUxT8UIGfXWKocdOx8KhRFup-DQZngQvtiDbpo6-W9YFFfsUpIuMWjguzaAf6Tz1sbaCNxHKQgpLGWfwTwJV5COQY9t0sDIyLg0SP6kQeNo6aDQI19S5Y0bIDQqlV6fEbMk4YXfQe-6jpoQwZsA6iRZaVM3UzEZTIiLb34Q5GIT4GUfEsDg&h=pEiR921T0s3Hiec3as2U9GMd7eBuVhqmnzpT5GTyKIA + response: + body: + string: '{"name":"57bb0429-52fc-4ac7-8299-4adfff319650","status":"InProgress","startTime":"2026-06-03T08:55:55.397Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:56:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/215272c5-84fa-417f-b5a9-ede2e1192fb2 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 1AA14A4F025D4683BC58AB1727D189BD Ref B: SN4AA2022301035 Ref C: 2026-06-03T08:56:46Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/locations/eastus/databaseAzureAsyncOperation/57bb0429-52fc-4ac7-8299-4adfff319650?api-version=2024-11-01-preview&t=639160737554685921&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0MTUzOVowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDealc9e2xWlYn0dX5zgxycoyRECfCn-ACb8WxKGmsKAA5yFa8bggPwuauZjSPSntq3xw99b6CFXZ6EM34WjxaWokZKYj8bbRT14WzrQHemPN5KUaI3SFtZidaSdEAzhm7Ha1a74SG8rDZU8qVqbaoCPQk9Iblv0LucrVV5BAMOwvi-5j-7X9vehxsheuxPwrVmGy_WrXI_3Qflmizp5BND_I3p4BIRjEcaQw_EBd3dhAC52EO5bT3FKSdM6N5xgpZvtjHjxRG2WG_8Gh07OrI0Ib0mnTB1_HNhiEw3_VzdnINXV0_Fsm7HMV-qCCkY5pyJ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ngQvtiDbpo6-W9YFFfsUpIuMWjguzaAf6Tz1sbaCNxHKQgpLGWfwTwJV5COQY9t0sDIyLg0SP6kQeNo6aDQI19S5Y0bIDQqlV6fEbMk4YXfQe-6jpoQwZsA6iRZaVM3UzEZTIiLb34Q5GIT4GUfEsDg&h=pEiR921T0s3Hiec3as2U9GMd7eBuVhqmnzpT5GTyKIA + response: + body: + string: '{"name":"57bb0429-52fc-4ac7-8299-4adfff319650","status":"InProgress","startTime":"2026-06-03T08:55:55.397Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:57:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/ce9ef8ed-b2ee-438b-9ddd-10dd62f159d5 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: E4B36641D04B4421966398F6F464CD2F Ref B: SN4AA2022301037 Ref C: 2026-06-03T08:57:04Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/locations/eastus/databaseAzureAsyncOperation/57bb0429-52fc-4ac7-8299-4adfff319650?api-version=2024-11-01-preview&t=639160737554685921&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEyt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SIb3DQEBCwUAA4IBAQAxSvsyw-aQGPuLg3sIv-zDLSqhHgP__v9DGyP7D16rJpNG1JcjpiXpbloqD9RW5Gc_hHWn5Kyr1pRABJrFa-jEt89-FiQdkToF-vvwJOXbryAgZYdS03uFzUGqARs3JMMqCHrVkx6hb9oOxh_3JdEemO_dbhApyOVTfloO4kIRsgJnHI_ImFt8xm3xa9ftB0ARfJAdN_1EHgB2NdOgTvaSljVOnQY6R40lh_Wl8-s3GIhHbNwQOECXegBxeVAUVN5nGxlD8TEqKc_mX-22kBMao71zBz3JWtCING4-QzwrWj9pxmanpqYqiVGf40ZbZZihRkte0KI9zvW53Y2Smcy7&s=CxWcLTEQPc_r-0JRHKC2F7vr6RcT4TBNkCI3IXMS8EZNzGuhaY2mrVyIh7stGOXHRwf8aDRwCkJY7ErR8A4a9PKqtJeVyA86NBEwSvs1weiBYLS0YetMCcphY7PfiE0InTZMFFi6ach8yKpy8vXAtPS0qFqPKpfpgYkWUxT8UIGfXWKocdOx8KhRFup-DQZngQvtiDbpo6-W9YFFfsUpIuMWjguzaAf6Tz1sbaCNxHKQgpLGWfwTwJV5COQY9t0sDIyLg0SP6kQeNo6aDQI19S5Y0bIDQqlV6fEbMk4YXfQe-6jpoQwZsA6iRZaVM3UzEZTIiLb34Q5GIT4GUfEsDg&h=pEiR921T0s3Hiec3as2U9GMd7eBuVhqmnzpT5GTyKIA + response: + body: + string: '{"name":"57bb0429-52fc-4ac7-8299-4adfff319650","status":"Succeeded","startTime":"2026-06-03T08:55:55.397Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:57:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/52de4e91-f800-4687-a021-39688aea8b06 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: E1790815F89948BDA0C24DF1A29D055E Ref B: SN4AA2022304017 Ref C: 2026-06-03T08:57:20Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g --server -n --service-objective + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/databases/vasqldb000003?api-version=2024-11-01-preview + response: + body: + string: '{"sku":{"name":"Standard","tier":"Standard","capacity":10},"kind":"v12.0,user","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":268435456000,"status":"Online","databaseId":"e914eb20-00e6-4bc1-9125-985a8a2a89a4","creationDate":"2026-06-03T08:57:14.853Z","currentServiceObjectiveName":"S0","requestedServiceObjectiveName":"S0","defaultSecondaryLocation":"westus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"readScale":"Disabled","currentSku":{"name":"Standard","tier":"Standard","capacity":10},"currentBackupStorageRedundancy":"Geo","requestedBackupStorageRedundancy":"Geo","maintenanceConfigurationId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default","isLedgerOn":false,"isInfraEncryptionEnabled":false,"availabilityZone":"NoPreference"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/databases/vasqldb000003","name":"vasqldb000003","type":"Microsoft.Sql/servers/databases"}' + headers: + cache-control: + - no-cache + content-length: + - '1127' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:57:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: A27FB4F6D10643A695E248104AC15C25 Ref B: SN4AA2022304037 Ref C: 2026-06-03T08:57:22Z' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"state": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql create + Connection: + - keep-alive + Content-Length: + - '36' + Content-Type: + - application/json + ParameterSetName: + - --resource-id --state + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default","name":"default","type":"Microsoft.Security/sqlVulnerabilityAssessments","properties":{"creationTime":"2026-06-03T08:57:26.987+00:00","state":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '368' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:57:26 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/0936df4d-33ea-47b5-bdaf-a26acd2b4941 + x-ms-ratelimit-remaining-subscription-resource-requests: + - '199' + x-msedge-ref: + - 'Ref A: 62E3722634614A129AFFC9C21C7634FC Ref B: SN4AA2022304019 Ref C: 2026-06-03T08:57:26Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql show + Connection: + - keep-alive + ParameterSetName: + - --resource-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default","name":"default","type":"Microsoft.Security/sqlVulnerabilityAssessments","properties":{"creationTime":"2026-06-03T08:57:26.987+00:00","state":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '368' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:57:28 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/191dd7c4-597f-4cea-ae06-abe54313a702 + x-ms-ratelimit-remaining-subscription-resource-requests: + - '249' + x-msedge-ref: + - 'Ref A: 4A3E9675B7424CDA97D69264B571F4DD Ref B: SN4AA2022304037 Ref C: 2026-06-03T08:57:29Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql update + Connection: + - keep-alive + ParameterSetName: + - --resource-id --state + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default","name":"default","type":"Microsoft.Security/sqlVulnerabilityAssessments","properties":{"creationTime":"2026-06-03T08:57:26.987+00:00","state":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '368' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:57:33 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/d22610ba-6aef-4d20-975e-41016a87d14f + x-ms-ratelimit-remaining-subscription-resource-requests: + - '249' + x-msedge-ref: + - 'Ref A: 4DFF7ECB1AE64D4E81626AD268BA3E0A Ref B: SN4AA2022304039 Ref C: 2026-06-03T08:57:31Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"state": "Disabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql update + Connection: + - keep-alive + Content-Length: + - '37' + Content-Type: + - application/json + ParameterSetName: + - --resource-id --state + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default","name":"default","type":"Microsoft.Security/sqlVulnerabilityAssessments","properties":{"creationTime":"2026-06-03T08:57:26.987+00:00","state":"Disabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '369' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:57:36 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/a13f0cdb-8b82-42fc-b06b-14531dbf02a9 + x-ms-ratelimit-remaining-subscription-resource-requests: + - '199' + x-msedge-ref: + - 'Ref A: 8B275D41B6C749CFA50CD0D917215A99 Ref B: SN4AA2022301025 Ref C: 2026-06-03T08:57:35Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql show + Connection: + - keep-alive + ParameterSetName: + - --resource-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default","name":"default","type":"Microsoft.Security/sqlVulnerabilityAssessments","properties":{"creationTime":"2026-06-03T08:57:26.987+00:00","state":"Disabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '369' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:57:39 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/fa1ca641-cc39-492a-be0b-f38b16dd9954 + x-ms-ratelimit-remaining-subscription-resource-requests: + - '249' + x-msedge-ref: + - 'Ref A: 995EDB1083F747BBA4707D66413695FA Ref B: SN4AA2022304045 Ref C: 2026-06-03T08:57:39Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql update + Connection: + - keep-alive + ParameterSetName: + - --resource-id --state + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default","name":"default","type":"Microsoft.Security/sqlVulnerabilityAssessments","properties":{"creationTime":"2026-06-03T08:57:26.987+00:00","state":"Disabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '369' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:57:41 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/367fe35c-b7d6-4f31-b39d-f2e81c91de35 + x-ms-ratelimit-remaining-subscription-resource-requests: + - '249' + x-msedge-ref: + - 'Ref A: 8737BE5F65EC4D929E8005FA1CC1662D Ref B: SN4AA2022304029 Ref C: 2026-06-03T08:57:41Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"state": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql update + Connection: + - keep-alive + Content-Length: + - '36' + Content-Type: + - application/json + ParameterSetName: + - --resource-id --state + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default","name":"default","type":"Microsoft.Security/sqlVulnerabilityAssessments","properties":{"creationTime":"2026-06-03T08:57:26.987+00:00","state":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '368' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:57:44 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/0cbacda3-fcb0-4757-8953-d5810a22b5e2 + x-ms-ratelimit-remaining-subscription-resource-requests: + - '199' + x-msedge-ref: + - 'Ref A: 554BF2BF385845FCB54F3C00E2D13B33 Ref B: SN4AA2022304045 Ref C: 2026-06-03T08:57:44Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans initiate-scan + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: POST + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002%2Fdatabases%2Fvasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/initiateScan?api-version=2026-04-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 03 Jun 2026 08:57:47 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/a9508708-9c1e-45c3-8ac7-08ba2104a1b4?api-version=2026-04-01-preview&t=639160738676060486&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0MTUzOVowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDealc9e2xWlYn0dX5zgxycoyRECfCn-ACb8WxKGmsKAA5yFa8bggPwuauZjSPSntq3xw99b6CFXZ6EM34WjxaWokZKYj8bbRT14WzrQHemPN5KUaI3SFtZidaSdEAzhm7Ha1a74SG8rDZU8qVqbaoCPQk9Iblv0LucrVV5BAMOwvi-5j-7X9vehxsheuxPwrVmGy_WrXI_3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XfKiRqARG7ajPxQgloH0DOKU5oX0zGQVSo0hpdiCrVOi4kSubXgY2QRjeP6ky-MR84N0bIKJatnoUmR4SdbG8NfWCKDbbzDrCIPqfUeosX-iK5LSvm3Az7ksH2jko3QykQgWBuATn-sS6paubjLDGAKaTO0qJWdfJpi07SCf-R7SCzfl2V-5uupY-nfMk0r8bNBhpTrGkbe1L2oZqlwSsJp7fBDIf98SvchJdOrABYmS8VZqH_jHNYMztiNKymBgwUlwf8GhnBJiH3WN-ag&h=q5M-xzGBTrMP-cGsYbBR5tTMpQsD--eZnrN1Can-QHA + pragma: + - no-cache + set-cookie: + - ARRAffinity=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/d292e46c-44be-420a-b4a1-d99f509c081f + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 19BD151ABF2F41D085E41B6970CEAD30 Ref B: SN4AA2022302035 Ref C: 2026-06-03T08:57:46Z' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans initiate-scan + Connection: + - keep-alive + ParameterSetName: + - --resource-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/a9508708-9c1e-45c3-8ac7-08ba2104a1b4?api-version=2026-04-01-preview&t=639160738676060486&c=MIIHlDCCBnygAwIBAgIQZiYkoV_LM7Hwt06_u_DzJDANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDQxMDA4MTUzOVoXDTI2MTAwNTE0MTUzOVowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDealc9e2xWlYn0dX5zgxycoyRECfCn-ACb8WxKGmsKAA5yFa8bggPwuauZjSPSntq3xw99b6CFXZ6EM34WjxaWokZKYj8bbRT14WzrQHemPN5KUaI3SFtZidaSdEAzhm7Ha1a74SG8rDZU8qVqbaoCPQk9Iblv0LucrVV5BAMOwvi-5j-7X9vehxsheuxPwrVmGy_WrXI_3Qflmizp5BND_I3p4BIRjEcaQw_EBd3dhAC52EO5bT3FKSdM6N5xgpZvtjHjxRG2WG_8Gh07OrI0Ib0mnTB1_HNhiEw3_VzdnINXV0_Fsm7HMV-qCCkY5pyJIZjVX7L7FFY0PGqcqUKdAgMBAAGjggSSMIIEjjCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVH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Wh0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9lYXN0dXMyL2NhY2VydHMvY2NtZWVhc3R1czJwa2kvY2NtZWVhc3R1czJpY2EwMS9jZXJ0LmNlcjBmBggrBgEFBQcwAoZaaHR0cDovL2NjbWVlYXN0dXMycGtpLmVhc3R1czIucGtpLmNvcmUud2luZG93cy5uZXQvY2VydGlmaWNhdGVBdXRob3JpdGllcy9jY21lZWFzdHVzMmljYTAxMA0GCSqGSIb3DQEBCwUAA4IBAQAxSvsyw-aQGPuLg3sIv-zDLSqhHgP__v9DGyP7D16rJpNG1JcjpiXpbloqD9RW5Gc_hHWn5Kyr1pRABJrFa-jEt89-FiQdkToF-vvwJOXbryAgZYdS03uFzUGqARs3JMMqCHrVkx6hb9oOxh_3JdEemO_dbhApyOVTfloO4kIRsgJnHI_ImFt8xm3xa9ftB0ARfJAdN_1EHgB2NdOgTvaSljVOnQY6R40lh_Wl8-s3GIhHbNwQOECXegBxeVAUVN5nGxlD8TEqKc_mX-22kBMao71zBz3JWtCING4-QzwrWj9pxmanpqYqiVGf40ZbZZihRkte0KI9zvW53Y2Smcy7&s=GyL_LUsGTRFSvuuHh2T_hDq3XMnhW-DHTK1Of7P2Z5o2C88XPs0heyBlmCyqUhGZSr1XfKiRqARG7ajPxQgloH0DOKU5oX0zGQVSo0hpdiCrVOi4kSubXgY2QRjeP6ky-MR84N0bIKJatnoUmR4SdbG8NfWCKDbbzDrCIPqfUeosX-iK5LSvm3Az7ksH2jko3QykQgWBuATn-sS6paubjLDGAKaTO0qJWdfJpi07SCf-R7SCzfl2V-5uupY-nfMk0r8bNBhpTrGkbe1L2oZqlwSsJp7fBDIf98SvchJdOrABYmS8VZqH_jHNYMztiNKymBgwUlwf8GhnBJiH3WN-ag&h=q5M-xzGBTrMP-cGsYbBR5tTMpQsD--eZnrN1Can-QHA + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/a9508708-9c1e-45c3-8ac7-08ba2104a1b4","name":"a9508708-9c1e-45c3-8ac7-08ba2104a1b4","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanOperationResults","properties":{"operationId":"a9508708-9c1e-45c3-8ac7-08ba2104a1b4","scanStatus":"InProgress"}}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:57:48 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/338acf99-d12e-4abe-b1dc-2c099b152b1d + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 34D9A34704034CFE9802949FC07045D4 Ref B: SN4AA2022301047 Ref C: 2026-06-03T08:57:49Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --scan-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002%2Fdatabases%2Fvasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest?api-version=2026-04-01-preview + response: + body: + string: '{"code":"ResultsAreNotAvailableYet","message":"Results are not available + yet"}' + headers: + cache-control: + - no-cache + content-length: + - '78' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:57:51 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/3365cf44-b4ed-48d7-af34-f94b133b202f + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: FA8D6E61DF354F2EB771E87DF55D6FAD Ref B: SN4AA2022303011 Ref C: 2026-06-03T08:57:51Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --scan-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002%2Fdatabases%2Fvasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d","name":"aa735d1b-92ce-42f9-adc6-ef1806a65e0d","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans","properties":{"triggerType":"OnDemand","state":"Failed","server":"vasqlsrv000002","database":"vasqldb000003","sqlVersion":"17.0.9114","startTime":"2026-06-03T08:57:48.2047016+00:00","endTime":"2026-06-03T08:57:50.0205424+00:00","highSeverityFailedRulesCount":0,"mediumSeverityFailedRulesCount":1,"lowSeverityFailedRulesCount":0,"totalPassedRulesCount":23,"totalFailedRulesCount":1,"totalRulesCount":24,"isBaselineApplied":false,"lastScanTime":"2026-06-03T08:57:50.0205424+00:00"}}' + headers: + cache-control: + - no-cache + content-length: + - '896' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:58:13 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/ad64d312-679d-448a-b146-6befbf699b12 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 10F0F7BC85774A878B3BD6D7F09E56BF Ref B: SN4AA2022301037 Ref C: 2026-06-03T08:58:14Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"latestScan": true}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql baseline add + Connection: + - keep-alive + Content-Length: + - '20' + Content-Type: + - application/json + ParameterSetName: + - --resource-id --latest-scan + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: POST + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002%2Fdatabases%2Fvasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules?api-version=2026-04-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1143","name":"VA1143","type":"Microsoft.Security/sqlVulnerabilityAssessments/baselineRules","properties":{"results":[["True"]]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1219","name":"VA1219","type":"Microsoft.Security/sqlVulnerabilityAssessments/baselineRules","properties":{"results":[["False"]]}}]}' + headers: + cache-control: + - no-cache + content-length: + - '830' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:58:17 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/ead52679-b4b9-4ee9-a106-1932491a974c + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 1096BDD3C53A4C4E8EE4DE2AA841552B Ref B: SN4AA2022301053 Ref C: 2026-06-03T08:58:16Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql baseline list + Connection: + - keep-alive + ParameterSetName: + - --resource-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002%2Fdatabases%2Fvasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules?api-version=2026-04-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1143","name":"VA1143","type":"Microsoft.Security/sqlVulnerabilityAssessments/baselineRules","properties":{"results":[["True"]]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1219","name":"VA1219","type":"Microsoft.Security/sqlVulnerabilityAssessments/baselineRules","properties":{"results":[["False"]]}}]}' + headers: + cache-control: + - no-cache + content-length: + - '830' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:58:19 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/39aae98c-9e5f-4956-aa89-24610180b4e5 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: FF282965CA7849A2B3EA696AE98EDBB0 Ref B: SN4AA2022301023 Ref C: 2026-06-03T08:58:20Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"latestScan": true}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql baseline create + Connection: + - keep-alive + Content-Length: + - '20' + Content-Type: + - application/json + ParameterSetName: + - --resource-id --rule-id --latest-scan + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002%2Fdatabases%2Fvasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1143?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1143","name":"VA1143","type":"Microsoft.Security/sqlVulnerabilityAssessments/baselineRules","properties":{"results":[["True"]]}}' + headers: + cache-control: + - no-cache + content-length: + - '408' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:58:22 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/3a2100ac-ab17-4d2b-ad0d-cefdba95da88 + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: DE27162EB9E64672AED2384DDE15C843 Ref B: SN4AA2022305045 Ref C: 2026-06-03T08:58:22Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql baseline show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --rule-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002%2Fdatabases%2Fvasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1143?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1143","name":"VA1143","type":"Microsoft.Security/sqlVulnerabilityAssessments/baselineRules","properties":{"results":[["True"]]}}' + headers: + cache-control: + - no-cache + content-length: + - '408' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:58:23 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/fa2394fc-9eaa-492e-b1dc-ef966b39624e + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 37DCFB582B8F41CFBD591359F41ADD00 Ref B: SN4AA2022303031 Ref C: 2026-06-03T08:58:24Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql results list + Connection: + - keep-alive + ParameterSetName: + - --resource-id --scan-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002%2Fdatabases%2Fvasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest/scanResults?api-version=2026-04-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1020","name":"VA1020","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1020","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Remove + the special user GUEST from all roles.","scripts":[],"automated":true,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1020","severity":"High","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"Database + user GUEST should not be a member of any role","description":"The guest user + permits access to a database for any logins that are not mapped to a specific + database user. This rule checks that no database roles are assigned to the + Guest user.","rationale":"Database Roles are the basic building block at the + heart of separation of duties and the principle of least permission. Granting + the Guest user membership to specific roles defeats this purpose.","queryCheck":{"query":"SELECT + roles.[name] AS [Role]\nFROM sys.database_role_members AS drms\nINNER JOIN + sys.database_principals AS roles ON drms.role_principal_id = roles.principal_id\nINNER + JOIN sys.database_principals AS users ON drms.member_principal_id = users.principal_id\nWHERE + users.[name] = ''guest''","expectedResult":[],"columnNames":["Role"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1054","name":"VA1054","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1054","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Revoke + unnecessary permissions granted to PUBLIC","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1054","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"Excessive + permissions should not be granted to PUBLIC role on objects or columns","description":"Every + SQL Server login belongs to the public server role. When a server principal + has not been granted or denied specific permissions on a securable object, + the user inherits the permissions granted to public on that object. This rule + displays a list of all securable objects or columns that are accessible to + all users through the PUBLIC role.","rationale":"Database Roles are the basic + building block at the heart of separation of duties and the principle of least + permission. Granting permissions to principals through the default PUBLIC + role defeats this purpose.","queryCheck":{"query":"SELECT permission_name + AS [Permission]\n ,schema_name AS [Schema]\n ,object_name AS [Object]\nFROM + (\n SELECT objs.TYPE COLLATE database_default AS object_type\n ,schema_name(schema_id) + COLLATE database_default AS schema_name\n ,objs.name COLLATE database_default + AS object_name\n ,user_name(grantor_principal_id) COLLATE database_default + AS grantor_principal_name\n ,permission_name COLLATE database_default + AS permission_name\n ,perms.TYPE COLLATE database_default AS TYPE\n ,STATE + COLLATE database_default AS STATE\n FROM sys.database_permissions AS perms\n + INNER JOIN sys.objects AS objs\n ON objs.object_id = perms.major_id\n WHERE + perms.class = 1 -- objects or columns. Other cases are handled by VA1095 which + has different remediation syntax\n AND grantee_principal_id = DATABASE_PRINCIPAL_ID(''public'')\n AND + [state] IN (\n ''G''\n ,''W''\n )\n AND NOT (\n -- These permissions + are granted by default to public\n permission_name = ''EXECUTE''\n AND + schema_name(schema_id) = ''dbo''\n AND STATE = ''G''\n AND objs.name IN + (\n ''fn_sysdac_is_dac_creator''\n ,''fn_sysdac_is_currentuser_sa''\n ,''fn_sysdac_is_login_creator''\n ,''fn_sysdac_get_username''\n ,''sp_sysdac_ensure_dac_creator''\n ,''sp_sysdac_add_instance''\n ,''sp_sysdac_add_history_entry''\n ,''sp_sysdac_delete_instance''\n ,''sp_sysdac_upgrade_instance''\n ,''sp_sysdac_drop_database''\n ,''sp_sysdac_rename_database''\n ,''sp_sysdac_setreadonly_database''\n ,''sp_sysdac_rollback_committed_step''\n ,''sp_sysdac_update_history_entry''\n ,''sp_sysdac_resolve_pending_entry''\n ,''sp_sysdac_rollback_pending_object''\n ,''sp_sysdac_rollback_all_pending_objects''\n ,''fn_sysdac_get_currentusername''\n )\n OR + permission_name = ''SELECT''\n AND schema_name(schema_id) = ''sys''\n AND + STATE = ''G''\n AND objs.name IN (\n ''firewall_rules''\n ,''database_firewall_rules''\n ,''ipv6_database_firewall_rules''\n ,''bandwidth_usage''\n ,''database_usage''\n ,''external_library_setup_errors''\n ,''sql_feature_restrictions''\n ,''resource_stats''\n ,''elastic_pool_resource_stats''\n ,''dm_database_copies''\n ,''geo_replication_links''\n ,''database_error_stats''\n ,''event_log''\n ,''database_connection_stats''\n )\n OR + permission_name = ''SELECT''\n AND schema_name(schema_id) = ''dbo''\n AND + STATE = ''G''\n AND objs.name IN (\n ''sysdac_instances_internal''\n ,''sysdac_history_internal''\n ,''sysdac_instances''\n )\n )\n\n + ) t","expectedResult":[],"columnNames":["Permission","Schema","Object"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1095","name":"VA1095","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1095","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Revoke + any unnecessary permissions granted to PUBLIC, but avoid changing permissions + granted out of the box.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1095","severity":"Medium","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"Excessive + permissions should not be granted to PUBLIC role","description":"Every SQL + Server login belongs to the public server role. When a server principal has + not been granted or denied specific permissions on a securable object, the + user inherits the permissions granted to public on that object. This displays + a list of all permissions that are granted to the PUBLIC role.","rationale":"Database + Roles are the basic building block at the heart of separation of duties and + the principle of least permission. Granting permissions to principals through + the default PUBLIC role defeats this purpose.","queryCheck":{"query":"SELECT + REPLACE(perms.class_desc, ''_'', '' '') AS [Permission Class]\n ,CASE\n WHEN + perms.class = 0\n THEN db_name() -- database\n WHEN perms.class + = 3\n THEN schema_name(major_id) -- schema\n WHEN perms.class + = 4\n THEN printarget.NAME -- principal\n WHEN perms.class + = 5\n THEN asm.NAME -- assembly\n WHEN perms.class = 6\n THEN + type_name(major_id) -- type\n WHEN perms.class = 10\n THEN + xmlsc.NAME -- xml schema\n WHEN perms.class = 15\n THEN + msgt.NAME COLLATE DATABASE_DEFAULT -- message types\n WHEN perms.class + = 16\n THEN svcc.NAME COLLATE DATABASE_DEFAULT -- service contracts\n WHEN + perms.class = 17\n THEN svcs.NAME COLLATE DATABASE_DEFAULT -- services\n WHEN + perms.class = 18\n THEN rsb.NAME COLLATE DATABASE_DEFAULT -- remote + service bindings\n WHEN perms.class = 19\n THEN rts.NAME + COLLATE DATABASE_DEFAULT -- routes\n WHEN perms.class = 23\n THEN + ftc.NAME -- full text catalog\n WHEN perms.class = 24\n THEN + sym.NAME -- symmetric key\n WHEN perms.class = 25\n THEN + crt.NAME -- certificate\n WHEN perms.class = 26\n THEN asym.NAME + -- assymetric key\n END AS [Object]\n ,perms.permission_name AS + Permission\nFROM sys.database_permissions AS perms\nLEFT JOIN sys.database_principals + AS prin ON perms.grantee_principal_id = prin.principal_id\nLEFT JOIN sys.assemblies + AS asm ON perms.major_id = asm.assembly_id\nLEFT JOIN sys.xml_schema_collections + AS xmlsc ON perms.major_id = xmlsc.xml_collection_id\nLEFT JOIN sys.service_message_types + AS msgt ON perms.major_id = msgt.message_type_id\nLEFT JOIN sys.service_contracts + AS svcc ON perms.major_id = svcc.service_contract_id\nLEFT JOIN sys.services + AS svcs ON perms.major_id = svcs.service_id\nLEFT JOIN sys.remote_service_bindings + AS rsb ON perms.major_id = rsb.remote_service_binding_id\nLEFT JOIN sys.routes + AS rts ON perms.major_id = rts.route_id\nLEFT JOIN sys.database_principals + AS printarget ON perms.major_id = printarget.principal_id\nLEFT JOIN sys.symmetric_keys + AS sym ON perms.major_id = sym.symmetric_key_id\nLEFT JOIN sys.asymmetric_keys + AS asym ON perms.major_id = asym.asymmetric_key_id\nLEFT JOIN sys.certificates + AS crt ON perms.major_id = crt.certificate_id\nLEFT JOIN sys.fulltext_catalogs + AS ftc ON perms.major_id = ftc.fulltext_catalog_id\nWHERE perms.grantee_principal_id + = DATABASE_PRINCIPAL_ID(''public'')\n AND class != 1 -- Object or Columns + (class = 1) are handled by VA1054 and have different remediation syntax\n AND + [state] IN (''G'',''W'')\n AND NOT (\n perms.class = 0\n AND + prin.NAME = ''public''\n AND perms.major_id = 0\n AND perms.minor_id + = 0\n AND permission_name IN (\n ''VIEW ANY COLUMN ENCRYPTION + KEY DEFINITION''\n ,''VIEW ANY COLUMN MASTER KEY DEFINITION''\n )\n )","expectedResult":[],"columnNames":["Permission + Class","Object","Permission"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1096","name":"VA1096","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1096","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Revoke + any unnecessary permissions granted to the special account GUEST","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1096","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"Principal + GUEST should not be granted permissions in the database","description":"Each + database includes a user called GUEST. Permissions granted to GUEST are inherited + by users who have access to the database, but who do not have a user account + in the database. This rule checks that all permissions have been revoked from + the GUEST user.","rationale":"The special user GUEST is used to map any logins + that are not mapped to a specific database user. This can result in principals + gaining access to a database without having been explicitly granted permission + to do so.","queryCheck":{"query":"SELECT perms.permission_name AS [Permission]\nFROM + sys.database_permissions AS perms\nINNER JOIN sys.database_principals AS prin + ON perms.grantee_principal_id = prin.principal_id\nWHERE prin.[name] = ''guest''\n AND + perms.class = 0\n AND [state] IN (''G'', ''W'')","expectedResult":[],"columnNames":["Permission"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1097","name":"VA1097","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1097","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Revoke + any unnecessary permissions granted to the special account GUEST","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1097","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"Principal + GUEST should not be granted permissions on objects or columns","description":"Each + database includes a user called GUEST. Permissions granted to GUEST are inherited + by users who have access to the database, but who do not have a user account + in the database. This rule checks that all permissions have been revoked from + the GUEST user.","rationale":"The special user GUEST is used to map any logins + that are not mapped to a specific database user. This can result in principals + gaining access to a database without having been explicitly granted permission + to do so.","queryCheck":{"query":"SELECT object_schema_name(major_id) AS [Schema]\n ,object_name(major_id) + AS [Object]\n ,perms.permission_name AS [Permission]\nFROM sys.database_permissions + AS perms\nINNER JOIN sys.database_principals AS prin ON perms.grantee_principal_id + = prin.principal_id\nWHERE prin.[name] = ''guest''\n AND perms.class = + 1\n AND [state] IN (''G'', ''W'')","expectedResult":[],"columnNames":["Schema","Object","Permission"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1099","name":"VA1099","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1099","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Revoke + any unnecessary permissions granted to the special account GUEST","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1099","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"GUEST + user should not be granted permissions on database securables","description":"Each + database includes a user called GUEST. Permissions granted to GUEST are inherited + by users who have access to the database, but who do not have a user account + in the database. This rule checks that all permissions have been revoked from + the GUEST user.","rationale":"The special user GUEST is used to map any logins + that are not mapped to a specific database user. This can result in principals + gaining access to a database without having been explicitly granted permission + to do so.","queryCheck":{"query":"DECLARE @guestId INT\n\nSELECT @guestId + = principal_id\nFROM sys.database_principals\nWHERE [name] = ''guest''\n\nSELECT + REPLACE(perms.class_desc, ''_'', '' '') AS [Permission Class]\n ,CASE\n WHEN + perms.class = 3\n THEN schema_name(major_id) -- schema\n WHEN + perms.class = 4\n THEN printarget.name -- principal\n WHEN + perms.class = 5\n THEN asm.name -- assembly\n WHEN perms.class + = 6\n THEN type_name(major_id) -- type\n WHEN perms.class + = 24\n THEN sym.name -- symmetric key\n WHEN perms.class + = 25\n THEN crt.name -- certificate\n END AS [Object]\n ,perms.permission_name + AS Permission\nFROM sys.database_permissions AS perms\nLEFT JOIN sys.database_principals + AS prin ON perms.grantee_principal_id = prin.principal_id\nLEFT JOIN sys.assemblies + AS asm ON perms.major_id = asm.assembly_id\nLEFT JOIN sys.database_principals + AS printarget ON perms.major_id = printarget.principal_id\nLEFT JOIN sys.symmetric_keys + AS sym ON perms.major_id = sym.symmetric_key_id\nLEFT JOIN sys.certificates + AS crt ON perms.major_id = crt.certificate_id\nWHERE grantee_principal_id + = @guestId\n AND class IN (3, 4, 5, 6, 10, 15, 16, 17, 18, 19, 23, 24, + 25, 26)","expectedResult":[],"columnNames":["Permission Class","Object","Permission"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1143","name":"VA1143","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1143","status":"Finding","isTrimmed":false,"queryResults":[["True"]],"remediation":{"description":"Create + users with low privileges to access the DB and any data stored in it with + the appropriate set of permissions.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":{"baseline":{"expectedResults":[["True"]],"updatedTime":"2026-06-03T08:58:22.6755997+00:00"},"status":"NonFinding","resultsNotInBaseline":[],"resultsOnlyInBaseline":[]},"ruleMetadata":{"ruleId":"VA1143","severity":"Medium","category":"SurfaceAreaReduction","ruleType":"Binary","title":"''dbo'' + user should not be used for normal service operation","description":"The ''dbo'', + or database owner, is a user account that has implied permissions to perform + all activities in the database. Members of the sysadmin fixed server role + are automatically mapped to dbo. This rule checks that dbo is not the only + account allowed to access this database. Please note that on a newly created + clean database this rule will fail until additional roles are created.","rationale":"A + compromised service that accesses the database with the ''dbo'' user account + will have full control of the database. To avoid this situation, lower privileged + users should be defined for normal service operation, while the ''dbo'' account + should only be used for administrative tasks that require this privilege.","queryCheck":{"query":"IF((SELECT + count(*) from sys.database_principals WHERE principal_id >= 5 AND principal_id + < 16384 ) > 0) SELECT 0 AS [Violation]\nELSE SELECT 1 AS [Violation]","expectedResult":[["0"]],"columnNames":["Violation"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1219","name":"VA1219","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1219","status":"NonFinding","isTrimmed":false,"queryResults":[["False"]],"remediation":{"description":"Enable + TDE on the affected databases","scripts":[],"automated":false,"portalLink":"EnableTDE"},"baselineAdjustedResult":{"baseline":{"expectedResults":[["False"]],"updatedTime":"2026-06-03T08:58:17.6590939+00:00"},"status":"NonFinding","resultsNotInBaseline":[],"resultsOnlyInBaseline":[]},"ruleMetadata":{"ruleId":"VA1219","severity":"Medium","category":"DataProtection","ruleType":"Binary","title":"Transparent + data encryption should be enabled","description":"Transparent data encryption + (TDE) helps to protect the database files against information disclosure by + performing real-time encryption and decryption of the database, associated + backups, and transaction log files ''at rest'', without requiring changes + to the application. This rule checks that TDE is enabled on the database.","rationale":"Transparent + Data Encryption (TDE) protects data ''at rest'', meaning the data and log + files are encrypted when stored on disk.","queryCheck":{"query":"SELECT CASE\n WHEN + EXISTS (\n SELECT * \n FROM sys.dm_database_encryption_keys + \n WHERE db_name(database_id) = db_name() \n AND + (encryption_state != 5 and encryption_state != 1)\n )\n THEN + 0\n ELSE 1\n END AS [Violation]","expectedResult":[["0"]],"columnNames":["Violation"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1221","name":"VA1221","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1221","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Regenerate + the DEK using AES","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1221","severity":"High","category":"DataProtection","ruleType":"NegativeList","title":"Database + Encryption Symmetric Keys should use AES algorithm","description":"SQL Server + uses encryption keys to help secure data, credentials, and connection information + that is stored in a server database. SQL Server has two kinds of keys: symmetric + and asymmetric. This rule checks that Database Encryption Symmetric Keys use + AES algorithm.","rationale":"Weak encryption algorithms may lead to weaknesses + in the data-at-rest protection.","queryCheck":{"query":"SELECT db_name(database_id) + AS [Database]\n ,encryption_state AS [Encryption State]\n ,key_algorithm + AS [Key Algorithm]\n ,key_length AS [Key Length]\n ,encryptor_type AS + [Encryptor Type]\nFROM sys.dm_database_encryption_keys\nWHERE key_algorithm + != ''AES''","expectedResult":[],"columnNames":["Database","Encryption State","Key + Algorithm","Key Length","Encryptor Type"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1223","name":"VA1223","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1223","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Create + new certificates, re-encrypt the data/sign-data using the new key, and drop + the affected keys.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1223","severity":"High","category":"DataProtection","ruleType":"NegativeList","title":"Certificate + keys should use at least 2048 bits","description":"Certificate keys are used + in RSA and other encryption algorithms to protect data. These keys need to + be of enough length to secure the user''s data. This rule checks that the + key''s length is at least 2048 bits for all certificates.","rationale":"Key + length defines the upper-bound on the encryption algorithm''s security. Using + short keys in encryption algorithms may lead to weaknesses in data-at-rest + protection.","queryCheck":{"query":"SELECT name AS [Certificate Name], thumbprint + AS [Thumbprint]\nFROM sys.certificates\nWHERE key_length < 2048","expectedResult":[],"columnNames":["Certificate + Name","Thumbprint"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1224","name":"VA1224","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1224","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Create + new asymmetric Keys, re-encrypt the data/sign-data using the new key, and + drop the affected keys.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1224","severity":"High","category":"DataProtection","ruleType":"NegativeList","title":"Asymmetric + keys'' length should be at least 2048 bits","description":"Database asymmetric + keys are used in many encryption algorithms, these keys need to be of enough + length to secure the encrypted data, this rule checks that all asymmetric + keys stored in the database are of length of at least 2048 bits","rationale":"Key + length defines the upper-bound on the encryption algorithm''s security, using + short keys in encryption algorithms may lead to weaknesses in the data-at-rest + protection","queryCheck":{"query":"SELECT name AS [Key Name], pvt_key_encryption_type_desc + AS [Encryption Type], algorithm_desc AS [Key Algorithm]\nFROM sys.asymmetric_keys\nWHERE + key_length < 2048\nAND NOT (DB_NAME() = ''master'' AND name = ''MS_SQLEnableSystemAssemblyLoadingKey'')","expectedResult":[],"columnNames":["Key + Name","Encryption Type","Key Algorithm"]},"benchmarkReferences":[{"benchmark":"CIS","reference":"v1.0.0-08-11-2017:7.2"},{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1246","name":"VA1246","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1246","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Remove + the application roles. Use users without login as a permission-based replacement","scripts":[],"automated":true,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1246","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"Application + roles should not be used","description":"An application role is a database + principal that enables an application to run with its own user-like permissions. + Application roles enable that only users connecting through a particular application + can access specific data. Application roles are password-based (which applications + typically hardcode) and not permission based, which exposes the database to + approle impersonation by password-guessing. This rule checks that no application + roles are defined in the database.","rationale":"It is important to limit + the possibility of acquiring user-like permissions to the database, and since + application roles are password based, they can lead to impersonation of the + application role via password-guessing.","queryCheck":{"query":"SELECT name + AS [Role]\nFROM sys.database_principals\nWHERE type = ''A''","expectedResult":[],"columnNames":["Role"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1248","name":"VA1248","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1248","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Remove + user defined roles from fixed-database roles","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1248","severity":"Medium","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"User-defined + database roles should not be members of fixed roles","description":"To easily + manage the permissions in your databases, SQL Server provides several roles + which are security principals that group other principals. They are like groups + in the Microsoft Windows operating system. Database accounts and other SQL + Server roles can be added into database-level roles. Each member of a fixed-database + role can add other users to that same role. This rule checks that no user-defined + roles are members of fixed roles","rationale":"Adding user defined database + roles as members of fixed roles could enable unintended privilege escalation, + also finding any metadata indicating that the fixed roles have been modified + is typically a sign of data corruption or signs of somebody corrupting the + metadata in order to hide unusual activity.","queryCheck":{"query":"SELECT + user_name(roles.role_principal_id) AS [Role]\n ,user_name(roles.member_principal_id) + AS [Member]\nFROM sys.database_role_members AS roles\nINNER JOIN sys.database_principals + AS users\nON roles.member_principal_id = users.principal_id\n AND (\n roles.role_principal_id + >= 16384\n AND roles.role_principal_id <= 16393\n )\n AND + users.type = ''R''","expectedResult":[],"columnNames":["Role","Member"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1258","name":"VA1258","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1258","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Keep + track of database owners. Remove unnecessary database owners to avoid granting + excessive permissions or update the baseline to reflect the approved list + of owners.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1258","severity":"High","category":"AuditingAndLogging","ruleType":"BaselineExpected","title":"Database + owners are as expected","description":"Database owners can perform all configuration + and maintenance activities on the database, and can also drop databases in + SQL Server. Tracking database owners is important to avoid having excessive + permission for some principals. Create a baseline which defines the expected + database owners for the database. This rule checks whether the database owners + are as defined in the baseline.","rationale":"Keeping track of database owners + is important to avoid granting excessive permissions.","queryCheck":{"query":"SELECT + USER_NAME(member_principal_id) AS [Owner]\nFROM sys.database_role_members\nWHERE + USER_NAME(role_principal_id) = ''db_owner''\n AND USER_NAME(member_principal_id) + != ''dbo''","expectedResult":[],"columnNames":["Owner"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1281","name":"VA1281","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1281","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Keep + track of role membership and remove unnecessary members from roles to avoid + granting excessive permissions or update baseline to comply with new changes","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1281","severity":"Medium","category":"AuditingAndLogging","ruleType":"BaselineExpected","title":"All + memberships for user-defined roles should be intended","description":"User-defined + roles are security principals defined by the user to group principals to easily + manage permissions. Monitoring these roles is important to avoid having excessive + permissions. Create a baseline which defines expected membership for each + user-defined role. This rule checks whether all memberships for user-defined + roles are as defined in the baseline","rationale":"Keeping track of role memberships + is important to avoid granting excessive permissions","queryCheck":{"query":"SELECT + user_name(role_principal_id) as [Role], user_name(member_principal_id) as + [Member]\nFROM sys.database_role_members\nWHERE role_principal_id NOT IN (16384,16385,16386,16387,16389,16390,16391,16392,16393)","expectedResult":[],"columnNames":["Role","Member"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1282","name":"VA1282","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1282","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Drop + the unnecessary database roles.","scripts":[],"automated":true,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1282","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"NegativeList","title":"Orphan + database roles should be removed","description":"Orphan database roles are + user-defined roles that have no members. It is recommended to eliminate orphaned + roles as they are not needed on the system. This rule checks whether there + are any orphan roles","rationale":"Reduce the attack surface area by eliminating + unnecessary database roles in the system.","queryCheck":{"query":"SELECT name + AS [Role]\nFROM sys.database_principals\nWHERE type = ''R''\nAND principal_id + not in (0,16384,16385,16386,16387,16389,16390,16391,16392,16393)\nAND principal_id + not in ( \n SELECT distinct role_principal_id\n FROM sys.database_role_members\n )","expectedResult":[],"columnNames":["Role"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA2020","name":"VA2020","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA2020","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Revoke + permissions from principals where not needed. It is recommended to have at + most 1 principal granted a specific permission.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA2020","severity":"High","category":"AuthenticationAndAuthorization","ruleType":"BaselineExpected","title":"Minimal + set of principals should be granted ALTER or ALTER ANY USER database-scoped + permissions","description":"Every SQL Server securable has permissions associated + with it that can be granted to principals. Permissions can be scoped at the + server level (assigned to logins and server roles) or at the database level + (assigned to database users and database roles). These rules check that only + a minimal set of principals are granted ALTER or ALTER ANY USER database-scoped + permissions.","rationale":"Developing an application using a least-privileged + user account (LUA) approach is an important part of a defensive, in-depth + strategy for countering security threats. The LUA approach ensures that users + follow the principle of least privilege and always log on with limited user + accounts. Administrative tasks are broken out using fixed server roles, and + the use of the sysadmin fixed server role is severely restricted. Always follow + the principle of least privilege when granting permissions to database users. + Grant the minimum permissions necessary to a user or role to accomplish a + given task. See https://msdn.microsoft.com/en-us/library/bb669084(v=vs.110).aspx.","queryCheck":{"query":"SELECT + perms.class_desc AS [Permission Class]\n ,perms.permission_name AS Permission\n ,type_desc + AS [Principal Type]\n ,prin.name AS Principal\nFROM sys.database_permissions + AS perms\nINNER JOIN sys.database_principals AS prin ON perms.grantee_principal_id + = prin.principal_id\nWHERE permission_name IN (\n ''ALTER''\n ,''ALTER + ANY USER''\n )\n AND user_name(grantee_principal_id) NOT IN (\n ''guest''\n ,''public''\n )\n AND + perms.class = 0\n AND [state] IN (''G'',''W'')\n AND NOT (\n prin.type + = ''S''\n AND prin.name = ''dbo''\n AND prin.authentication_type + = 1\n AND prin.owning_principal_id IS NULL\n )","expectedResult":[],"columnNames":["Permission + Class","Permission","Principal Type","Principal"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA2033","name":"VA2033","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA2033","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Revoke + permissions from principals where not needed. It is recommended to have at + most 1 principal granted a specific permission.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA2033","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"BaselineExpected","title":"Minimal + set of principals should be granted EXECUTE permission on objects or columns","description":"This + rule checks which principals are granted EXECUTE permission on objects or + columns to ensure this permission is granted to a minimal set of principals. + Every SQL Server securable has permissions associated with it that can be + granted to principals.\nPermissions can be scoped at the server level (assigned + to logins and server roles) or at the database level (assigned to database + users, database roles or application roles). The EXECUTE permission applies + to both stored procedures and scalar functions, which can be used in computed + columns.","rationale":"Developing an application using a least-privileged + user account (LUA) approach is an important part of a defensive, in-depth + strategy for countering security threats. The LUA approach ensures that users + follow the principle of least privilege and always log on with limited user + accounts. Administrative tasks are broken out using fixed server roles, and + the use of the sysadmin fixed server role is severely restricted. Always follow + the principle of least privilege when granting permissions to database users. + Grant the minimum permissions necessary to a user or role to accomplish a + given task. See https://msdn.microsoft.com/en-us/library/bb669084(v=vs.110).aspx.","queryCheck":{"query":"SELECT + perms.class_desc AS [Permission Class]\n ,object_schema_name(major_id) + AS [Schema]\n ,object_name(major_id) AS [Object]\n ,perms.permission_name + AS [Permission]\n ,type_desc AS [Principal Type]\n ,prin.name AS [Principal]\nFROM + sys.database_permissions AS perms\nINNER JOIN sys.database_principals AS prin + ON perms.grantee_principal_id = prin.principal_id\nWHERE permission_name IN + (''EXECUTE'')\n AND grantee_principal_id NOT IN (\n SELECT principal_id\n FROM + sys.database_principals\n WHERE name IN (''guest'', ''public'')\n )\n AND + perms.class = 1\n AND [state] IN (''G'', ''W'')","expectedResult":[],"columnNames":["Permission + Class","Schema","Object","Permission","Principal Type","Principal"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/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 each database-level firewall rule does not grant access + to more than 255 IP addresses.","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 AS [Firewall Rule Name]\n ,start_ip_address AS [Start Address]\n ,end_ip_address + AS [End 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-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA2064","name":"VA2064","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA2064","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Evaluate + each of the database-level firewall rules. Remove any rules that grant unnecessary + access and set the rest as a baseline. Deviations from the baseline will be + identified and brought to your attention in subsequent scans.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA2064","severity":"High","category":"SurfaceAreaReduction","ruleType":"BaselineExpected","title":"Database-level + firewall rules should be tracked and maintained at a strict minimum","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 enumerates all the database-level firewall rules so that any changes + made to them can be identified and addressed.","rationale":"Firewall rules + should be strictly configured to allow access only to client computers that + have a valid need to connect to the database. Any superfluous entries in the + firewall may pose a threat by allowing an unauthorized source access to your + database.","queryCheck":{"query":"SELECT name AS [Firewall Rule Name]\n ,start_ip_address + AS [Start Address]\n ,end_ip_address AS [End Address]\nFROM sys.database_firewall_rules","expectedResult":[],"columnNames":["Firewall + Rule Name","Start Address","End Address"]},"benchmarkReferences":[]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA2108","name":"VA2108","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA2108","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Remove + members who should not have access to the database role","scripts":[],"automated":true,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA2108","severity":"High","category":"AuthenticationAndAuthorization","ruleType":"BaselineExpected","title":"Minimal + set of principals should be members of fixed high impact database roles","description":"SQL + Server provides roles to help manage the permissions. Roles are security principals + that group other principals. Database-level roles are database-wide in their + permission scope. This rule checks that a minimal set of principals are members + of the fixed database roles.","rationale":"Fixed database roles may have administrative + permissions on the system. Following the principle of least privilege, it + is important to minimize membership in fixed database roles and keep a baseline + of these memberships. See https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles + for additional information on database roles.","queryCheck":{"query":"SELECT + user_name(sr.member_principal_id) AS [Principal]\n ,user_name(sr.role_principal_id) + AS [Role]\n ,type_desc AS [Principal Type]\n ,authentication_type_desc + AS [Authentication Type]\nFROM sys.database_role_members AS sr\nINNER JOIN + sys.database_principals AS sp ON sp.principal_id = sr.member_principal_id\nWHERE + sr.role_principal_id IN (\n user_id(''bulkadmin''),\n user_id(''db_accessadmin''),\n user_id(''db_securityadmin''),\n user_id(''db_ddladmin''),\n user_id(''db_backupoperator''))\n OR + (sr.role_principal_id = user_id(''db_owner'')\n AND sr.member_principal_id + <> user_id(''dbo''))","expectedResult":[],"columnNames":["Principal","Role","Principal + Type","Authentication Type"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA2109","name":"VA2109","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA2109","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Remove + members who should not have access to the database role","scripts":[],"automated":true,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA2109","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"BaselineExpected","title":"Minimal + set of principals should be members of fixed low impact database roles","description":"SQL + Server provides roles to help manage the permissions. Roles are security principals + that group other principals. Database-level roles are database-wide in their + permission scope. This rule checks that a minimal set of principals are members + of the fixed database roles.","rationale":"Fixed database roles may have administrative + permissions on the system. Following the principle of least privilege, it + is important to minimize membership in fixed database roles and keep a baseline + of these memberships. See https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles + for additional information on database roles.","queryCheck":{"query":"SELECT + user_name(sr.member_principal_id) as [Principal]\n ,user_name(sr.role_principal_id) + as [Role]\n ,type_desc as [Principal Type]\n ,authentication_type_desc + as [Authentication Type]\nFROM sys.database_role_members AS sr\nINNER JOIN + sys.database_principals AS sp ON sp.principal_id = sr.member_principal_id\nWHERE + sr.role_principal_id IN (\n user_id(''db_datareader'')\n ,user_id(''db_datawriter'')\n ,user_id(''db_denydatareader'')\n ,user_id(''db_denydatawriter'')\n )","expectedResult":[],"columnNames":["Principal","Role","Principal + Type","Authentication Type"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA2129","name":"VA2129","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA2129","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Baseline + or remove the signature from the modules ","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA2129","severity":"High","category":"AuthenticationAndAuthorization","ruleType":"BaselineExpected","title":"Changes + to signed modules should be authorized","description":"You can sign a stored + procedure, function or trigger with a certificate or an asymmetric key. This + is designed for scenarios when permissions cannot be inherited through ownership + chaining or when the ownership chain is broken, such as dynamic SQL. This + rule checks for changes made to signed modules which could be an indication + of malicious use.","rationale":"Changes made to the contents of a signed module + or to the certificate or asymmetric key that is used to sign it, as well as + the introduction of new signed modules could be an an indication of an attack. + Setting the known signed modules as a baseline allows you to easily detect + changes made, and to evaluate whether the changes are intended.","queryCheck":{"query":"SELECT + \n QUOTENAME(sc.name) + ''.'' + QUOTENAME(oj.name) AS [Module]\n ,IIF(ct.certificate_id + IS NOT NULL, ct.name, ak.name) AS [Signing Object]\n ,dp.name AS [Signing + Object Owner]\n ,cp.thumbprint AS [Signing Object Thumbprint]\n ,oj.modify_date + AS [Last Definition Modify Date]\n ,IIF(ct.certificate_id IS NOT NULL, + ''CERTIFICATE'', ''ASYMMETRIC KEY'') AS [Signing Object Type]\nFROM \n sys.crypt_properties + AS cp\n INNER JOIN sys.objects AS oj ON cp.major_id = oj.object_id\n INNER + JOIN sys.schemas AS sc ON oj.schema_id = sc.schema_id\n INNER JOIN sys.sql_modules + AS md ON md.object_id = cp.major_id\n LEFT OUTER JOIN sys.certificates + AS ct ON cp.thumbprint = ct.thumbprint\n LEFT OUTER JOIN sys.asymmetric_keys + AS ak ON cp.thumbprint = ak.thumbprint\n LEFT OUTER JOIN sys.database_principals + AS dp ON (ct.sid = dp.sid OR ak.sid = dp.sid)\nWHERE \n oj.type IN (''P'',''FN'',''TR'')\n AND + cp.class_desc = ''OBJECT_OR_COLUMN''\n AND oj.is_ms_shipped = 0","expectedResult":[],"columnNames":["Module","Signing + Object","Signing Object Owner","Signing Object Thumbprint","Last Definition + Modify Date","Signing Object Type"]},"benchmarkReferences":[{"benchmark":"CIS","reference":null}]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA2130","name":"VA2130","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA2130","status":"NonFinding","isTrimmed":false,"queryResults":[],"remediation":{"description":"Revoke + unnecessary access granted to users. Add the rest to the baseline. ","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA2130","severity":"Low","category":"AuthenticationAndAuthorization","ruleType":"BaselineExpected","title":"Track + all users with access to the database","description":"This check tracks all + users with access to a database. Make sure that these users are authorized + according to their current role in the organization. ","rationale":"Performing + a User Access Review helps identify accounts that were added to the server + maliciously and dormant accounts.","queryCheck":{"query":"WITH UsersAndRoles + (principal_name, sid, type) AS \n(\n SELECT DISTINCT prin.name, prin.sid, + prin.type \n FROM sys.database_principals prin \n INNER JOIN ( SELECT + *\n FROM sys.database_permissions\n WHERE + type = ''CO'' \n AND state IN (''G'', ''W'')\n ) + perm \n ON perm.grantee_principal_id = prin.principal_id \n WHERE + prin.type IN (''S'', ''X'', ''R'', ''E'', ''G'')\n UNION ALL\n SELECT + \n user_name(rls.member_principal_id), prin.sid, prin.type\n FROM + \n UsersAndRoles cte\n INNER JOIN sys.database_role_members + rls\n ON user_name(rls.role_principal_id) = cte.principal_name\n INNER + JOIN sys.database_principals prin\n ON rls.member_principal_id + = prin.principal_id\n WHERE cte.type = ''R''\n),\nUsers (database_user, + sid) AS\n(\n SELECT principal_name, sid\n FROM UsersAndRoles\n WHERE + type IN (''S'', ''X'', ''E'', ''G'')\n AND principal_name != ''dbo''\n)\nSELECT + DISTINCT database_user AS [User], sid AS [SID]\n FROM Users\n WHERE + sid != 0x01","expectedResult":[],"columnNames":["User","SID"]},"benchmarkReferences":[{"benchmark":"SOX","reference":null}]}}}]}' + headers: + cache-control: + - no-cache + content-length: + - '56436' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:58:26 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/5f9187fc-4d56-4eb0-afa7-69d6b4acf406 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: A44154394ED74741ADEEA82190FED43A Ref B: SN4AA2022305025 Ref C: 2026-06-03T08:58:26Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql results show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --scan-id --rule-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002%2Fdatabases%2Fvasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest/scanResults/VA1143?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1143","name":"VA1143","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1143","status":"Finding","isTrimmed":false,"queryResults":[["True"]],"remediation":{"description":"Create + users with low privileges to access the DB and any data stored in it with + the appropriate set of permissions.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":{"baseline":{"expectedResults":[["True"]],"updatedTime":"2026-06-03T08:58:22.6755997+00:00"},"status":"NonFinding","resultsNotInBaseline":[],"resultsOnlyInBaseline":[]},"ruleMetadata":{"ruleId":"VA1143","severity":"Medium","category":"SurfaceAreaReduction","ruleType":"Binary","title":"''dbo'' + user should not be used for normal service operation","description":"The ''dbo'', + or database owner, is a user account that has implied permissions to perform + all activities in the database. Members of the sysadmin fixed server role + are automatically mapped to dbo. This rule checks that dbo is not the only + account allowed to access this database. Please note that on a newly created + clean database this rule will fail until additional roles are created.","rationale":"A + compromised service that accesses the database with the ''dbo'' user account + will have full control of the database. To avoid this situation, lower privileged + users should be defined for normal service operation, while the ''dbo'' account + should only be used for administrative tasks that require this privilege.","queryCheck":{"query":"IF((SELECT + count(*) from sys.database_principals WHERE principal_id >= 5 AND principal_id + < 16384 ) > 0) SELECT 0 AS [Violation]\nELSE SELECT 1 AS [Violation]","expectedResult":[["0"]],"columnNames":["Violation"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}}' + headers: + cache-control: + - no-cache + content-length: + - '2110' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:58:29 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/83ed8683-708d-4df1-bed5-35f8f4df4595 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 7A66C25B3C514788AB2B518971903526 Ref B: SN4AA2022302035 Ref C: 2026-06-03T08:58:29Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql results show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --scan-id --scan-result-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002%2Fdatabases%2Fvasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest/scanResults/VA1143?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1143","name":"VA1143","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1143","status":"Finding","isTrimmed":false,"queryResults":[["True"]],"remediation":{"description":"Create + users with low privileges to access the DB and any data stored in it with + the appropriate set of permissions.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":{"baseline":{"expectedResults":[["True"]],"updatedTime":"2026-06-03T08:58:22.6755997+00:00"},"status":"NonFinding","resultsNotInBaseline":[],"resultsOnlyInBaseline":[]},"ruleMetadata":{"ruleId":"VA1143","severity":"Medium","category":"SurfaceAreaReduction","ruleType":"Binary","title":"''dbo'' + user should not be used for normal service operation","description":"The ''dbo'', + or database owner, is a user account that has implied permissions to perform + all activities in the database. Members of the sysadmin fixed server role + are automatically mapped to dbo. This rule checks that dbo is not the only + account allowed to access this database. Please note that on a newly created + clean database this rule will fail until additional roles are created.","rationale":"A + compromised service that accesses the database with the ''dbo'' user account + will have full control of the database. To avoid this situation, lower privileged + users should be defined for normal service operation, while the ''dbo'' account + should only be used for administrative tasks that require this privilege.","queryCheck":{"query":"IF((SELECT + count(*) from sys.database_principals WHERE principal_id >= 5 AND principal_id + < 16384 ) > 0) SELECT 0 AS [Violation]\nELSE SELECT 1 AS [Violation]","expectedResult":[["0"]],"columnNames":["Violation"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}}' + headers: + cache-control: + - no-cache + content-length: + - '2110' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:58:31 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/6af86f9d-9671-4fa4-9735-9026772707c5 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 755E1209005141C88A971956F604BD0D Ref B: SN4AA2022303017 Ref C: 2026-06-03T08:58:31Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql baseline delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-id --rule-id --yes + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: DELETE + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002%2Fdatabases%2Fvasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1143?api-version=2026-04-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 03 Jun 2026 08:58:35 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/dd799d90-0422-425d-8d67-6f8507502bd5 + x-ms-ratelimit-remaining-subscription-deletes: + - '799' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '11999' + x-msedge-ref: + - 'Ref A: 7973063CB8C44DDBB0F1BA0B65122FC8 Ref B: SN4AA2022301053 Ref C: 2026-06-03T08:58:35Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql baseline show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --rule-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002%2Fdatabases%2Fvasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1143?api-version=2026-04-01-preview + response: + body: + string: '{"code":"NoRuleBaseline","message":"Baseline for rule Id ''VA1143'' + was not found for the latest available scan"}' + headers: + cache-control: + - no-cache + content-length: + - '111' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:58:38 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=ccd41aaac4bddd2b9577dc8abbae5f668404e347cb504263c18791fbd2622ace;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/d3f85af0-5411-4b45-9f36-73b28fedcd5d + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 6898AAAC5361429093E37D9944A099C0 Ref B: SN4AA2022305029 Ref C: 2026-06-03T08:58:38Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql results show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --scan-id --rule-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002%2Fdatabases%2Fvasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest/scanResults/VA1143?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d/scanResults/VA1143","name":"VA1143","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1143","status":"Finding","isTrimmed":false,"queryResults":[["True"]],"remediation":{"description":"Create + users with low privileges to access the DB and any data stored in it with + the appropriate set of permissions.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1143","severity":"Medium","category":"SurfaceAreaReduction","ruleType":"Binary","title":"''dbo'' + user should not be used for normal service operation","description":"The ''dbo'', + or database owner, is a user account that has implied permissions to perform + all activities in the database. Members of the sysadmin fixed server role + are automatically mapped to dbo. This rule checks that dbo is not the only + account allowed to access this database. Please note that on a newly created + clean database this rule will fail until additional roles are created.","rationale":"A + compromised service that accesses the database with the ''dbo'' user account + will have full control of the database. To avoid this situation, lower privileged + users should be defined for normal service operation, while the ''dbo'' account + should only be used for administrative tasks that require this privilege.","queryCheck":{"query":"IF((SELECT + count(*) from sys.database_principals WHERE principal_id >= 5 AND principal_id + < 16384 ) > 0) SELECT 0 AS [Violation]\nELSE SELECT 1 AS [Violation]","expectedResult":[["0"]],"columnNames":["Violation"]},"benchmarkReferences":[{"benchmark":"FedRAMP","reference":null}]}}}' + headers: + cache-control: + - no-cache + content-length: + - '1946' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:58:40 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/8f67506a-c059-465a-bb9b-bbc4d23ff860 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 621B5D1A49294F768ED685B91F70256F Ref B: SN4AA2022301017 Ref C: 2026-06-03T08:58:40Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans list + Connection: + - keep-alive + ParameterSetName: + - --resource-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002%2Fdatabases%2Fvasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans?api-version=2026-04-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/sqlServers/vasqlsrv000002/databases/vasqldb000003/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/aa735d1b-92ce-42f9-adc6-ef1806a65e0d","name":"aa735d1b-92ce-42f9-adc6-ef1806a65e0d","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans","properties":{"triggerType":"OnDemand","state":"Failed","server":"vasqlsrv000002","database":"vasqldb000003","sqlVersion":"17.0.9114","startTime":"2026-06-03T08:57:48.2047016+00:00","endTime":"2026-06-03T08:57:50.0205424+00:00","highSeverityFailedRulesCount":0,"mediumSeverityFailedRulesCount":1,"lowSeverityFailedRulesCount":0,"totalPassedRulesCount":23,"totalFailedRulesCount":1,"totalRulesCount":24,"isBaselineApplied":true,"lastScanTime":"2026-06-03T08:57:50.0205424+00:00"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '907' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:58:42 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/42643088-094d-499a-bcac-5794e7c6dd14 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: D6127AF714CB4218B5700F8D70E65E19 Ref B: SN4AA2022303009 Ref C: 2026-06-03T08:58:42Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-id --yes + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: DELETE + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default?api-version=2026-04-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 03 Jun 2026 08:58:47 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=a3b16d20d800a4419233074ddbba9273740533f5f980aaeb88608d3e082f144f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/20c82323-fafc-417c-a531-4f83d84be74f + x-ms-ratelimit-remaining-subscription-deletes: + - '799' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '11999' + x-msedge-ref: + - 'Ref A: C1D566BEF2364FC48A197E0A958F2441 Ref B: SN4AA2022304053 Ref C: 2026-06-03T08:58:45Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql show + Connection: + - keep-alive + ParameterSetName: + - --resource-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fcli_test_va_sql_paas_000001%2Fproviders%2FMicrosoft.Sql%2Fservers%2Fvasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_va_sql_paas_000001/providers/Microsoft.Sql/servers/vasqlsrv000002/providers/Microsoft.Security/sqlVulnerabilityAssessments/default","name":"default","type":"Microsoft.Security/sqlVulnerabilityAssessments","properties":{"creationTime":"0001-01-01T00:00:00+00:00","state":"Disabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '365' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 08:58:49 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;Secure;Domain=mgmt.eus.sqlva.security.azure.com + - ARRAffinitySameSite=907a2f94db15ddc08608cd31db8cf0f98a4a6a82360f048f9c8a0eb23c1d6c0e;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.eus.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/eastus/24331be5-9de5-474f-b23f-571ff425aee8 + x-ms-ratelimit-remaining-subscription-resource-requests: + - '249' + x-msedge-ref: + - 'Ref A: B303715AFDD7472EAC09BCB031FF5322 Ref B: SN4AA2022303023 Ref C: 2026-06-03T08:58:49Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/security/tests/latest/test_security_va_sql_scenario.py b/src/azure-cli/azure/cli/command_modules/security/tests/latest/test_security_va_sql_scenario.py new file mode 100644 index 00000000000..abfcbf79a15 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/tests/latest/test_security_va_sql_scenario.py @@ -0,0 +1,456 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long + +import time + +from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer, JMESPathCheck +from azure.cli.testsdk.scenario_tests import AllowLargeResponse + + +class SecurityVaSqlScenarioTest(ScenarioTest): + """End-to-end scenario tests for ``az security va sql ...``. + + Each ``*_lifecycle`` test exercises the full happy-path flow against a single + resource type. The flow covers every command in the ``security va sql`` tree + except the deprecated ``baseline set`` alias (covered by the negative test). + """ + + @AllowLargeResponse(size_kb=4096) + @ResourceGroupPreparer(name_prefix='cli_test_va_sql_paas_', location='eastus') + def test_security_va_sql_paas_lifecycle(self, resource_group): + """PaaS path: Azure SQL Server + Database. + + Steps (matching RESUME_HERE.md plan): + 1. settings create + 2. settings show + 3. settings update (Disabled) + 4. settings show (verify Disabled) + 4b. settings update (re-enable so we can scan) + 5. scans initiate-scan (blocking LRO -- implicitly exercises scan-operation-result show internally) + 6. scans show --scan-id latest + 7. baseline add --latest-scan true + 8. baseline list + 9. baseline create --rule-id X + 10. baseline show + 11. results list + 12. results show --rule-id X (preferred alias) + 13. results show --scan-result-id X (legacy alias on the same call) + 14. baseline delete + 15. results show (after baseline removed) + 16. scans list + 17. settings delete + """ + self.kwargs.update({ + 'srv': self.create_random_name('vasqlsrv', 20), + 'db': self.create_random_name('vasqldb', 20), + }) + + # ---- Resource setup ---------------------------------------------------------- + # The DS-SQLVA_Playground subscription (and any sub under the + # CnAIOrchestrationServicePublicCorpprod management group) is governed by the + # `SafeSec-SQLSr-OptIn-V2-0` policy assignment, which denies SQL server creation + # unless `--enable-ad-only-auth` is set. We therefore create the server with the + # signed-in user (the test runner) as the Entra-only admin -- no SQL password. + # A second deny-policy at the same MG level + # (`[CESEC][NonProduction] Deny SQL Servers with Public Networks Access Enabled`) + # blocks server creation unless the RG carries the tag + # `AllowSqlServersWithAllNetworksEnabled` (any value, since the policy checks + # `Exists`). We add that tag here before creating the server. The VA scan + # service reaches the SQL server over the public path via the + # "Allow Azure Services" firewall rule below, so we cannot just set + # `--public-network-access Disabled` as an alternative escape hatch. + admin = self.cmd('ad signed-in-user show').get_output_in_json() + self.kwargs['admin_upn'] = admin.get('userPrincipalName') or admin.get('mail') + self.kwargs['admin_oid'] = admin['id'] + + self.cmd('group update -n {rg} --tags AllowSqlServersWithAllNetworksEnabled=true') + + server = self.cmd( + 'sql server create -g {rg} -n {srv} ' + '--enable-ad-only-auth ' + '--external-admin-principal-type User ' + '--external-admin-name "{admin_upn}" ' + '--external-admin-sid {admin_oid}' + ).get_output_in_json() + # Allow Azure services so the VA service can reach the server. + self.cmd( + 'sql server firewall-rule create -g {rg} --server {srv} ' + '--name AllowAzureServices --start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0' + ) + self.cmd('sql db create -g {rg} --server {srv} -n {db} --service-objective S0') + # Two distinct scopes for the VA commands (2026-04-01-preview): + # - `srv_id`: server scope -- used by `security va sql {create,show,update,delete}` (settings singleton) + # - `db_id` : database scope -- used by `scans`, `baseline`, and `results` + self.kwargs['srv_id'] = server['id'] + self.kwargs['db_id'] = '{0}/databases/{1}'.format(server['id'], self.kwargs['db']) + + # ---- Step 1: settings create ------------------------------------------------- + self.cmd( + 'security va sql create --resource-id {srv_id} --state Enabled', + checks=[ + JMESPathCheck('name', 'default'), + JMESPathCheck('properties.state', 'Enabled'), + ], + ) + + # ---- Step 2: settings show --------------------------------------------------- + self.cmd( + 'security va sql show --resource-id {srv_id}', + checks=[ + JMESPathCheck('name', 'default'), + JMESPathCheck('properties.state', 'Enabled'), + ], + ) + + # ---- Step 3: settings update -> Disabled ------------------------------------- + self.cmd( + 'security va sql update --resource-id {srv_id} --state Disabled', + checks=[JMESPathCheck('properties.state', 'Disabled')], + ) + + # ---- Step 4: settings show (verify Disabled) --------------------------------- + self.cmd( + 'security va sql show --resource-id {srv_id}', + checks=[JMESPathCheck('properties.state', 'Disabled')], + ) + + # ---- Step 4b: re-enable so the scan can run --------------------------------- + self.cmd( + 'security va sql update --resource-id {srv_id} --state Enabled', + checks=[JMESPathCheck('properties.state', 'Enabled')], + ) + + # ---- Step 5: initiate scan (blocking LRO) ----------------------------------- + # The LRO poller hits the same endpoint as `scan-operation-result show` + # internally, so this single call covers both commands. NOTE: the + # response is the LRO *operation* result (its `name` is the operationId, + # NOT a scan id), so we don't capture scan_id from here -- we get it + # from `scans show --scan-id latest` below. + op_result = self.cmd( + 'security va sql scans initiate-scan --resource-id {db_id}' + ).get_output_in_json() + assert op_result, 'initiate-scan should return an operation result once polling completes' + + # ---- Step 6: scans show ------------------------------------------------------ + # `latest` is a server-side alias resolving to the most recent scan. + # The `scans/{scanId}` GET endpoint can briefly return + # `ResultsAreNotAvailableYet` (404) right after the LRO completes, so + # we retry that specific transient error with a small backoff. Any + # other failure is propagated immediately. + scans_show_cmd = 'security va sql scans show --resource-id {db_id} --scan-id latest' + result = None + for attempt in range(8): # up to ~160s of waiting + try: + result = self.cmd(scans_show_cmd) + break + except Exception as ex: # pylint: disable=broad-except + msg = str(ex) + is_transient = ( + 'ResultsAreNotAvailableYet' in msg + or 'Results are not available yet' in msg + ) + if attempt < 7 and is_transient: + time.sleep(20) + continue + raise + data = result.get_output_in_json() + assert data.get('name'), 'scans show should return a record with a name (the scan id)' + assert data.get('properties', {}).get('totalRulesCount', 0) >= 1, \ + 'scan record should report at least one rule' + # Canonical scan id for downstream calls (also matches what `latest` resolves to). + self.kwargs['scan_id'] = data['name'] + + # ---- Step 7: baseline add --latest-scan true (bulk) ------------------------- + bulk = self.cmd( + 'security va sql baseline add --resource-id {db_id} --latest-scan true' + ).get_output_in_json() + # `baseline add` is a bulk POST returning a {value: [...]} envelope. + # In a defensive form, accept either shape (some azure-cli versions + # unwrap, some don't). + if isinstance(bulk, dict): + bulk_list = bulk.get('value') or [] + else: + bulk_list = bulk or [] + assert len(bulk_list) >= 1, \ + 'baseline add --latest-scan true should return at least one baselined rule' + + # ---- Step 8: baseline list --------------------------------------------------- + # Azure CLI's `list` commands unwrap the {value: [...]} envelope and + # return a plain list, so iterate directly. + baselines = self.cmd( + 'security va sql baseline list --resource-id {db_id}' + ).get_output_in_json() + assert isinstance(baselines, list) and len(baselines) >= 1, \ + 'baseline list should return entries after bulk add' + # Pick the first rule for single-rule operations below. + self.kwargs['rule_id'] = baselines[0]['name'] + + # ---- Step 9: baseline create (single rule, from latest scan) ---------------- + # Using --latest-scan rather than --results avoids guessing the rule's + # expected-results schema (each rule has its own column shape) and keeps + # the test recording stable across rule sets. The mutex with --results + # is exercised by `test_security_va_sql_negative`. + # NOTE: JMESPathCheck does NOT run `.format()` on the expected value, + # so we must resolve `{rule_id}` to its actual value here (and below). + rule_id = self.kwargs['rule_id'] + self.cmd( + 'security va sql baseline create --resource-id {db_id} ' + '--rule-id {rule_id} --latest-scan true', + checks=[JMESPathCheck('name', rule_id)], + ) + + # ---- Step 10: baseline show -------------------------------------------------- + self.cmd( + 'security va sql baseline show --resource-id {db_id} --rule-id {rule_id}', + checks=[ + JMESPathCheck('name', rule_id), + ], + ) + + # ---- Step 11: results list ------------------------------------------------- + results = self.cmd( + 'security va sql results list --resource-id {db_id} --scan-id latest' + ).get_output_in_json() + assert isinstance(results, list) and len(results) >= 1, \ + 'results list should return scan results' + + # ---- Step 12: results show via --rule-id (preferred alias) ------------------- + self.cmd( + 'security va sql results show --resource-id {db_id} ' + '--scan-id latest --rule-id {rule_id}', + checks=[JMESPathCheck('properties.ruleMetadata.ruleId', rule_id)], + ) + + # ---- Step 13: results show via --scan-result-id (legacy alias) -------------- + # Same call, different option name. Both must work after the alias change. + self.cmd( + 'security va sql results show --resource-id {db_id} ' + '--scan-id latest --scan-result-id {rule_id}', + checks=[JMESPathCheck('properties.ruleMetadata.ruleId', rule_id)], + ) + + # ---- Step 14: baseline delete ------------------------------------------------ + self.cmd( + 'security va sql baseline delete --resource-id {db_id} --rule-id {rule_id} --yes' + ) + # Sanity: show should now 404 (or return without a baseline section). + self.cmd( + 'security va sql baseline show --resource-id {db_id} --rule-id {rule_id}', + expect_failure=True, + ) + + # ---- Step 15: results show after baseline removed ---------------------------- + # We don't assert the adjusted status (it depends on the rule's real results); + # just verify the call still succeeds. + self.cmd( + 'security va sql results show --resource-id {db_id} ' + '--scan-id latest --rule-id {rule_id}', + checks=[JMESPathCheck('properties.ruleMetadata.ruleId', rule_id)], + ) + + # ---- Step 16: scans list ----------------------------------------------------- + scans = self.cmd( + 'security va sql scans list --resource-id {db_id}' + ).get_output_in_json() + assert isinstance(scans, list) and len(scans) >= 1, \ + 'scans list should include at least the scan we initiated' + + # ---- Step 17: settings delete ------------------------------------------------ + self.cmd('security va sql delete --resource-id {srv_id} --yes') + # After delete the resource is not removed; service flips state to + # "Disabled" and resets creationTime. Verify the state transition. + self.cmd( + 'security va sql show --resource-id {srv_id}', + checks=[self.check('properties.state', 'Disabled')], + ) + + @AllowLargeResponse(size_kb=4096) + @ResourceGroupPreparer(name_prefix='cli_test_va_sql_dbname_', location='eastus') + def test_security_va_sql_paas_dbname_form(self, resource_group): + """PaaS path exercising the ``--database-name`` query-string form. + + For database-scoped commands (scans / baseline / results), the new API + accepts two URL shapes: + + 1. ``--resource-id /sub/.../servers/{srv}/databases/{db}`` + (DB embedded in the resource id -- covered by ``*_lifecycle``) + + 2. ``--resource-id /sub/.../servers/{srv} --database-name {db}`` + (server-level URL with a ``?databaseName=`` query string -- the + ONLY way to assess system databases like ``master``) + + This test covers form 2 end-to-end. Each command below uses ``srv_id`` + (NOT ``db_id``) plus ``--database-name``, so we exercise the + ``serialize_query_param("databaseName", ...)`` path in the codegen. + """ + self.kwargs.update({ + 'srv': self.create_random_name('vasqlsrv', 20), + 'db': self.create_random_name('vasqldb', 20), + }) + + # ---- Resource setup (mirrors test_security_va_sql_paas_lifecycle) ---------- + admin = self.cmd('ad signed-in-user show').get_output_in_json() + self.kwargs['admin_upn'] = admin.get('userPrincipalName') or admin.get('mail') + self.kwargs['admin_oid'] = admin['id'] + + self.cmd('group update -n {rg} --tags AllowSqlServersWithAllNetworksEnabled=true') + + server = self.cmd( + 'sql server create -g {rg} -n {srv} ' + '--enable-ad-only-auth ' + '--external-admin-principal-type User ' + '--external-admin-name "{admin_upn}" ' + '--external-admin-sid {admin_oid}' + ).get_output_in_json() + self.cmd( + 'sql server firewall-rule create -g {rg} --server {srv} ' + '--name AllowAzureServices --start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0' + ) + self.cmd('sql db create -g {rg} --server {srv} -n {db} --service-objective S0') + self.kwargs['srv_id'] = server['id'] + + # ---- Enable VA at the server (settings call, no --database-name needed) ---- + self.cmd( + 'security va sql create --resource-id {srv_id} --state Enabled', + checks=[JMESPathCheck('properties.state', 'Enabled')], + ) + + # ---- scans initiate-scan via --database-name ------------------------------- + # Blocking LRO; implicitly exercises scan-operation-result polling on the + # server+dbname URL shape. + self.cmd( + 'security va sql scans initiate-scan --resource-id {srv_id} ' + '--database-name {db}' + ) + + # ---- scans show via --database-name (with backoff on transient 404) ------- + scans_show_cmd = ( + 'security va sql scans show --resource-id {srv_id} ' + '--database-name {db} --scan-id latest' + ) + result = None + for attempt in range(8): + try: + result = self.cmd(scans_show_cmd) + break + except Exception as ex: # pylint: disable=broad-except + msg = str(ex) + is_transient = ( + 'ResultsAreNotAvailableYet' in msg + or 'Results are not available yet' in msg + ) + if attempt < 7 and is_transient: + time.sleep(20) + continue + raise + data = result.get_output_in_json() + assert data.get('name'), 'scans show should return a scan record with a name' + + # ---- baseline add via --database-name -------------------------------------- + bulk = self.cmd( + 'security va sql baseline add --resource-id {srv_id} ' + '--database-name {db} --latest-scan true' + ).get_output_in_json() + bulk_list = bulk.get('value') if isinstance(bulk, dict) else (bulk or []) + assert bulk_list, 'baseline add via --database-name should return baselined rules' + + # ---- baseline list via --database-name ------------------------------------- + baselines = self.cmd( + 'security va sql baseline list --resource-id {srv_id} --database-name {db}' + ).get_output_in_json() + assert isinstance(baselines, list) and len(baselines) >= 1, \ + 'baseline list via --database-name should return entries' + self.kwargs['rule_id'] = baselines[0]['name'] + rule_id = self.kwargs['rule_id'] + + # ---- baseline show via --database-name ------------------------------------- + self.cmd( + 'security va sql baseline show --resource-id {srv_id} ' + '--database-name {db} --rule-id {rule_id}', + checks=[JMESPathCheck('name', rule_id)], + ) + + # ---- results list via --database-name -------------------------------------- + results = self.cmd( + 'security va sql results list --resource-id {srv_id} ' + '--database-name {db} --scan-id latest' + ).get_output_in_json() + assert isinstance(results, list) and len(results) >= 1, \ + 'results list via --database-name should return scan results' + + # ---- results show via --database-name -------------------------------------- + self.cmd( + 'security va sql results show --resource-id {srv_id} ' + '--database-name {db} --scan-id latest --rule-id {rule_id}', + checks=[JMESPathCheck('properties.ruleMetadata.ruleId', rule_id)], + ) + + # ---- baseline delete via --database-name ----------------------------------- + self.cmd( + 'security va sql baseline delete --resource-id {srv_id} ' + '--database-name {db} --rule-id {rule_id} --yes' + ) + + # ---- Cleanup: disable VA on the server ------------------------------------- + self.cmd('security va sql delete --resource-id {srv_id} --yes') + + def test_security_va_sql_negative(self): + """Negative-path coverage that doesn't need any cloud resources. + + - The argument validators run during argparse, before any HTTP call, so + a fake ``--resource-id`` is sufficient to trigger them. + - The deprecated ``baseline set`` alias should still be registered and + should emit a deprecation warning (visible in --help). + + NOTE on brace escaping: ``self.cmd()`` runs ``cmd.format(**self.kwargs)`` + on the command string, so literal ``{`` / ``}`` (from JSON object syntax) + must be doubled to survive the format call. + """ + self.kwargs.update({ + 'fake_rid': ('/subscriptions/00000000-0000-0000-0000-000000000000' + '/resourceGroups/x/providers/Microsoft.Sql/servers/s/databases/d'), + }) + + # 1. --latest-scan and --results are mutually exclusive on `baseline create`. + # NOTE: ExecutionResult doesn't capture stderr (testsdk limitation -- see + # azure.cli.testsdk.base.ExecutionResult._in_process_execute), so we cannot + # assert on the validator message text. expect_failure=True is sufficient + # because the validator runs in pre_operations() before any HTTP call, so + # the failure cannot come from the fake resource-id reaching the wire. + self.cmd( + 'security va sql baseline create --resource-id "{fake_rid}" ' + '--rule-id VA1234 --latest-scan true ' + '--results "[[\\"a\\",\\"b\\"]]"', + expect_failure=True, + ) + + # 2. Same for `baseline add`. + # `baseline add --results` takes a {rule_id: rows} JSON object, hence + # the doubled braces around "VA1234". + self.cmd( + 'security va sql baseline add --resource-id "{fake_rid}" ' + '--latest-scan true --results "{{\\"VA1234\\":[[\\"a\\",\\"b\\"]]}}"', + expect_failure=True, + ) + + # 3. Deprecated `baseline set` is still registered as a command, with a + # Deprecated marker pointing at `baseline add` as the redirect target. + # We use command-table introspection rather than parsing help text + # because the in-process invocation routes help output to stderr, + # which the testsdk does not capture (`ExecutionResult.output` is + # stdout-only). The lazy loader only loads what we've parsed, so we + # explicitly request the `baseline set` subtree first. + loader = self.cli_ctx.invocation.commands_loader + loader.load_command_table(['security', 'va', 'sql', 'baseline', 'set']) + cmd = loader.command_table.get('security va sql baseline set') + assert cmd is not None, \ + '`security va sql baseline set` should be registered' + deprecate_info = getattr(cmd, 'deprecate_info', None) + assert deprecate_info is not None, \ + '`baseline set` should carry a Deprecated marker' + assert getattr(deprecate_info, 'redirect', '') == 'az security va sql baseline add', \ + 'Deprecated marker on `baseline set` should redirect to `az security va sql baseline add`' From 5bd5cf14bda0057a1e031f9b798a17f56c85616b Mon Sep 17 00:00:00 2001 From: GalGoldi72 Date: Wed, 3 Jun 2026 12:30:57 +0300 Subject: [PATCH 5/7] [Security] az security va sql: Add Arc-enabled SQL scenario test Adds test_security_va_sql_arc_lifecycle, which exercises the new aaz 'security va sql' commands against an Arc-enabled SQL Server hosted on a Microsoft.HybridCompute/machines resource. Coverage differs from PaaS because the RP returns 404 ResourceTypeNotSupported on Arc for: settings (create/show/update/delete), scans initiate-scan, and scan-operation-result show (scans are auto-scheduled by the agent, not API-triggerable). The Arc test therefore covers scans (show via --scan-id latest + list), results (list + show via both --rule-id and --scan-result-id), and a non-destructive baseline create/show/delete round-trip on a single rule that is not already baselined. The test targets a pre-existing real resource (rg=ggoldshtein, arc=galLaptop, srv=SQLEXPRESS, db=master) instead of using ResourceGroupPreparer because Arc infra cannot be provisioned in a test setup hook. Subscription id is constructed via self.get_subscription_id() so the cassette is portable; the recording sub id has been anonymized to 00000000-...-0. Service quirks discovered while authoring this test (noted as inline comments): * baseline list returns 404 NoBaseline (not an empty list) when zero baselines exist on the DB -- test wraps the call to treat it as empty set * baseline create --latest-scan true fails with 400 EmptyBaseline on rules with status != 'Finding' -- test filters rule selection to status='Finding' only Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../test_security_va_sql_arc_lifecycle.yaml | 1821 +++++++++++++++++ .../latest/test_security_va_sql_scenario.py | 169 ++ 2 files changed, 1990 insertions(+) create mode 100644 src/azure-cli/azure/cli/command_modules/security/tests/latest/recordings/test_security_va_sql_arc_lifecycle.yaml diff --git a/src/azure-cli/azure/cli/command_modules/security/tests/latest/recordings/test_security_va_sql_arc_lifecycle.yaml b/src/azure-cli/azure/cli/command_modules/security/tests/latest/recordings/test_security_va_sql_arc_lifecycle.yaml new file mode 100644 index 00000000000..7473e8d386f --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/security/tests/latest/recordings/test_security_va_sql_arc_lifecycle.yaml @@ -0,0 +1,1821 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --scan-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fggoldshtein%2Fproviders%2FMicrosoft.HybridCompute%2Fmachines%2FgalLaptop%2FsqlServers%2FSQLEXPRESS%2Fdatabases%2Fmaster/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337","name":"a9f98e23-7917-405f-adbe-c0a82bafd337","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans","properties":{"triggerType":"Recurring","state":"Failed","server":"SQLEXPRESS","database":"master","sqlVersion":"16.0.1175","startTime":"2026-05-01T23:09:00.50593+00:00","endTime":"2026-05-01T23:09:01.9603422+00:00","highSeverityFailedRulesCount":6,"mediumSeverityFailedRulesCount":2,"lowSeverityFailedRulesCount":9,"totalPassedRulesCount":41,"totalFailedRulesCount":17,"totalRulesCount":58,"isBaselineApplied":false,"lastScanTime":"2026-05-31T21:25:48.9582034+00:00"}}' + headers: + cache-control: + - no-cache + content-length: + - '864' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:26:41 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=dde7293a6aad00db58800ee68945263f3c56235c3ff8f6c8af4e7bca136cefe9;Path=/;HttpOnly;Secure;Domain=mgmt.weu.sqlva.security.azure.com + - ARRAffinitySameSite=dde7293a6aad00db58800ee68945263f3c56235c3ff8f6c8af4e7bca136cefe9;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.weu.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/westeurope/8e86f110-4ad5-4fc7-870f-d563cbf3b1a1 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 7E66ABCCCFC14B2F97AB2B75D00BCB34 Ref B: SN4AA2022305033 Ref C: 2026-06-03T09:26:41Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql scans list + Connection: + - keep-alive + ParameterSetName: + - --resource-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fggoldshtein%2Fproviders%2FMicrosoft.HybridCompute%2Fmachines%2FgalLaptop%2FsqlServers%2FSQLEXPRESS%2Fdatabases%2Fmaster/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans?api-version=2026-04-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337","name":"a9f98e23-7917-405f-adbe-c0a82bafd337","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans","properties":{"triggerType":"Recurring","state":"Failed","server":"SQLEXPRESS","database":"master","sqlVersion":"16.0.1175","startTime":"2026-05-01T23:09:00.50593+00:00","endTime":"2026-05-01T23:09:01.9603422+00:00","highSeverityFailedRulesCount":6,"mediumSeverityFailedRulesCount":2,"lowSeverityFailedRulesCount":9,"totalPassedRulesCount":41,"totalFailedRulesCount":17,"totalRulesCount":58,"isBaselineApplied":false,"lastScanTime":"2026-05-31T21:25:48.9582034+00:00"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/16359d49-696c-4e4e-91cb-dac08fbc5185","name":"16359d49-696c-4e4e-91cb-dac08fbc5185","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans","properties":{"triggerType":"Recurring","state":"Failed","server":"SQLEXPRESS","database":"master","sqlVersion":"16.0.1170","startTime":"2026-03-19T10:51:07.6906146+00:00","endTime":"2026-05-01T23:09:00.50593+00:00","highSeverityFailedRulesCount":1,"mediumSeverityFailedRulesCount":0,"lowSeverityFailedRulesCount":0,"totalPassedRulesCount":57,"totalFailedRulesCount":1,"totalRulesCount":58,"isBaselineApplied":true,"lastScanTime":"2026-04-19T05:52:30.4818792+00:00"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/8f7169ae-af39-4278-866b-e0106f67fae3","name":"8f7169ae-af39-4278-866b-e0106f67fae3","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans","properties":{"triggerType":"Recurring","state":"Failed","server":"SQLEXPRESS","database":"master","sqlVersion":"16.0.1165","startTime":"2026-02-15T06:47:07.5249615+00:00","endTime":"2026-03-19T10:51:07.6906146+00:00","highSeverityFailedRulesCount":6,"mediumSeverityFailedRulesCount":2,"lowSeverityFailedRulesCount":9,"totalPassedRulesCount":41,"totalFailedRulesCount":17,"totalRulesCount":58,"isBaselineApplied":false,"lastScanTime":"2026-03-15T07:42:32.0259528+00:00"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/5769a795-f510-4eb3-859d-027898d8733e","name":"5769a795-f510-4eb3-859d-027898d8733e","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans","properties":{"triggerType":"Recurring","state":"Failed","server":"SQLEXPRESS","database":"master","sqlVersion":"16.0.1160","startTime":"2026-01-11T16:58:17.5627615+00:00","endTime":"2026-02-15T06:47:07.5249615+00:00","highSeverityFailedRulesCount":6,"mediumSeverityFailedRulesCount":2,"lowSeverityFailedRulesCount":9,"totalPassedRulesCount":41,"totalFailedRulesCount":17,"totalRulesCount":58,"isBaselineApplied":false,"lastScanTime":"2026-02-10T09:43:23.2210168+00:00"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a2c76e5e-d508-4497-94be-957846027515","name":"a2c76e5e-d508-4497-94be-957846027515","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans","properties":{"triggerType":"Recurring","state":"Failed","server":"SQLEXPRESS","database":"master","sqlVersion":"16.0.1160","startTime":"2025-12-09T22:31:51.1522545+00:00","endTime":"2026-01-11T16:58:17.5627615+00:00","highSeverityFailedRulesCount":6,"mediumSeverityFailedRulesCount":2,"lowSeverityFailedRulesCount":9,"totalPassedRulesCount":41,"totalFailedRulesCount":17,"totalRulesCount":58,"isBaselineApplied":false,"lastScanTime":"2026-01-07T15:30:37.3740773+00:00"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '4340' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:26:44 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=dde7293a6aad00db58800ee68945263f3c56235c3ff8f6c8af4e7bca136cefe9;Path=/;HttpOnly;Secure;Domain=mgmt.weu.sqlva.security.azure.com + - ARRAffinitySameSite=dde7293a6aad00db58800ee68945263f3c56235c3ff8f6c8af4e7bca136cefe9;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.weu.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/westeurope/a312e691-d079-4942-a365-b1883a718af0 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: B7AFAEE6F1E04996A49579B9F968505E Ref B: SN4AA2022303027 Ref C: 2026-06-03T09:26:44Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql baseline list + Connection: + - keep-alive + ParameterSetName: + - --resource-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fggoldshtein%2Fproviders%2FMicrosoft.HybridCompute%2Fmachines%2FgalLaptop%2FsqlServers%2FSQLEXPRESS%2Fdatabases%2Fmaster/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules?api-version=2026-04-01-preview + response: + body: + string: '{"code":"NoBaseline","message":"No baseline have been found for the + latest scan in the resource"}' + headers: + cache-control: + - no-cache + content-length: + - '97' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:26:48 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=53d7102ba7b7aa493cd3de5970e95651c20119e6b0c1ed18814931e0ad33bdcb;Path=/;HttpOnly;Secure;Domain=mgmt.weu.sqlva.security.azure.com + - ARRAffinitySameSite=53d7102ba7b7aa493cd3de5970e95651c20119e6b0c1ed18814931e0ad33bdcb;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.weu.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/westeurope/4af02e70-b54a-46bb-83fc-7924b6625b99 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: A869AABDB6FE48FBBB2DE032267F62CC Ref B: SN4AA2022305053 Ref C: 2026-06-03T09:26:47Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql results list + Connection: + - keep-alive + ParameterSetName: + - --resource-id --scan-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fggoldshtein%2Fproviders%2FMicrosoft.HybridCompute%2Fmachines%2FgalLaptop%2FsqlServers%2FSQLEXPRESS%2Fdatabases%2Fmaster/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest/scanResults?api-version=2026-04-01-preview + response: + body: + string: "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1017\",\"name\":\"VA1017\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1017\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Revoke + EXECUTE permission on xp_cmdshell to all users (except dbo)\",\"scripts\":[],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1017\",\"severity\":\"High\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"NegativeList\",\"title\":\"Execute + permissions on xp_cmdshell from all users (except dbo) should be revoked.\",\"description\":\"The + xp_cmdshell extended stored procedure spawns a Windows command shell, passing + in a string for execution. This rule checks that no users (except users with + the CONTROL SERVER permission like members of the sysadmin server role) have + permission to execute the xp_cmdshell extended stored procedure.\",\"rationale\":\"The + xp_cmdshell extended stored procedure is a very powerful tool, but because + of that, it is crucial that access to xp_cmdshell be tightly controlled. By + default, only users with the CONTROL SERVER permission like members of the + sysadmin server role can execute this extended stored procedure.\\nWhen first + enabled, xp_cmdshell has the same security context as the SQL Server service + account. The SQL Server service account is often more privileged than necessary + for the work being performed by the process created by xp_cmdshell. As such, + malicious users can attempt to elevate their privileges by using xp_cmdshell.\\nSee + https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/xp-cmdshell-transact-sql + for more information on xp_cmdshell.\",\"queryCheck\":{\"query\":\"SELECT + dpr.name AS [Principal]\\nFROM sys.database_permissions AS dp\\nJOIN sys.database_principals + AS dpr\\n ON dp.grantee_principal_id = dpr.principal_id\\nWHERE major_id + = OBJECT_ID('xp_cmdshell')\\n AND dp.[type] = 'EX'\\n AND [state] IN + (\\n 'G'\\n ,'W'\\n )\",\"expectedResult\":[],\"columnNames\":[\"Principal\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1018\",\"name\":\"VA1018\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1018\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"True\"]],\"remediation\":{\"description\":\"Install + the latest SQL Server CU corresponding to your version of SQL Server. Go to + https://technet.microsoft.com/en-us/sqlserver/ff803383.aspx to find and download + the required CU.\",\"scripts\":[],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1018\",\"severity\":\"High\",\"category\":\"InstallationUpdatesAndPatches\",\"ruleType\":\"Binary\",\"title\":\"Latest + updates should be installed\",\"description\":\"Microsoft periodically releases + Cumulative Updates (CUs) for each version of SQL Server. This rule checks + whether the latest CU has been installed for the particular version of SQL + Server being used.\",\"rationale\":\"Running with the latest Cumulative Updates + (CU) for any particular version of SQL Server is important as these CU are + a collection of all available patches up-to-date, including all known security + fixes. Microsoft officially recommends ongoing, proactive installation of + SQL Server CUs as they become available.\",\"queryCheck\":{\"query\":\"SELECT + CASE\\n WHEN Serverproperty('ProductVersion') >= '16.0.4065.3' THEN + 0\\n ELSE 1\\n END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:1.1\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1020\",\"name\":\"VA1020\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1020\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Remove + the special user GUEST from all roles.\",\"scripts\":[],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1020\",\"severity\":\"High\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"NegativeList\",\"title\":\"Database + user GUEST should not be a member of any role\",\"description\":\"The guest + user permits access to a database for any logins that are not mapped to a + specific database user. This rule checks that no database roles are assigned + to the Guest user.\",\"rationale\":\"Database Roles are the basic building + block at the heart of separation of duties and the principle of least permission. + Granting the Guest user membership to specific roles defeats this purpose.\",\"queryCheck\":{\"query\":\"SELECT + name as [Role]\\nFROM sys.database_role_members AS drms\\nINNER JOIN sys.database_principals + AS dps\\n ON drms.role_principal_id = dps.principal_id\\nWHERE member_principal_id + = DATABASE_PRINCIPAL_ID('guest')\",\"expectedResult\":[],\"columnNames\":[\"Role\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1022\",\"name\":\"VA1022\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1022\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[[\"False\"]],\"remediation\":{\"description\":\"Disable + the 'ad hoc distributed queries' feature on SQL Server\",\"scripts\":[\"EXECUTE + sp_configure 'show advanced options', 1; RECONFIGURE;\\nEXECUTE sp_configure + 'ad hoc distributed queries', 0; RECONFIGURE;\\nEXECUTE sp_configure 'show + advanced options', 0; RECONFIGURE;\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1022\",\"severity\":\"Medium\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"Binary\",\"title\":\"Ad-hoc + distributed queries should be disabled\",\"description\":\"Ad-hoc distributed + queries use the 'OPENROWSET' and 'OPENDATASOURCE' functions to connect to + remote data sources that use OLE DB. This rule checks that ad-hoc distributed + queries are disabled.\",\"rationale\":\"Ad hoc distributed queries should + be disabled, as they can allow an attacker to connect from a compromised server + on your network to a non-compromised server that normally wouldn't allow connections + from outside the network. In addition, the attacker can use this option to + connect from a compromised server back to the his database, and copy your + data to it.\",\"queryCheck\":{\"query\":\"SELECT CASE\\n WHEN EXISTS (SELECT + *\\n FROM sys.configurations\\n WHERE NAME = 'ad hoc distributed + queries'\\n AND Cast(value AS INT) = 1) THEN 1\\n ELSE 0\\n + \ END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:2.1\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1023\",\"name\":\"VA1023\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1023\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[[\"False\"]],\"remediation\":{\"description\":\"Disable + CLR hosting on SQL Server\",\"scripts\":[\"EXECUTE sp_configure 'show advanced + options', 1; RECONFIGURE;\\nEXECUTE sp_configure 'clr enabled', 0; RECONFIGURE;\\nEXECUTE + sp_configure 'clr strict security', 1; RECONFIGURE;\\nEXECUTE sp_configure + 'show advanced options', 0; RECONFIGURE;\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1023\",\"severity\":\"High\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"Binary\",\"title\":\"CLR + should be disabled\",\"description\":\"The CLR allows managed code to be hosted + by and run in the Microsoft SQL Server environment. This rule checks that + CLR is disabled.\",\"rationale\":\"If you enable CLR and set a database TRUSTWORTHY + without knowing what particular assemblies can do and what code they contain, + you can introduce a security flaw to the SQL Server instance and eventually + to all other network resources where the account under which the SQL Server + is running has access.\",\"queryCheck\":{\"query\":\"SELECT\\n CASE\\n + \ WHEN SatisfiedConditions = 2\\n THEN 1\\n + \ ELSE 0\\n END AS Violation\\nFROM\\n (\\n + \ SELECT\\n COUNT(*) AS SatisfiedConditions\\n + \ FROM\\n sys.configurations\\n WHERE\\n + \ (\\n [name] = + 'clr enabled'\\n AND Cast([value] AS INT) = 1\\n + \ )\\n OR\\n (\\n + \ [name] = 'clr strict security'\\n + \ AND Cast([value] AS INT) = 0\\n )\\n + \ )\\n t\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:2.2\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1026\",\"name\":\"VA1026\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1026\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[[\"False\"]],\"remediation\":{\"description\":\"Disable + CLR hosting on SQL Server\",\"scripts\":[\"EXECUTE sp_configure 'show advanced + options', 1; RECONFIGURE;\\nEXECUTE sp_configure 'clr enabled', 0; RECONFIGURE;\\nEXECUTE + sp_configure 'show advanced options', 0; RECONFIGURE;\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1026\",\"severity\":\"Medium\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"Binary\",\"title\":\"CLR + should be disabled\",\"description\":\"The CLR allows managed code to be hosted + by and run in the Microsoft SQL Server environment.\\nCLR strict security + treats SAFE and EXTERNAL_ACCESS assemblies as if they were marked UNSAFE and + requires all assemblies be signed by a certificate or asymmetric key with + a corresponding login that has been granted UNSAFE ASSEMBLY permission in + the master database.\\nThis rule checks that CLR is disabled.\",\"rationale\":\"If + you enable CLR and set a database TRUSTWORTHY or add trusted assemblies without + knowing what particular assemblies can do and what code they contain, you + can introduce a security flaw to the SQL Server instance and eventually to + all other network resources where the account under which the SQL Server is + running has access.\",\"queryCheck\":{\"query\":\"SELECT\\n CASE WHEN SatisfiedConditions + = 2 THEN 1 ELSE 0 END AS [Violation]\\n FROM (\\n SELECT\\n COUNT(*) + AS SatisfiedConditions\\n FROM\\n sys.configurations\\n + \ WHERE\\n (\\n [name] = 'clr enabled'\\n + \ AND Cast([value] AS INT) = 1\\n )\\n OR + (\\n [name] = 'clr strict security'\\n AND Cast([value] + AS INT) = 1\\n )\\n ) AS t\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:2.2\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1027\",\"name\":\"VA1027\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1027\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Remove + unwanted assemblies and set the rest as baseline\",\"scripts\":[],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1027\",\"severity\":\"High\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"BaselineExpected\",\"title\":\"Untracked + trusted assemblies should be removed\",\"description\":\"Assemblies marked + as UNSAFE are required to be signed by a certificate or asymmetric key with + a corresponding login that has been granted UNSAFE ASSEMBLY permission in + the master database. Trusted assemblies may bypass this requirement.\",\"rationale\":\"If + you enable CLR and add trusted assemblies without knowing what particular + assemblies can do and what code they contain, you can introduce a security + flaw to the SQL Server instance and eventually to all other network resources + where the account under which the SQL Server is running has access.\",\"queryCheck\":{\"query\":\"IF + (EXISTS (SELECT *\\n FROM sys.configurations\\n WHERE [name] = 'clr + enabled' \\n AND Cast([value] AS INT) = 1)) \\n SELECT hash AS [Assembly]\\n + \ , created_by As [Created By]\\n , create_date as [Creation + Date]\\n FROM sys.trusted_assemblies\",\"expectedResult\":[],\"columnNames\":[\"Assembly\",\"Created + By\",\"Creation Date\"]},\"benchmarkReferences\":[]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1042\",\"name\":\"VA1042\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1042\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Disable + DB_CHANING option for all databases that do not absolutely require it and + set a baseline for the remaining databases that have a justification to make + use of database chaining.\",\"scripts\":[],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1042\",\"severity\":\"High\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"NegativeList\",\"title\":\"Database + ownership chaining should be disabled for all databases except for 'master', + 'msdb' and 'tempdb'\",\"description\":\"Cross database ownership chaining + is an extension of ownership chaining, except it does cross the database boundary. + This rule checks that this option is disabled for all databases except for + 'master', 'msdb' and 'tempdb'. For 'master', 'msdb' and 'tempdb' cross database + ownership chaining is enabled by default.\",\"rationale\":\"This option enables + privileged users on a database to perform DML operations on a different database + that has also been enabled, essentially bypassing permissions on the target + DB. Using this feature should be done on an exception-basis.\",\"queryCheck\":{\"query\":\"SELECT + name as [Database Name]\\nFROM sys.databases\\nWHERE name NOT IN (\\n 'master'\\n + \ ,'model'\\n ,'msdb'\\n ,'tempdb'\\n )\\n AND + is_db_chaining_on = 1\",\"expectedResult\":[],\"columnNames\":[\"Database + Name\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1045\",\"name\":\"VA1045\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1045\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[[\"False\"]],\"remediation\":{\"description\":\"Set + the 'default trace enabled' option on SQL Server to 1\",\"scripts\":[\"EXECUTE + sp_configure 'show advanced options', 1; RECONFIGURE;\\nEXECUTE sp_configure + 'default trace enabled', 1; RECONFIGURE;\\nEXECUTE sp_configure 'show advanced + options', 0; RECONFIGURE;\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1045\",\"severity\":\"Medium\",\"category\":\"AuditingAndLogging\",\"ruleType\":\"Binary\",\"title\":\"Default + trace should be enabled\",\"description\":\"Default trace provides troubleshooting + assistance to database administrators by ensuring that they have the log data + necessary to diagnose problems the first time they occur. This rule checks + that the default trace is enabled.\",\"rationale\":\"The default trace provides + logging information of important activity in the system, including creation + of principals, and activities that could lead to escalation of privileges. + This information is also useful as forensic information.\",\"queryCheck\":{\"query\":\"SELECT + CASE\\n WHEN EXISTS (SELECT *\\n FROM sys.configurations\\n WHERE + \ NAME = 'default trace enabled'\\n AND Cast(value AS INT) = 0) THEN + 1\\n ELSE 0\\n END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:5.2\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1046\",\"name\":\"VA1046\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1046\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"gal\"]],\"remediation\":{\"description\":\"In + order to fix, you must call ALTER LOGIN [target_login_name] WITH CHECK_POLICY + = ON.\\nPlease notice that the password policy cannot be applied retroactively, + so it is highly recommended that you force affected users to rotate their + password.\",\"scripts\":[\"ALTER LOGIN [gal] WITH CHECK_POLICY = ON;\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1046\",\"severity\":\"Low\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"NegativeList\",\"title\":\"CHECK_POLICY + should be enabled for all SQL logins\",\"description\":\"CHECK_POLICY option + enables verifying SQL logins against the domain policy. This rule checks that + CHECK_POLICY option is enabled for all SQL logins.\",\"rationale\":\"This + option will apply the domain policy (OS level) to the SQL login password policy. + The domain policy usually enforces password complexity policy, password expiration + policy, etc.\",\"queryCheck\":{\"query\":\"SELECT NAME AS [Login]\\nFROM sys.sql_logins\\nWHERE + \ is_policy_checked = 0\",\"expectedResult\":[],\"columnNames\":[\"Login\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:4.3\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1047\",\"name\":\"VA1047\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1047\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"gal\"]],\"remediation\":{\"description\":\"Enable + the password policy for expiration check on the affected logins.\",\"scripts\":[\"ALTER + LOGIN [gal] WITH CHECK_EXPIRATION = ON, CHECK_POLICY = ON;\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1047\",\"severity\":\"Low\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"NegativeList\",\"title\":\"Password + expiration check should be enabled for all SQL logins\",\"description\":\"Password + expiration policies are used to manage the lifespan of a password. When SQL + Server enforces password expiration policy, users are reminded to change old + passwords, and accounts that have expired passwords are disabled. This rule + checks that password expiration policy is enabled for all SQL logins.\",\"rationale\":\"Without + a password expiration policy, an unauthorized person that acquires a password + and uses it without being detected, may have access to your database for an + indefinite period.\",\"queryCheck\":{\"query\":\"SELECT name as [Login]\\nFROM + \ sys.sql_logins\\nWHERE is_expiration_checked = 0\\n AND is_disabled + = 0\\n AND name != '##MS_PolicyTsqlExecutionLogin##'\\n AND name != + '##MS_PolicyEventProcessingLogin##'\",\"expectedResult\":[],\"columnNames\":[\"Login\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:4.2\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1052\",\"name\":\"VA1052\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1052\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[[\"False\"]],\"remediation\":{\"description\":\"Removing + the BUILTIN\\\\Administrators well known group from SQL server principals, + and grant instead permissions based on other Windows group memberships.\",\"scripts\":[\"DECLARE + @sa SYSNAME; DECLARE @cmd NVARCHAR(max); SELECT @sa = Suser_sname(0x01020000000000052000000020020000); + \ SET @cmd = N'DROP LOGIN ' + Quotename(@sa); EXEC( @cmd);\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1052\",\"severity\":\"Low\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"Binary\",\"title\":\"Remove + BUILTIN\\\\Administrators as a server login\",\"description\":\"The BUILTIN\\\\Administrators + group contains the Windows Local Administrators group. In old versions of + Microsoft SQL Server, this group has administrator rights by default. This + rule checks that this group is removed from SQL Server.\",\"rationale\":\"This + is a best-practice with the intent of making a separation between OS administration + and SQL administration.\\nAlthough a OS administrator can take control of + the SQL service, this rule is intended to help avoid mistakes.\",\"queryCheck\":{\"query\":\"SELECT + CASE\\n WHEN EXISTS (SELECT *\\n FROM sys.server_principals\\n + \ WHERE sid = 0x01020000000000052000000020020000\\n /*S-1-5-32-544*/)\\n + \ THEN 1\\n ELSE 0\\n END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.4.0-08-11-2017:3.9\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1053\",\"name\":\"VA1053\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1053\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"True\"]],\"remediation\":{\"description\":\"Rename + the default sysadmin (sa) account and disable it.\",\"scripts\":[\"DECLARE + @sa sysname; DECLARE @new_sa sysname; DECLARE @cmd nvarchar(max); SELECT @sa + = suser_sname(0x01); SET @new_sa = convert(nvarchar(128), newid()); SET @cmd + = N'ALTER LOGIN ' + quotename(@sa) + N' DISABLE; ALTER LOGIN ' + quotename(@sa) + + N' WITH NAME = ' + quotename(@new_sa) + N';'; EXEC(@cmd);\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1053\",\"severity\":\"Low\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"Binary\",\"title\":\"Account + with default name 'sa' should be renamed and disabled\",\"description\":\"'sa' + is a well-known account with principal Id 1. This rule verifies that the 'sa' + account is renamed and disabled\",\"rationale\":\"The well-known default sysadmin + account is named 'sa'. Automated attacks will try to brute force the 'sa' + account as soon as a SQL instance is discovered. By renaming the 'sa' account, + most automated attacks will fail to brute force the database admin password.\",\"queryCheck\":{\"query\":\"DECLARE + @IsSaRenamed INT = 0;\\n\\nSELECT @IsSaRenamed = CASE\\n WHEN EXISTS (SELECT + *\\n FROM sys.sql_logins\\n WHERE + \ name != 'sa'\\n AND principal_id = 1) THEN 1\\n + \ ELSE 0\\n END;\\n\\nDECLARE @IsSaDisabled INT = 0;\\n\\nSELECT @IsSaDisabled + = CASE\\n WHEN EXISTS (SELECT *\\n FROM sys.sql_logins\\n + \ WHERE principal_id = 1\\n AND + is_disabled = 1) THEN 1\\n ELSE 0\\n END;\\n\\nSELECT CASE\\n WHEN + (@IsSaDisabled = 0\\n or @IsSaRenamed = 0) THEN 1\\n ELSE 0\\n END + AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1054\",\"name\":\"VA1054\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1054\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Revoke + unnecessary permissions granted to PUBLIC\",\"scripts\":[],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1054\",\"severity\":\"Low\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"NegativeList\",\"title\":\"Excessive + permissions should not be granted to PUBLIC role on objects or columns\",\"description\":\"Every + SQL Server login belongs to the public server role. When a server principal + has not been granted or denied specific permissions on a securable object, + the user inherits the permissions granted to public on that object. This rule + displays a list of all securable objects or columns that are accessible to + all users through the PUBLIC role.\",\"rationale\":\"Database Roles are the + basic building block at the heart of separation of duties and the principle + of least permission. Granting permissions to principals through the default + PUBLIC role defeats this purpose.\",\"queryCheck\":{\"query\":\"IF object_id('tempdb.dbo.#entries_to_exclude_va1054', + 'U') IS NOT NULL\\n DROP TABLE #entries_to_exclude_va1054;\\n\\nCREATE + TABLE #entries_to_exclude_va1054 (\\n object_type VARCHAR(20)\\n ,schema_name + VARCHAR(3)\\n ,object_name VARCHAR(128)\\n ,grantor_principal_name VARCHAR(3)\\n + \ ,permission_name VARCHAR(20)\\n ,TYPE VARCHAR(3)\\n ,STATE CHAR(1)\\n + \ )\\n\\nINSERT INTO #entries_to_exclude_va1054 (object_name)\\nVALUES ('fn_sysdac_get_currentusername')\\n + \ ,('fn_sysdac_get_username')\\n ,('fn_sysdac_is_currentuser_sa')\\n + \ ,('fn_sysdac_is_dac_creator')\\n ,('fn_sysdac_is_login_creator')\\n + \ ,('fn_syspolicy_is_automation_enabled')\\n\\nUPDATE #entries_to_exclude_va1054\\nSET + object_type = 'FN'\\n ,schema_name = 'dbo'\\n ,grantor_principal_name + = 'dbo'\\n ,permission_name = 'EXECUTE'\\n ,TYPE = 'EX'\\n ,STATE + = 'G'\\nWHERE object_type IS NULL\\n\\nINSERT INTO #entries_to_exclude_va1054 + (object_name)\\nVALUES ('sp_sysdac_add_history_entry')\\n ,('sp_sysdac_add_instance')\\n + \ ,('sp_sysdac_delete_history')\\n ,('sp_sysdac_delete_instance')\\n + \ ,('sp_sysdac_drop_database')\\n ,('sp_sysdac_ensure_dac_creator')\\n + \ ,('sp_sysdac_rename_database')\\n ,('sp_sysdac_resolve_pending_entry')\\n + \ ,('sp_sysdac_rollback_all_pending_objects')\\n ,('sp_sysdac_rollback_committed_step')\\n + \ ,('sp_sysdac_rollback_pending_object')\\n ,('sp_sysdac_setreadonly_database')\\n + \ ,('sp_sysdac_update_history_entry')\\n ,('sp_sysdac_update_instance')\\n + \ ,('sp_sysdac_upgrade_instance')\\n\\nUPDATE #entries_to_exclude_va1054\\nSET + object_type = 'P'\\n ,schema_name = 'dbo'\\n ,grantor_principal_name + = 'dbo'\\n ,permission_name = 'EXECUTE'\\n ,TYPE = 'EX'\\n ,STATE + = 'G'\\nWHERE object_type IS NULL\\n\\nINSERT INTO #entries_to_exclude_va1054 + (object_name)\\nVALUES ('backupfile')\\n ,('backupmediafamily')\\n ,('backupmediaset')\\n + \ ,('backupset')\\n ,('dm_hadr_automatic_seeding_history')\\n ,('logmarkhistory')\\n + \ ,('restorefile')\\n ,('restorefilegroup')\\n ,('restorehistory')\\n + \ ,('spt_fallback_db')\\n ,('spt_fallback_dev')\\n ,('spt_fallback_usg')\\n + \ ,('spt_monitor')\\n ,('suspect_pages')\\n ,('sysdac_history_internal')\\n + \ ,('sysdac_instances_internal')\\n\\nUPDATE #entries_to_exclude_va1054\\nSET + object_type = 'U'\\n ,schema_name = 'dbo'\\n ,grantor_principal_name + = 'dbo'\\n ,permission_name = 'SELECT'\\n ,TYPE = 'SL'\\n ,STATE + = 'G'\\nWHERE object_type IS NULL\\n\\nINSERT INTO #entries_to_exclude_va1054 + (object_name)\\nVALUES ('autoadmin_backup_configuration_summary')\\n ,('spt_values')\\n + \ ,('sysdac_instances')\\n ,('syspolicy_conditions')\\n ,('syspolicy_configuration')\\n + \ ,('syspolicy_object_sets')\\n ,('syspolicy_policies')\\n ,('syspolicy_policy_categories')\\n + \ ,('syspolicy_policy_category_subscriptions')\\n ,('syspolicy_policy_execution_history')\\n + \ ,('syspolicy_policy_execution_history_details')\\n ,('syspolicy_system_health_state')\\n + \ ,('syspolicy_target_set_levels')\\n ,('syspolicy_target_sets')\\n\\nUPDATE + #entries_to_exclude_va1054\\nSET object_type = 'V'\\n ,schema_name = 'dbo'\\n + \ ,grantor_principal_name = 'dbo'\\n ,permission_name = 'SELECT'\\n ,TYPE + = 'SL'\\n ,STATE = 'G'\\nWHERE object_type IS NULL\\n\\n\\nSELECT all_entries.permission_name + AS [Permission]\\n ,all_entries.schema_name AS [Schema]\\n ,all_entries.object_name + AS [Object]\\nFROM (\\n SELECT objs.TYPE COLLATE database_default AS object_type\\n + \ ,schema_name(schema_id) COLLATE database_default AS schema_name\\n + \ ,objs.name COLLATE database_default AS object_name\\n ,user_name(grantor_principal_id) + COLLATE database_default AS grantor_principal_name\\n ,permission_name + COLLATE database_default AS permission_name\\n ,perms.TYPE COLLATE + database_default AS TYPE\\n ,STATE COLLATE database_default AS STATE\\n + \ FROM sys.database_permissions AS perms\\n INNER JOIN sys.objects AS + objs\\n ON objs.object_id = perms.major_id\\n WHERE perms.class = 1 + -- objects or columns. Other cases are handled by VA1095 which has different + remediation syntax\\n AND grantee_principal_id = database_principal_id('public')\\n + \ AND [state] IN (\\n 'G'\\n ,'W'\\n )\\n + \ \\n UNION\\n \\n SELECT 'system_object' COLLATE database_default + AS object_type\\n ,'sys' COLLATE database_default AS schema_name\\n + \ ,object_name(major_id) COLLATE database_default AS object_name\\n + \ ,user_name(grantor_principal_id) COLLATE database_default AS grantor_principal_name\\n + \ ,permission_name COLLATE database_default AS permission_name\\n ,TYPE + COLLATE database_default AS TYPE\\n ,STATE COLLATE database_default + AS STATE\\n FROM sys.database_permissions\\n WHERE class = 1\\n AND + grantee_principal_id = database_principal_id('public')\\n AND object_name(major_id) + COLLATE database_default = 'sp_syspolicy_execute_policy'\\n AND [state] + IN (\\n 'G'\\n ,'W'\\n )\\n ) AS all_entries\\nLEFT + JOIN #entries_to_exclude_va1054 ON all_entries.object_type = #entries_to_exclude_va1054.object_type + COLLATE database_default\\n AND all_entries.schema_name = #entries_to_exclude_va1054.schema_name + COLLATE database_default\\n AND all_entries.object_name = #entries_to_exclude_va1054.object_name + COLLATE database_default\\n AND all_entries.grantor_principal_name = #entries_to_exclude_va1054.grantor_principal_name + COLLATE database_default\\n AND all_entries.permission_name = #entries_to_exclude_va1054.permission_name + COLLATE database_default\\n AND all_entries.TYPE = #entries_to_exclude_va1054.TYPE + COLLATE database_default\\n AND all_entries.STATE = #entries_to_exclude_va1054.STATE + COLLATE database_default\\nWHERE #entries_to_exclude_va1054.object_name IS + NULL -- assuring the permissions are not part of the default one given to + public\",\"expectedResult\":[],\"columnNames\":[\"Permission\",\"Schema\",\"Object\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1058\",\"name\":\"VA1058\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1058\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[[\"False\"]],\"remediation\":{\"description\":\"Disable + the well-known sysadmin account 'sa'. Instead use Windows-based groups to + grant permissions to DBA and other administrative roles.\",\"scripts\":[\"DECLARE + @sa SYSNAME; DECLARE @cmd NVARCHAR(max); SELECT @sa = Suser_sname(0x01); + \ SET @cmd = N'ALTER LOGIN ' + Quotename(@sa) + N' DISABLE;'; EXEC(@cmd); + \"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1058\",\"severity\":\"High\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"Binary\",\"title\":\"'sa' + login should be disabled\",\"description\":\"'sa' is a well-known account + with principal Id 1. This rule verifies that the 'sa' account is disabled\",\"rationale\":\"The + well-known default sysadmin account is named 'sa'. Automated attacks will + try to brute force the 'sa' account as soon as a SQL instance is discovered.\",\"queryCheck\":{\"query\":\"SELECT + CASE\\n WHEN EXISTS (SELECT *\\n FROM sys.server_principals\\n + \ WHERE principal_id = 1\\n AND + is_disabled = 0) THEN 1\\n ELSE 0\\n END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:2.13\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1059\",\"name\":\"VA1059\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1059\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[[\"False\"]],\"remediation\":{\"description\":\"Disable + the 'xp_cmdshell' feature on the server.\",\"scripts\":[\"EXECUTE sp_configure + 'show advanced options', 1; RECONFIGURE;\\nEXECUTE sp_configure 'xp_cmdshell', + 0; RECONFIGURE;\\nEXECUTE sp_configure 'show advanced options', 0; RECONFIGURE;\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1059\",\"severity\":\"High\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"Binary\",\"title\":\"xp_cmdshell + should be disabled\",\"description\":\"xp_cmdshell spawns a Windows command + shell and passes it a string for execution. This rule checks that xp_cmdshell + is disabled.\",\"rationale\":\"The xp_cmdshell extended stored procedure is + a very powerful tool that is typically used by attackers in post-exploitation + payloads to execute commands against the underlying operating system.\",\"queryCheck\":{\"query\":\"SELECT + CASE\\n WHEN EXISTS (SELECT *\\n FROM sys.configurations\\n + \ WHERE NAME = 'xp_cmdshell'\\n AND + Cast(value AS INT) = 1) THEN 1\\n ELSE 0\\n END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:2.15\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1066\",\"name\":\"VA1066\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1066\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Validate + that you need to open the affected SSB endpoints. If not, remove them.\",\"scripts\":[],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1066\",\"severity\":\"Low\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"BaselineExpected\",\"title\":\"Unused + service broker endpoints should be removed\",\"description\":\"Service Broker + provides queuing and reliable messaging for SQL Server. Service Broker is + used both for applications that use a single SQL Server instance and applications + that distribute work across multiple instances. Service Broker endpoints provide + options for transport security and message forwarding. This rule enumerates + all the service broker endpoints. You should remove those that are not used.\",\"rationale\":\"Service + Broker (SSB) is a non-trivial attack surface area that allows remote connectivity + to the SQL instance. Any unused SSB endpoints should be removed.\",\"queryCheck\":{\"query\":\"SELECT + NAME AS [Endpoint]\\nFROM sys.endpoints\\nWHERE type_desc = 'SERVICE_BROKER'\",\"expectedResult\":[],\"columnNames\":[\"Endpoint\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1067\",\"name\":\"VA1067\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1067\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[[\"False\"]],\"remediation\":{\"description\":\"Disable + Database mail XP feature\",\"scripts\":[\"EXECUTE sp_configure 'show advanced + options', 1; RECONFIGURE;\\nEXECUTE sp_configure 'database mail xps', 0; RECONFIGURE;\\nEXECUTE + sp_configure 'show advanced options', 0; RECONFIGURE;\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1067\",\"severity\":\"Medium\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"Binary\",\"title\":\"Database + Mail XPs should be disabled when it is not in use\",\"description\":\"This + rule checks that Database Mail is disabled when no database mail profile is + configured. Database Mail can be used for sending e-mail messages from the + SQL Server Database Engine and is disabled by default. If you are not using + this feature, it is recommended to disable it to reduce the surface area.\",\"rationale\":\"Enabling + the database mail XPs opens a significant attack surface area that can be + used by an attacker to gather information about the system and potentially + abuse the privileges of SQL Server.\",\"queryCheck\":{\"query\":\"DECLARE + @DatabaseMailEnabled INT = 0;\\n\\nSELECT @DatabaseMailEnabled = CASE\\n WHEN + EXISTS (SELECT *\\n FROM sys.configurations\\n WHERE NAME + = 'database mail xps'\\n AND Cast(value AS INT) = 1) THEN 1\\n + \ ELSE 0\\n END;\\n\\nDECLARE @IsProfileConfigured INT = 0;\\nDECLARE + @profiles AS TABLE (profile_id int, name sysname, description nvarchar(256));\\nINSERT + INTO @profiles EXEC ('msdb.dbo.sysmail_help_profile_sp')\\n\\nSELECT @IsProfileConfigured + = CASE\\n WHEN EXISTS (SELECT * FROM @profiles) THEN 1\\n ELSE 0\\n + \ END;\\n\\nSELECT CASE\\n WHEN (@DatabaseMailEnabled = 1\\n AND + @IsProfileConfigured = 0) THEN 1\\n ELSE 0\\n END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:2.4\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1068\",\"name\":\"VA1068\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1068\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"ALTER + ANY EVENT SESSION\",\"SERVER\",\"DESKTOP-0I8NSVP\\\\SQLEXPRESS\",\"NT Service\\\\Microsoft + Defender For SQL\"],[\"ALTER ANY SERVER AUDIT\",\"SERVER\",\"DESKTOP-0I8NSVP\\\\SQLEXPRESS\",\"NT + Service\\\\Microsoft Defender For SQL\"],[\"CONNECT\",\"ENDPOINT\",\"TSQL + Default TCP\",\"NT Service\\\\Microsoft Defender For SQL\"],[\"CONNECT\",\"ENDPOINT\",\"TSQL + Default VIA\",\"NT Service\\\\Microsoft Defender For SQL\"],[\"CONNECT\",\"ENDPOINT\",\"TSQL + Local Machine\",\"NT Service\\\\Microsoft Defender For SQL\"],[\"CONNECT\",\"ENDPOINT\",\"TSQL + Named Pipes\",\"NT Service\\\\Microsoft Defender For SQL\"],[\"CONNECT ANY + DATABASE\",\"SERVER\",\"DESKTOP-0I8NSVP\\\\SQLEXPRESS\",\"NT Service\\\\Microsoft + Defender For SQL\"],[\"VIEW ANY DEFINITION\",\"SERVER\",\"DESKTOP-0I8NSVP\\\\SQLEXPRESS\",\"NT + Service\\\\Microsoft Defender For SQL\"],[\"VIEW SERVER STATE\",\"SERVER\",\"DESKTOP-0I8NSVP\\\\SQLEXPRESS\",\"NT + Service\\\\Microsoft Defender For SQL\"]],\"remediation\":{\"description\":\"Revoke + permissions granted to users directly. Instead use Windows groups or server + roles to grant permissions, and manage role memberships instead.\",\"scripts\":[\"REVOKE + ALTER ANY EVENT SESSION ON SERVER::[DESKTOP-0I8NSVP\\\\SQLEXPRESS] FROM [NT + Service\\\\Microsoft Defender For SQL]\",\"REVOKE ALTER ANY SERVER AUDIT ON + SERVER::[DESKTOP-0I8NSVP\\\\SQLEXPRESS] FROM [NT Service\\\\Microsoft Defender + For SQL]\",\"REVOKE CONNECT ON ENDPOINT::[TSQL Default TCP] FROM [NT Service\\\\Microsoft + Defender For SQL]\",\"REVOKE CONNECT ON ENDPOINT::[TSQL Default VIA] FROM + [NT Service\\\\Microsoft Defender For SQL]\",\"REVOKE CONNECT ON ENDPOINT::[TSQL + Local Machine] FROM [NT Service\\\\Microsoft Defender For SQL]\",\"REVOKE + CONNECT ON ENDPOINT::[TSQL Named Pipes] FROM [NT Service\\\\Microsoft Defender + For SQL]\",\"REVOKE CONNECT ANY DATABASE ON SERVER::[DESKTOP-0I8NSVP\\\\SQLEXPRESS] + FROM [NT Service\\\\Microsoft Defender For SQL]\",\"REVOKE VIEW ANY DEFINITION + ON SERVER::[DESKTOP-0I8NSVP\\\\SQLEXPRESS] FROM [NT Service\\\\Microsoft Defender + For SQL]\",\"REVOKE VIEW SERVER STATE ON SERVER::[DESKTOP-0I8NSVP\\\\SQLEXPRESS] + FROM [NT Service\\\\Microsoft Defender For SQL]\"],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1068\",\"severity\":\"Low\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"NegativeList\",\"title\":\"Server + permissions shouldn't be granted directly to principals\",\"description\":\"Server + level permissions are associated with a server level object to regulate which + users can gain access to the object. This rule checks that there are no server + level permissions granted directly to logins.\",\"rationale\":\"Individuals + change organizations & job descriptions over time. It is therefore recommended + to implement centralized access control management through Active Directory + group membership.\",\"queryCheck\":{\"query\":\"SELECT permission_name AS + [Permission],\\n CASE\\n WHEN perms.class = 101 THEN 'LOGIN'\\n + \ ELSE class_desc\\n END AS [Permission Class],\\n + \ CASE\\n WHEN perms.class = 100 THEN @@SERVERNAME -- SERVER\\n + \ WHEN perms.class = 101 THEN server_principal_object.NAME -- SERVER_PRINCIPAL\\n + \ WHEN perms.class = 105 THEN ep.NAME -- ENDPOINT\\n END AS + [Object],\\n grantee_server_principals.NAME AS [Principal] \\nFROM + sys.server_permissions AS perms\\n LEFT JOIN sys.endpoints AS ep ON ep.endpoint_id + = perms.major_id\\n LEFT JOIN sys.server_principals AS server_principal_object + ON server_principal_object.principal_id = perms.major_id\\n LEFT JOIN sys.server_principals + AS grantee_server_principals ON grantee_server_principals.principal_id = perms.grantee_principal_id\\n + WHERE grantee_server_principals.type NOT IN ( 'R', 'C', 'G', 'K' )\\n AND + perms.type != 'COSQ'\\n AND grantee_server_principals.NAME NOT LIKE + '##%##'\\n -- reserved for special system logins\\n AND grantee_server_principals.sid + != 0x010100000000000512000000 -- NT AUTHORITY\\\\SYSTEM\\n AND grantee_server_principals.sid + != 0x01060000000000055000000066BE57DCFBD0F2D76BF9160C566F792677DCCF00 -- NT + SERVICE\\\\HEALTHSERVICE\\n AND NOT (( permission_name = 'ALTER ANY + EVENT SESSION'\\n AND grantee_server_principals.NAME = 'NT SERVICE\\\\SQLTELEMETRY' + + ISNULL('$' + CONVERT(sysname, SERVERPROPERTY('InstanceName')), '') )\\n + \ OR ( permission_name = 'CONNECT ANY DATABASE'\\n AND + grantee_server_principals.NAME = 'NT SERVICE\\\\SQLTELEMETRY' + ISNULL('$' + + CONVERT(sysname, SERVERPROPERTY('InstanceName')), '') )\\n OR + ( permission_name = 'VIEW ANY DEFINITION'\\n AND grantee_server_principals.NAME + = 'NT SERVICE\\\\SQLTELEMETRY' + ISNULL('$' + CONVERT(sysname, SERVERPROPERTY('InstanceName')), + '') )\\n OR ( permission_name = 'VIEW SERVER STATE'\\n AND + grantee_server_principals.NAME = 'NT SERVICE\\\\SQLTELEMETRY' + ISNULL('$' + + CONVERT(sysname, SERVERPROPERTY('InstanceName')), '') )\\n )\",\"expectedResult\":[],\"columnNames\":[\"Permission\",\"Permission + Class\",\"Object\",\"Principal\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1071\",\"name\":\"VA1071\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1071\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[[\"False\"]],\"remediation\":{\"description\":\"Disable + this option. NOTE: Some features such as replication may require it.\",\"scripts\":[\"EXECUTE + sp_configure 'show advanced options', 1; RECONFIGURE;\\nEXECUTE sp_configure + 'scan for startup procs', 0; RECONFIGURE;\\nEXECUTE sp_configure 'show advanced + options', 0; RECONFIGURE;\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1071\",\"severity\":\"Medium\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"Binary\",\"title\":\"'Scan + for startup stored procedures' option should be disabled\",\"description\":\"When + 'Scan for startup procs' is enabled, SQL Server scans for and runs all automatically + run stored procedures defined on the server. If this option is enabled, SQL + Server scans for and runs all automatically run stored procedures defined + on the server. This rule checks that this option is disabled.\",\"rationale\":\"The + execution of start-up stored procedures will be done under a high privileged + context, therefore it is a commonly used post-exploitation vector.\",\"queryCheck\":{\"query\":\"SELECT + CASE\\n WHEN EXISTS (SELECT *\\n FROM sys.configurations\\n WHERE + \ NAME = 'scan for startup procs'\\n AND Cast(value AS INT) = 1) + THEN 1\\n ELSE 0\\n END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:2.8\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1072\",\"name\":\"VA1072\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1072\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[[\"False\"]],\"remediation\":{\"description\":\"After + making sure that SQL Authentication is not absolutely required, set the server + authentication setting to 'Windows Authentication mode'.\\nFor more details + please visit 'https://msdn.microsoft.com/en-us/library/ms144284.aspx'\\nNOTE: + You will need to restart SQL Server for this setting to take effect.\",\"scripts\":[\"EXEC + master.dbo.xp_instance_regwrite\\n N'HKEY_LOCAL_MACHINE',\\n N'Software\\\\Microsoft\\\\MSSQLServer\\\\MSSQLServer',\\n + \ N'LoginMode',\\n N'REG_DWORD',\\n 1\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1072\",\"severity\":\"Medium\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"Binary\",\"title\":\"Authentication + mode should be Windows Authentication\",\"description\":\"There are two possible + authentication modes: Windows Authentication mode and mixed mode. Mixed mode + means that SQL Server enables both Windows authentication and SQL Server authentication. + This rule checks that the authentication mode is set to Windows Authentication.\",\"rationale\":\"Windows + integrated authentication provides robust centrally managed authentication + and authorization (via group membership).\\nAnother advantage is that domain + password policy is covered by the centralized infrastructure, including auditing + & brute force attacks against users.\\nOnly enable Mixed authentication mode + when SQL-based authentication is absolutely needed.\",\"queryCheck\":{\"query\":\"DECLARE + @rc int;\\nSET @rc = CONVERT(int, SERVERPROPERTY('IsIntegratedSecurityOnly'))\\n\\nSELECT + CASE\\n WHEN @rc = 0\\n THEN 1\\n ELSE 0\\n END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:3.1\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1091\",\"name\":\"VA1091\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1091\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"True\"]],\"remediation\":{\"description\":\"Set + the 'Login Auditing' setting for SQL Server to 'Both failed and successful + logins'. For detailed information, please visit: 'https://msdn.microsoft.com/en-us/library/ms175850.aspx'.\\nThe + user must restart the SQL server for the remediation to take effect\",\"scripts\":[\"EXEC + master.dbo.xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\\\\Microsoft\\\\MSSQLServer\\\\MSSQLServer', + N'AuditLevel', N'REG_DWORD', 3\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1091\",\"severity\":\"Low\",\"category\":\"AuditingAndLogging\",\"ruleType\":\"Binary\",\"title\":\"Auditing + of both successful and failed login attempts (default trace) should be enabled + when 'Login auditing' is set up to track logins\",\"description\":\"SQL Server + Login auditing configuration enables administrators to track the users logging + into SQL Server instances. If the user chooses to count on 'Login auditing' + to track users logging into SQL Server instances then it is important to enable + it for both successful and failed login attempts.\",\"rationale\":\"Logging + successful & failed login attempts provides information that can be used to + detect brute-force based password attacks against the system as well as forensic + information.\",\"queryCheck\":{\"query\":\"DECLARE @SmoAuditLevel INT;\\n\\nEXEC + master.dbo.xp_instance_regread\\n N'HKEY_LOCAL_MACHINE',\\n N'Software\\\\Microsoft\\\\MSSQLServer\\\\MSSQLServer',\\n + \ N'AuditLevel',\\n @SmoAuditLevel output;\\n\\nSELECT CASE\\n WHEN + @SmoAuditLevel = 3 THEN 0\\n ELSE 1\\n END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:5.3\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1092\",\"name\":\"VA1092\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1092\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"True\"]],\"remediation\":{\"description\":\"Hide + your SQL instance. For more details please visit 'https://msdn.microsoft.com/en-us/library/ms179327.aspx'.\",\"scripts\":[\"EXEC + master.dbo.xp_instance_regwrite @rootkey = N'HKEY_LOCAL_MACHINE', @key = N'SOFTWARE\\\\Microsoft\\\\MSSQLServer\\\\MSSQLServer\\\\SuperSocketNetLib', + @value_name = N'HideInstance', @type = N'REG_DWORD', @value = 1;\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1092\",\"severity\":\"Low\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"Binary\",\"title\":\"SQL + Server instance shouldn't be advertised by the SQL Server Browser service\",\"description\":\"SQL + Server uses the SQL Server Browser service to enumerate instances of the Database + Engine installed on the computer. This enables client applications to browse + for a server, and helps clients distinguish between multiple instances of + the Database Engine on the same computer. This rule checks that the SQL instance + is hidden.\",\"rationale\":\"SSRP can be used by an attacker to browse the + current infrastructure and retrieve a list of running SQL Server instances.\",\"queryCheck\":{\"query\":\"DECLARE + @HiddenInstance INT\\n\\nEXEC master.dbo.xp_instance_regread\\n N'HKEY_LOCAL_MACHINE',\\n + \ N'Software\\\\Microsoft\\\\MSSQLServer\\\\MSSQLServer\\\\SuperSocketNetLib',\\n + \ N'HideInstance',\\n @HiddenInstance output\\n\\nSELECT CASE\\n WHEN + @HiddenInstance = 0\\n AND Serverproperty('IsClustered') = 0 + THEN 1\\n ELSE 0\\n END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:2.12\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1093\",\"name\":\"VA1093\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1093\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"True\"]],\"remediation\":{\"description\":\"Configure + the 'SQL Server logs file' setting on SQL Server and make sure the maximum + number of error logs before they are overwritten is set to 12 (or higher).\\nFor + details, please visit: 'https://msdn.microsoft.com/en-us/library/ms177285.aspx'\\n\",\"scripts\":[\"EXEC + master.dbo.xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\\\\Microsoft\\\\MSSQLServer\\\\MSSQLServer', + N'NumErrorLogs', N'REG_DWORD', 12\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1093\",\"severity\":\"Low\",\"category\":\"AuditingAndLogging\",\"ruleType\":\"Binary\",\"title\":\"Maximum + number of error logs should be 12 or more\",\"description\":\"Each SQL Server + Error log will have all the information related to failures / errors that + has occurred since SQL Server was last restarted or since the last time you + have recycled the error logs. This rule checks that the maximum numner of + error logs is 12 or more.\",\"rationale\":\"The error logs contain important + information about major server events, including major error conditions, binary + code loading, and login information. These logs are very useful for forensic + information.\\nIncreasing the maximum number of error logs provides an opportunity + to make sure these events are not overwritten.\",\"queryCheck\":{\"query\":\"DECLARE + @NumErrorLogs INT;\\n\\r\\nEXEC master.dbo.xp_instance_regread\\n N'HKEY_LOCAL_MACHINE',\\n + \ N'Software\\\\Microsoft\\\\MSSQLServer\\\\MSSQLServer',\\n N'NumErrorLogs',\\n + \ @NumErrorLogs output;\\n\\r\\nSELECT CASE\\n WHEN Isnull(@NumErrorLogs, + 1) = 1\\n OR @NumErrorLogs < 12 THEN 1\\n ELSE 0\\n + \ END AS [Violation] \",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:5.1\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1094\",\"name\":\"VA1094\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1094\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Revoke + permissions granted to users directly. Instead use Windows groups or server + roles to grant permissions, and manage role memberships instead.\",\"scripts\":[],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1094\",\"severity\":\"Low\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"NegativeList\",\"title\":\"Database + permissions shouldn't be granted directly to principals\",\"description\":\"Permissions + are rules associated with a securable object to regulate which users can gain + access to the object. This rule checks that there are no DB permissions granted + directly to users.\",\"rationale\":\"Individuals change organizations & job + descriptions over time. It is highly recommended to use a centralized access + control management through AD group membership.\",\"queryCheck\":{\"query\":\"SELECT + TOP 1000 \\n permission_name AS [Permission],\\n ISNULL(Schema_name(objs.schema_id), + Replace(dp.class_desc, '_', ' ')) AS [Permission Class],\\n CASE \\n + \ WHEN Schema_name(objs.schema_id) IS NULL THEN '::' ELSE '.' End + AS [Class Separator],\\n CASE\\n WHEN dp.class = 0 THEN Db_name() + -- database\\n WHEN dp.class = 1 THEN objs.NAME -- Object or Column + (VA1286)\\n WHEN dp.class = 3 THEN Schema_name(major_id) -- schema\\n + \ WHEN dp.class = 4 THEN printarget.NAME -- principal\\n WHEN + dp.class = 5 THEN asm.NAME -- assembly\\n WHEN dp.class = 6 THEN Type_name(major_id) + -- type\\n WHEN dp.class = 10 THEN xmlsc.NAME -- xml schema\\n WHEN + dp.class = 15 THEN msgt.NAME COLLATE database_default -- message types\\n + \ WHEN dp.class = 16 THEN svcc.NAME COLLATE database_default -- service + contracts\\n WHEN dp.class = 17 THEN svcs.NAME COLLATE database_default + -- services\\n WHEN dp.class = 18 THEN rsb.NAME COLLATE database_default + -- remote service bindings\\n WHEN dp.class = 19 THEN rts.NAME COLLATE + database_default -- routes\\n WHEN dp.class = 23 THEN ftc.NAME -- + full text catalog\\n WHEN dp.class = 24 THEN sym.NAME -- symmetric + key\\n WHEN dp.class = 25 THEN crt.NAME -- certificate\\n WHEN + dp.class = 26 THEN asym.NAME -- assymetric key\\n END AS + [Object],\\n prin.NAME AS [Principal]\\nFROM + sys.database_permissions AS dp\\nLEFT JOIN sys.all_objects AS objs ON objs.object_id + = dp.major_id\\nLEFT JOIN sys.database_principals AS prin ON dp.grantee_principal_id + = prin.principal_id\\nLEFT JOIN sys.assemblies AS asm ON dp.major_id = asm.assembly_id\\nLEFT + JOIN sys.xml_schema_collections AS xmlsc ON dp.major_id = xmlsc.xml_collection_id\\nLEFT + JOIN sys.service_message_types AS msgt ON dp.major_id = msgt.message_type_id\\nLEFT + JOIN sys.service_contracts AS svcc ON dp.major_id = svcc.service_contract_id\\nLEFT + JOIN sys.services AS svcs ON dp.major_id = svcs.service_id\\nLEFT JOIN sys.remote_service_bindings + AS rsb ON dp.major_id = rsb.remote_service_binding_id\\nLEFT JOIN sys.routes + AS rts ON dp.major_id = rts.route_id\\nLEFT JOIN sys.database_principals AS + printarget ON dp.major_id = printarget.principal_id\\nLEFT JOIN sys.symmetric_keys + AS sym ON dp.major_id = sym.symmetric_key_id\\nLEFT JOIN sys.asymmetric_keys + AS asym ON dp.major_id = asym.asymmetric_key_id\\nLEFT JOIN sys.certificates + AS crt ON dp.major_id = crt.certificate_id\\nLEFT JOIN sys.fulltext_catalogs + AS ftc ON dp.major_id = ftc.fulltext_catalog_id\\nWHERE (prin.type = 'S' OR + prin.type = 'W')\\nAND dp.type != 'CO'\\nAND prin.NAME NOT IN ( '##MS_PolicyEventProcessingLogin##',\\n + \ '##MS_PolicyTsqlExecutionLogin##' )\\nAND [state] IN + ('G','W')\",\"expectedResult\":[],\"columnNames\":[\"Permission\",\"Permission + Class\",\"Class Separator\",\"Object\",\"Principal\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1095\",\"name\":\"VA1095\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1095\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Revoke + any unnecessary permissions granted to PUBLIC, but avoid changing permissions + granted out of the box.\",\"scripts\":[],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1095\",\"severity\":\"Medium\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"NegativeList\",\"title\":\"Excessive + permissions should not be granted to PUBLIC role\",\"description\":\"Every + SQL Server login belongs to the public server role. When a server principal + has not been granted or denied specific permissions on a securable object, + the user inherits the permissions granted to public on that object. This displays + a list of all permissions that are granted to the PUBLIC role.\",\"rationale\":\"Database + Roles are the basic building block at the heart of separation of duties and + the principle of least permission. Granting permissions to principals through + the default PUBLIC role defeats this purpose.\",\"queryCheck\":{\"query\":\"SELECT + REPLACE(perms.class_desc, '_', ' ') AS [Permission Class]\\n ,CASE\\n WHEN + perms.class = 0\\n THEN db_name() -- database\\n WHEN perms.class + = 3\\n THEN schema_name(major_id) -- schema\\n WHEN perms.class + = 4\\n THEN printarget.NAME -- principal\\n WHEN perms.class + = 5\\n THEN asm.NAME -- assembly\\n WHEN perms.class = 6\\n + \ THEN type_name(major_id) -- type\\n WHEN perms.class = + 10\\n THEN xmlsc.NAME -- xml schema\\n WHEN perms.class + = 15\\n THEN msgt.NAME COLLATE DATABASE_DEFAULT -- message types\\n + \ WHEN perms.class = 16\\n THEN svcc.NAME COLLATE DATABASE_DEFAULT + -- service contracts\\n WHEN perms.class = 17\\n THEN svcs.NAME + COLLATE DATABASE_DEFAULT -- services\\n WHEN perms.class = 18\\n THEN + rsb.NAME COLLATE DATABASE_DEFAULT -- remote service bindings\\n WHEN + perms.class = 19\\n THEN rts.NAME COLLATE DATABASE_DEFAULT -- routes\\n + \ WHEN perms.class = 23\\n THEN ftc.NAME -- full text catalog\\n + \ WHEN perms.class = 24\\n THEN sym.NAME -- symmetric key\\n + \ WHEN perms.class = 25\\n THEN crt.NAME -- certificate\\n + \ WHEN perms.class = 26\\n THEN asym.NAME -- assymetric key\\n + \ END AS [Object]\\n ,perms.permission_name AS [Permission]\\nFROM + sys.database_permissions AS perms\\nLEFT JOIN sys.database_principals AS prin + ON perms.grantee_principal_id = prin.principal_id\\nLEFT JOIN sys.assemblies + AS asm ON perms.major_id = asm.assembly_id\\nLEFT JOIN sys.xml_schema_collections + AS xmlsc ON perms.major_id = xmlsc.xml_collection_id\\nLEFT JOIN sys.service_message_types + AS msgt ON perms.major_id = msgt.message_type_id\\nLEFT JOIN sys.service_contracts + AS svcc ON perms.major_id = svcc.service_contract_id\\nLEFT JOIN sys.services + AS svcs ON perms.major_id = svcs.service_id\\nLEFT JOIN sys.remote_service_bindings + AS rsb ON perms.major_id = rsb.remote_service_binding_id\\nLEFT JOIN sys.routes + AS rts ON perms.major_id = rts.route_id\\nLEFT JOIN sys.database_principals + AS printarget ON perms.major_id = printarget.principal_id\\nLEFT JOIN sys.symmetric_keys + AS sym ON perms.major_id = sym.symmetric_key_id\\nLEFT JOIN sys.asymmetric_keys + AS asym ON perms.major_id = asym.asymmetric_key_id\\nLEFT JOIN sys.certificates + AS crt ON perms.major_id = crt.certificate_id\\nLEFT JOIN sys.fulltext_catalogs + AS ftc ON perms.major_id = ftc.fulltext_catalog_id\\nWHERE perms.grantee_principal_id + = DATABASE_PRINCIPAL_ID('public')\\n AND class != 1 -- Object or Columns + (class = 1) are handled by VA1054 and have different remediation syntax\\n + \ AND [state] IN ('G','W')\\n AND NOT (\\n perms.class = 0\\n + \ AND prin.NAME = 'public'\\n AND perms.major_id = 0\\n AND + perms.minor_id = 0\\n AND permission_name IN (\\n 'VIEW + ANY COLUMN ENCRYPTION KEY DEFINITION'\\n ,'VIEW ANY COLUMN MASTER + KEY DEFINITION'\\n )\\n )\",\"expectedResult\":[],\"columnNames\":[\"Permission + Class\",\"Object\",\"Permission\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1097\",\"name\":\"VA1097\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1097\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Revoke + any unnecessary permissions granted to the special account GUEST\",\"scripts\":[],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1097\",\"severity\":\"Low\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"NegativeList\",\"title\":\"Principal + GUEST should not be granted permissions on objects or columns\",\"description\":\"Each + database includes a user called GUEST. Permissions granted to GUEST are inherited + by users who have access to the database, but who do not have a user account + in the database. This rule checks that all permissions have been revoked from + the GUEST user.\",\"rationale\":\"The special user GUEST is used to map any + logins that are not mapped to a specific database user. This can result in + principals gaining access to a database without having been explicitly granted + permission to do so.\",\"queryCheck\":{\"query\":\"SELECT object_schema_name(major_id) + AS [Schema]\\n ,object_name(major_id) AS [Object]\\n ,perms.permission_name + AS [Permission]\\nFROM sys.database_permissions AS perms\\nINNER JOIN sys.database_principals + AS prin ON perms.grantee_principal_id = prin.principal_id\\nWHERE grantee_principal_id + = DATABASE_PRINCIPAL_ID('guest')\\n AND perms.class = 1\\n AND [state] + IN ('G','W')\",\"expectedResult\":[],\"columnNames\":[\"Schema\",\"Object\",\"Permission\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1098\",\"name\":\"VA1098\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1098\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Change + the affected endpoints to accept only AES connections\",\"scripts\":[],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1098\",\"severity\":\"High\",\"category\":\"DataProtection\",\"ruleType\":\"NegativeList\",\"title\":\"Any + Existing Mirroring or SSB endpoint should require AES encryption\",\"description\":\"Mirroring + endpoints, which are used for Always On Synchronization, as well as Service + Broker endpoints support different encryption algorithms, including no encryption. + This rule checks that any existing endpoint requires AES encryption.\",\"rationale\":\"Using + a weak encryption algorithm or plaintext in communication protocols can lead + to data manipulation including data loss, and/or connection hijacking.\",\"queryCheck\":{\"query\":\"SELECT + ep.NAME AS [Endpoint Name],\\n ep.type_desc AS [Endpoint Type]\\nFROM + \ sys.database_mirroring_endpoints AS dme\\nJOIN sys.endpoints AS ep\\n + \ ON dme.endpoint_id = ep.endpoint_id\\nWHERE dme.encryption_algorithm + <> 2\\n AND ep.type BETWEEN 3 AND 4\\nUNION\\nSELECT ep.NAME AS + [Name],\\n ep.type_desc AS [Type]\\nFROM sys.service_broker_endpoints + AS sbe\\nJOIN sys.endpoints AS ep \\n ON sbe.endpoint_id = ep.endpoint_id\\nWHERE + \ sbe.encryption_algorithm <> 2\\n AND ep.type BETWEEN 3 AND 4\",\"expectedResult\":[],\"columnNames\":[\"Endpoint + Name\",\"Endpoint Type\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1099\",\"name\":\"VA1099\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1099\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Revoke + any unnecessary permissions granted to the special account GUEST\",\"scripts\":[],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1099\",\"severity\":\"Low\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"NegativeList\",\"title\":\"GUEST + user should not be granted permissions on database securables\",\"description\":\"Each + database includes a user called GUEST. Permissions granted to GUEST are inherited + by users who have access to the database, but who do not have a user account + in the database. This rule checks that all permissions have been revoked from + the GUEST user.\",\"rationale\":\"The special user GUEST is used to map any + logins that are not mapped to a specific database user. This can result in + principals gaining access to a database without having been explicitly granted + permission to do so.\",\"queryCheck\":{\"query\":\"SELECT REPLACE(perms.class_desc, + '_', ' ') AS [Permission Class],\\n CASE\\n WHEN perms.class=3 THEN + schema_name(major_id) -- schema\\n WHEN perms.class=4 THEN printarget.name + -- principal\\n WHEN perms.class=5 THEN asm.name -- assembly\\n WHEN + perms.class=6 THEN type_name(major_id) -- type\\n WHEN perms.class=10 + THEN xmlsc.name -- xml schema\\n WHEN perms.class=15 THEN msgt.name + COLLATE DATABASE_DEFAULT -- message types\\n WHEN perms.class=16 THEN + svcc.name COLLATE DATABASE_DEFAULT -- service contracts\\n WHEN perms.class=17 + THEN svcs.name COLLATE DATABASE_DEFAULT -- services\\n WHEN perms.class=18 + THEN rsb.name COLLATE DATABASE_DEFAULT -- remote service bindings\\n WHEN + perms.class=19 THEN rts.name COLLATE DATABASE_DEFAULT -- routes\\n WHEN + perms.class=23 THEN ftc.name -- full text catalog\\n WHEN perms.class=24 + then sym.name -- symmetric key\\n WHEN perms.class=25 then crt.name + -- certificate\\n WHEN perms.class=26 then asym.name -- assymetric + key\\n END AS [Object],\\n perms.permission_name AS [Permission]\\nFROM + sys.database_permissions AS perms\\nLEFT JOIN\\n sys.database_principals + AS prin\\n ON perms.grantee_principal_id = prin.principal_id\\nLEFT JOIN\\n + \ sys.assemblies AS asm\\n ON perms.major_id = asm.assembly_id\\nLEFT + JOIN\\n sys.xml_schema_collections AS xmlsc\\n ON perms.major_id = xmlsc.xml_collection_id\\nLEFT + JOIN\\n sys.service_message_types AS msgt\\n ON perms.major_id = msgt.message_type_id\\nLEFT + JOIN\\n sys.service_contracts AS svcc\\n ON perms.major_id = svcc.service_contract_id\\nLEFT + JOIN\\n sys.services AS svcs\\n ON perms.major_id = svcs.service_id\\nLEFT + JOIN\\n sys.remote_service_bindings AS rsb\\n ON perms.major_id = rsb.remote_service_binding_id\\nLEFT + JOIN\\n sys.routes AS rts\\n ON perms.major_id = rts.route_id\\nLEFT + JOIN\\n sys.database_principals AS printarget\\n ON perms.major_id = + printarget.principal_id\\nLEFT JOIN\\n sys.symmetric_keys AS sym\\n On + perms.major_id = sym.symmetric_key_id\\nLEFT JOIN\\n sys.asymmetric_keys + AS asym\\n ON perms.major_id = asym.asymmetric_key_id\\n LEFT JOIN\\n + \ sys.certificates AS crt\\n ON perms.major_id = crt.certificate_id\\nLEFT + JOIN\\n sys.fulltext_catalogs AS ftc\\n ON perms.major_id = ftc.fulltext_catalog_id\\nWHERE\\n + \ grantee_principal_id = DATABASE_PRINCIPAL_ID('guest')\\n AND class + in (3,4,5,6,10,15,16,17,18,19,23,24,25,26)\\n AND [state] IN ('G','W')\",\"expectedResult\":[],\"columnNames\":[\"Permission + Class\",\"Object\",\"Permission\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1102\",\"name\":\"VA1102\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1102\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[[\"False\"]],\"remediation\":{\"description\":\"Disable + the trustworthy bit (TWbit) from all affected databases.\\nIf you need to + use functionality that is controlled by the TWbit, it is recommended to use + digital signatures to enable the functionality instead of enabling the TWbit + on the database.\",\"scripts\":[\"ALTER DATABASE [master] SET TRUSTWORTHY + OFF\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1102\",\"severity\":\"High\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"Binary\",\"title\":\"The + Trustworthy bit should be disabled on all databases except MSDB\",\"description\":\"The + TRUSTWORTHY database property is used to indicate whether the instance of + SQL Server trusts the database and the contents within it. If this option + is enabled, database modules (for example, user-defined functions or stored + procedures) that use an impersonation context can access resources outside + the database. This rule verifies that the TRUSTWORTHY bit is disabled on all + databases, except MSDB.\",\"rationale\":\"The trustworthy bit (TWbit) is an + access control mechanism that enables features that can lead to an elevation + of privilege such as CLR and server-scope impersonation.\\nFor more information: + http://support.microsoft.com/kb/2183687\",\"queryCheck\":{\"query\":\"SELECT + CASE\\n WHEN EXISTS (SELECT *\\n FROM sys.databases\\n + \ WHERE NAME = Db_name()\\n AND + is_trustworthy_on = 1) THEN 1\\n ELSE 0\\n END AS Violation,\\n + \ Db_name() AS [Database]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:2.9\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1220\",\"name\":\"VA1220\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1220\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Force + encyption on the client applications or change the Force Encryption option + in SQL Configuration Manager. For More information please visit: https://support.microsoft.com/en-us/help/316898/how-to-enable-ssl-encryption-for-an-instance-of-sql-server-by-using-mi. + Note that this rule does not check for a specific version of TLS.\",\"scripts\":[],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1220\",\"severity\":\"High\",\"category\":\"DataProtection\",\"ruleType\":\"NegativeList\",\"title\":\"Database + communication using TDS should be protected through TLS\",\"description\":\"Microsoft + SQL Server can use Secure Sockets Layer (SSL) or Transport Layer Security + (TLS) to encrypt data that is transmitted across a network between an instance + of SQL Server and a client application. This rule checks that all connections + to the SQL Server are encrypted through TLS.\",\"rationale\":\"TLS encryption + increases the security of data which is transferred across the network between + an application and SQL Server.\",\"queryCheck\":{\"query\":\"SELECT DISTINCT + net_transport AS [Transport Protocol],\\n protocol_type AS + [Protocol Type],\\n endpoint_id AS [Endpoint Id],\\n auth_scheme + \ AS [Authentication Scheme]\\nFROM sys.dm_exec_connections\\nWHERE session_id + IS NOT NULL\\n AND encrypt_option != 'TRUE'\\n AND net_transport + != 'Shared memory'\",\"expectedResult\":[],\"columnNames\":[\"Transport Protocol\",\"Protocol + Type\",\"Endpoint Id\",\"Authentication Scheme\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1223\",\"name\":\"VA1223\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1223\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Create + new certificates, re-encrypt the data/sign-data using the new key, and drop + the affected keys.\",\"scripts\":[],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1223\",\"severity\":\"High\",\"category\":\"DataProtection\",\"ruleType\":\"NegativeList\",\"title\":\"Certificate + keys should use at least 2048 bits\",\"description\":\"Certificate keys are + used in RSA and other encryption algorithms to protect data. These keys need + to be of enough length to secure the user's data. This rule checks that the + key's length is at least 2048 bits for all certificates.\",\"rationale\":\"Key + length defines the upper-bound on the encryption algorithm's security. Using + short keys in encryption algorithms may lead to weaknesses in data-at-rest + protection.\",\"queryCheck\":{\"query\":\"SELECT name AS [Certificate Name], + thumbprint AS [Thumbprint]\\nFROM sys.certificates\\nWHERE key_length < 2048\",\"expectedResult\":[],\"columnNames\":[\"Certificate + Name\",\"Thumbprint\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1230\",\"name\":\"VA1230\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1230\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[[\"False\"]],\"remediation\":{\"description\":\"1. + Use SQL Server configuration Manager to disable this feature\\n2. Set the + filestream access level to 0 to effectively disable it - Use Remediation script\",\"scripts\":[\"EXECUTE + sp_configure 'show advanced options', 1; RECONFIGURE;\\nEXECUTE sp_configure + 'filestream access level', 0; RECONFIGURE;\\nEXECUTE sp_configure 'show advanced + options', 0; RECONFIGURE;\"],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1230\",\"severity\":\"High\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"Binary\",\"title\":\"Filestream + should be disabled\",\"description\":\"FILESTREAM integrates the SQL Server + Database Engine with an NTFS file system by storing varbinary(max) binary + large object (BLOB) data as files on the file system. Transact-SQL statements + can insert, update, query, search, and back up FILESTREAM data. Enabling Filestream + on SQL server exposes additional NTFS streaming API which increases its attack + surface and makes it prone to malicious attacks. This rule checks that Filestream + is disabled.\",\"rationale\":\"The most significant potential for attacking + an instance is by using features that expose an external interface or ad hoc + execution capability. Filestream (FS) allows for storage of large blobs on + the OS as files that are managed by a driver. If FS is not needed, this feature + must be disabled.\",\"queryCheck\":{\"query\":\"DECLARE @EnableLevel INT\\n\\nEXEC + master.dbo.xp_instance_regread\\n N'HKEY_LOCAL_MACHINE',\\n N'Software\\\\Microsoft\\\\MSSQLServer\\\\MSSQLServer\\\\Filestream',\\n + \ N'EnableLevel',\\n @EnableLevel output\\n\\nSELECT CASE\\n WHEN + @EnableLevel = 0 \\n OR EXISTS (SELECT *\\n FROM sys.configurations\\n + \ WHERE NAME = 'filestream access level'\\n AND + Cast(value AS INT) = 0) THEN 0\\n ELSE 1\\n END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1235\",\"name\":\"VA1235\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1235\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[[\"False\"]],\"remediation\":{\"description\":\"Disable + replication XPs on the system\",\"scripts\":[\"EXECUTE sp_configure 'show + advanced options', 1; RECONFIGURE;\\nEXECUTE sp_configure 'replication xps', + 0; RECONFIGURE;\\nEXECUTE sp_configure 'show advanced options', 0; RECONFIGURE;\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1235\",\"severity\":\"Medium\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"Binary\",\"title\":\"Server + configuration 'Replication XPs' should be disabled\",\"description\":\"Disable + the deprecated server configuration 'Replication XPs' to limit the attack + surface area. This is an internal only configuration setting.\",\"rationale\":\"Enabling + the replication XPs opens a significant attack surface area that can be used + by an attacker to gather information about the system and potentially abuse + the privileges of SQL Server.\",\"queryCheck\":{\"query\":\"SELECT CASE\\n + \ WHEN EXISTS (SELECT *\\n FROM sys.configurations\\n + \ WHERE NAME = 'replication xps'\\n AND + Cast(value AS INT) = 1) THEN 1\\n ELSE 0\\n END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1246\",\"name\":\"VA1246\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1246\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Remove + the application roles. Use users without login as a permission-based replacement\",\"scripts\":[],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1246\",\"severity\":\"Low\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"NegativeList\",\"title\":\"Application + roles should not be used\",\"description\":\"An application role is a database + principal that enables an application to run with its own user-like permissions. + Application roles enable that only users connecting through a particular application + can access specific data. Application roles are password-based (which applications + typically hardcode) and not permission based, which exposes the database to + approle impersonation by password-guessing. This rule checks that no application + roles are defined in the database.\",\"rationale\":\"It is important to limit + the possibility of acquiring user-like permissions to the database, and since + application roles are password based, they can lead to impersonation of the + application role via password-guessing.\",\"queryCheck\":{\"query\":\"SELECT + name AS [Role]\\nFROM sys.database_principals\\nWHERE type = 'A'\",\"expectedResult\":[],\"columnNames\":[\"Role\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1247\",\"name\":\"VA1247\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1247\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Remove + the startup property on the affected modules.\",\"scripts\":[],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1247\",\"severity\":\"High\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"NegativeList\",\"title\":\"There + should be no SPs marked as auto-start\",\"description\":\"When SQL Server + has been configured to 'scan for startup procs', the server will scan master + DB for stored procedures marked as auto-start. This rule checks that there + are no SPs marked as auto-start.\",\"rationale\":\"It is recommended to disable + the 'scan for startup procs', but in case you need to enable it (i.e. for + replication, or some other reason), keep track of the modules that will be + loaded automatically to avoid abuse.\",\"queryCheck\":{\"query\":\"SELECT + NAME AS [Stored Procedure]\\nFROM sys.procedures\\nWHERE is_auto_executed + = 1\",\"expectedResult\":[],\"columnNames\":[\"Stored Procedure\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1248\",\"name\":\"VA1248\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1248\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Remove + user defined roles from fixed-database roles\",\"scripts\":[],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1248\",\"severity\":\"Medium\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"NegativeList\",\"title\":\"User-defined + database roles should not be members of fixed roles\",\"description\":\"To + easily manage the permissions in your databases, SQL Server provides several + roles which are security principals that group other principals. They are + like groups in the Microsoft Windows operating system. Database accounts and + other SQL Server roles can be added into database-level roles. Each member + of a fixed-database role can add other users to that same role. This rule + checks that no user-defined roles are members of fixed roles\",\"rationale\":\"Adding + user defined database roles as members of fixed roles could enable unintended + privilege escalation, also finding any metadata indicating that the fixed + roles have been modified is typically a sign of data corruption or signs of + somebody corrupting the metadata in order to hide unusual activity.\",\"queryCheck\":{\"query\":\"SELECT + user_name(roles.role_principal_id) as [Role], user_name(roles.member_principal_id) + as [Member]\\nFROM sys.database_role_members AS roles, sys.database_principals + users\\nWHERE roles.member_principal_id = users.principal_id\\nAND ( roles.role_principal_id + >= 16384 AND roles.role_principal_id <= 16393)\\nAND users.type = 'R'\",\"expectedResult\":[],\"columnNames\":[\"Role\",\"Member\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1256\",\"name\":\"VA1256\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1256\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Drop + assemblies from the affected databases\",\"scripts\":[],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1256\",\"severity\":\"High\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"NegativeList\",\"title\":\"User + CLR assemblies should not be defined in the database\",\"description\":\"CLR + assemblies can be used to execute arbitrary code on SQL Server process. This + rule checks that there are no user-defined CLR assemblies in the database\",\"rationale\":\"Using + CLR assemblies can bring a security flaw to the SQL Server instance and to + all other network resources accessible from it\",\"queryCheck\":{\"query\":\"SELECT + name AS [Assembly] FROM sys.assemblies WHERE is_user_defined != 0\",\"expectedResult\":[],\"columnNames\":[\"Assembly\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1258\",\"name\":\"VA1258\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1258\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"master\",\"sa\"],[\"model\",\"sa\"],[\"msdb\",\"sa\"],[\"tempdb\",\"sa\"]],\"remediation\":{\"description\":\"Keep + track of database owners. Remove unnecessary database owners to avoid granting + excessive permissions or update the baseline to reflect the approved list + of owners.\",\"scripts\":[],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1258\",\"severity\":\"High\",\"category\":\"AuditingAndLogging\",\"ruleType\":\"BaselineExpected\",\"title\":\"Database + owners are as expected\",\"description\":\"Database owners can perform all + configuration and maintenance activities on the database, and can also drop + databases in SQL Server. Tracking database owners is important to avoid having + excessive permission for some principals. Create a baseline which defines + the expected database owners for the database. This rule checks whether the + database owners are as defined in the baseline.\",\"rationale\":\"Keeping + track of database owners is important to avoid granting excessive permissions.\",\"queryCheck\":{\"query\":\"SELECT + NAME AS [Database],\\n Suser_sname(owner_sid) AS [Owner]\\nFROM sys.databases\",\"expectedResult\":[],\"columnNames\":[\"Database\",\"Owner\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1264\",\"name\":\"VA1264\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1264\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"True\"]],\"remediation\":{\"description\":\"Create + and enable a new SERVER AUDIT SPECIFICATION that will audit FAILED_LOGIN_GROUP + & SUCCESSFUL_LOGIN_GROUP events. This SERVER AUDIT SPECIFICATION must target + a valid SERVER AUDIT object that is enabled.\",\"scripts\":[\"CREATE SERVER + AUDIT SPECIFICATION [AuditSpec_logon_information_failed_succeessful] FOR SERVER + AUDIT [] ADD (FAILED_LOGIN_GROUP), + ADD (SUCCESSFUL_LOGIN_GROUP) WITH (STATE = ON);\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1264\",\"severity\":\"Low\",\"category\":\"AuditingAndLogging\",\"ruleType\":\"Binary\",\"title\":\"Auditing + of both successful and failed login attempts should be enabled\",\"description\":\"SQL + Server auditing configuration enables administrators to track the users logging + into SQL Server instances that they're responsible for. This rule checks that + auditing is enabled for both successful and failed login attempts.\",\"rationale\":\"Logging + successful & failed login attempts provides information that can be used to + detect brute-force based password attacks against the system as well as forensic + information.\",\"queryCheck\":{\"query\":\"DECLARE @success_logon_event INT + = 0;\\nDECLARE @fail_logon_event INT = 0;\\n\\nSELECT @success_logon_event + = Count(*)\\nFROM sys.server_audits adts,\\n sys.server_audit_specifications + srvadtspecs,\\n sys.server_audit_specification_details srvadtspecdtls\\nWHERE + \ adts.audit_guid = srvadtspecs.audit_guid\\n AND adts.is_state_enabled + = 1\\n AND srvadtspecs.is_state_enabled = 1\\n AND srvadtspecdtls.audited_result + = 'SUCCESS AND FAILURE'\\n AND srvadtspecdtls.audit_action_id = 'LGSD';\\n\\nSELECT + @fail_logon_event = Count(*)\\nFROM sys.server_audits adts,\\n sys.server_audit_specifications + srvadtspecs,\\n sys.server_audit_specification_details srvadtspecdtls\\nWHERE + \ adts.audit_guid = srvadtspecs.audit_guid\\n AND adts.is_state_enabled + = 1\\n AND srvadtspecs.is_state_enabled = 1\\n AND srvadtspecdtls.audited_result + = 'SUCCESS AND FAILURE'\\n AND srvadtspecdtls.audit_action_id = 'LGFL';\\n\\nDECLARE + @check_results INT = 0;\\n\\nSELECT CASE\\n WHEN ( @success_logon_event + > 0\\n AND @fail_logon_event > 0 ) THEN 0\\n ELSE 1\\n + \ END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:5.4\"}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1278\",\"name\":\"VA1278\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1278\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Create + a base for EKM providers being used in the system. Remove old versions of + providers when no longer needed.\",\"scripts\":[],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1278\",\"severity\":\"Medium\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"BaselineExpected\",\"title\":\"Create + a baseline of External Key Management Providers\",\"description\":\"The SQL + Server Extensible Key Management (EKM) enables third-party EKM / Hardware + Security Modules (HSM) vendors to register their modules in SQL Server. When + registered, SQL Server users can use the encryption keys stored on EKM modules. + This rule displays a list of EKM providers being used in the system.\",\"rationale\":\"External + Key Management (EKM) Providers are the implementation of various HSM APIs + to interact with SQL server and encrypt/sign data. Keep a baseline of the + providers & versions being used in your system\",\"queryCheck\":{\"query\":\"SELECT + friendly_name AS [Provider Name],\\n provider_version AS [Provider Version],\\n + \ guid as [Guid]\\nFROM sys.dm_cryptographic_provider_properties\",\"expectedResult\":[],\"columnNames\":[\"Provider + Name\",\"Provider Version\",\"Guid\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1279\",\"name\":\"VA1279\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1279\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"True\"]],\"remediation\":{\"description\":\"Change + the ForceEncryption setting on SQL Server Control Manager. For More information + please visit: https://support.microsoft.com/en-us/help/316898/how-to-enable-ssl-encryption-for-an-instance-of-sql-server-by-using-mi\",\"scripts\":[],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1279\",\"severity\":\"High\",\"category\":\"DataProtection\",\"ruleType\":\"Binary\",\"title\":\"Force + encryption should be enabled for TDS\",\"description\":\"When the Force Encryption + option for the Database Engine is enabled, all communications between client + and server is encrypted regardless of whether the 'Encrypt connection' option + (such as from SSMS) is checked or not. This rule checks that Force Encryption + option is enabled.\",\"rationale\":\"Connection encryption increases the security + of data which is transferred across the network between an application and + SQL Server. Using the force encryption option will guarantee that all connections + are encrypted.\",\"queryCheck\":{\"query\":\"DECLARE @ForceEncryption INT;\\n\\nEXEC + master.dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE'\\n ,N'Software\\\\Microsoft\\\\MSSQLServer\\\\MSSQLServer\\\\SuperSocketNetLib'\\n + \ ,N'ForceEncryption'\\n ,@ForceEncryption OUTPUT;\\n\\nSELECT CASE \\n + \ WHEN @ForceEncryption = 1\\n OR UnencryptedConnections + > 0 -- Unencrypted connections will trigger VA1220\\n THEN 0\\n + \ ELSE 1\\n END AS [Violation]\\nFROM (\\n SELECT COUNT(*) + AS UnencryptedConnections\\n FROM sys.dm_exec_connections\\n WHERE encrypt_option + != 'TRUE'\\n AND net_transport != 'Shared memory'\\n ) t\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1280\",\"name\":\"VA1280\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1280\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Revoke + any unecessary permissions\",\"scripts\":[],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1280\",\"severity\":\"Medium\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"NegativeList\",\"title\":\"Server + Permissions granted to public should be minimized\",\"description\":\"Every + SQL Server login belongs to the public server role. When a server principal + has not been granted or denied specific permissions on a securable object, + the user inherits the permissions granted to public on that object. This rule + checks that server permissions granted to public is minimized.\",\"rationale\":\"Server + permissions are effective for SQL Server as a whole, and may affect permissions + in user databases. Keeping the server-scoped permissions granted to public + at a minimum will significantly reduce the attack surface area.\",\"queryCheck\":{\"query\":\"SELECT + permission_name AS [Permission],\\n CASE\\n WHEN perms.class + = 101 THEN 'LOGIN'\\n ELSE class_desc\\n END AS + [Permission Class],\\n CASE\\n WHEN perms.class = 100 THEN @@SERVERNAME + -- SERVER\\n WHEN perms.class = 101 THEN prins.NAME -- SERVER_PRINCIPAL\\n + \ WHEN perms.class = 105 THEN ep.NAME -- ENDPOINT\\n END AS + [Object]\\nFROM sys.server_permissions AS perms\\n LEFT JOIN sys.endpoints + AS ep\\n ON ep.endpoint_id = perms.major_id\\n LEFT JOIN + sys.server_principals AS prins\\n ON prins.principal_id = perms.major_id\\nWHERE + \ grantee_principal_id = Suser_id('public')\\n AND NOT (\\n (permission_name + = 'CONNECT' AND perms.class = 105 AND ep.NAME = 'TSQL LOCAL MACHINE') OR\\n + \ (permission_name = 'CONNECT' AND perms.class = 105 AND + ep.NAME = 'TSQL Named Pipes') OR\\n (permission_name = 'CONNECT' + AND perms.class = 105 AND ep.NAME = 'TSQL Default TCP') OR\\n (permission_name + = 'CONNECT' AND perms.class = 105 AND ep.NAME = 'TSQL Default VIA') OR\\n + \ (permission_name = 'VIEW ANY DATABASE' AND perms.class + = 100)\\n )\",\"expectedResult\":[],\"columnNames\":[\"Permission\",\"Permission + Class\",\"Object\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:3.8\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1281\",\"name\":\"VA1281\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1281\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"SQLArcExtensionUserRole\",\"NT + AUTHORITY\\\\SYSTEM\"]],\"remediation\":{\"description\":\"Keep track of role + membership and remove unnecessary members from roles to avoid granting excessive + permissions or update baseline to comply with new changes\",\"scripts\":[\"ALTER + ROLE [SQLArcExtensionUserRole] DROP MEMBER [NT AUTHORITY\\\\SYSTEM]\"],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1281\",\"severity\":\"Medium\",\"category\":\"AuditingAndLogging\",\"ruleType\":\"BaselineExpected\",\"title\":\"All + memberships for user-defined roles should be intended\",\"description\":\"User-defined + roles are security principals defined by the user to group principals to easily + manage permissions. Monitoring these roles is important to avoid having excessive + permissions. Create a baseline which defines expected membership for each + user-defined role. This rule checks whether all memberships for user-defined + roles are as defined in the baseline\",\"rationale\":\"Keeping track of role + memberships is important to avoid granting excessive permissions\",\"queryCheck\":{\"query\":\"SELECT + user_name(role_principal_id) AS [Role], user_name(member_principal_id) AS + [Member]\\nFROM sys.database_role_members\\nWHERE role_principal_id NOT IN + (16384,16385,16386,16387,16389,16390,16391,16392,16393)\",\"expectedResult\":[],\"columnNames\":[\"Role\",\"Member\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1283\",\"name\":\"VA1283\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA1283\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"True\"]],\"remediation\":{\"description\":\"Follow + the instruction on: https://msdn.microsoft.com/en-us/library/cc280448.aspx\",\"scripts\":[],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA1283\",\"severity\":\"Low\",\"category\":\"AuditingAndLogging\",\"ruleType\":\"Binary\",\"title\":\"There + should be at least 1 active audit in the system\",\"description\":\"Auditing + an instance of the SQL Server Database Engine or an individual database involves + tracking and logging events that occur on the Database Engine. The SQL Server + Audit object collects a single instance of server or database-level actions + and groups of actions to monitor. This rule checks that there is at least + one active audit in the system.\",\"rationale\":\"Auditing is necessary for + the analysis of database actions, troubleshooting problems, investigating + suspicious and malicious activity and can deter users from taking inappropriate + actions.\",\"queryCheck\":{\"query\":\"SELECT CASE\\n WHEN ( NOT EXISTS + (SELECT NAME\\n FROM sys.server_audits\\n WHERE + \ is_state_enabled = 1\\n AND type != 'FL'\\n + \ UNION\\n SELECT NAME\\n + \ FROM sys.server_file_audits sdtfls\\n WHERE + \ is_state_enabled = 1) ) THEN 1\\n ELSE 0\\n END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA2020\",\"name\":\"VA2020\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA2020\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Revoke + permissions from principals where not needed. It is recommended to have at + most 1 principal granted a specific permission.\",\"scripts\":[],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA2020\",\"severity\":\"High\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"BaselineExpected\",\"title\":\"Minimal + set of principals should be granted ALTER or ALTER ANY USER database-scoped + permissions\",\"description\":\"Every SQL Server securable has permissions + associated with it that can be granted to principals. Permissions can be scoped + at the server level (assigned to logins and server roles) or at the database + level (assigned to database users and database roles). These rules check that + only a minimal set of principals are granted ALTER or ALTER ANY USER database-scoped + permissions.\",\"rationale\":\"Developing an application using a least-privileged + user account (LUA) approach is an important part of a defensive, in-depth + strategy for countering security threats. The LUA approach ensures that users + follow the principle of least privilege and always log on with limited user + accounts. Administrative tasks are broken out using fixed server roles, and + the use of the sysadmin fixed server role is severely restricted. Always follow + the principle of least privilege when granting permissions to database users. + Grant the minimum permissions necessary to a user or role to accomplish a + given task. See https://msdn.microsoft.com/en-us/library/bb669084(v=vs.110).aspx.\",\"queryCheck\":{\"query\":\"SELECT + perms.class_desc AS [Permission Class]\\n ,perms.permission_name AS [Permission]\\n + \ ,type_desc AS [Principal Type]\\n ,prin.name AS [Principal]\\nFROM + sys.database_permissions AS perms\\nINNER JOIN sys.database_principals AS + prin ON perms.grantee_principal_id = prin.principal_id\\nWHERE permission_name + IN (\\n 'ALTER'\\n ,'ALTER ANY USER'\\n )\\n AND user_name(grantee_principal_id) + NOT IN (\\n 'guest'\\n ,'public'\\n )\\n AND perms.class + = 0\\n AND [state] IN ('G','W')\\n AND NOT (\\n prin.type = 'S'\\n + \ AND prin.name = 'dbo'\\n AND prin.authentication_type = 1\\n + \ AND prin.owning_principal_id IS NULL\\n )\",\"expectedResult\":[],\"columnNames\":[\"Permission + Class\",\"Permission\",\"Principal Type\",\"Principal\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA2103\",\"name\":\"VA2103\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA2103\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"xp_dirtree\",\"public\"],[\"xp_fixeddrives\",\"public\"],[\"xp_getnetname\",\"public\"],[\"xp_msver\",\"public\"],[\"xp_sprintf\",\"public\"],[\"xp_sscanf\",\"public\"]],\"remediation\":{\"description\":\"Revoke + unnecessary EXECUTE permission on extended stored procedure.\",\"scripts\":[\"REVOKE + EXECUTE ON [xp_dirtree] TO [public]\",\"REVOKE EXECUTE ON [xp_fixeddrives] + TO [public]\",\"REVOKE EXECUTE ON [xp_getnetname] TO [public]\",\"REVOKE EXECUTE + ON [xp_msver] TO [public]\",\"REVOKE EXECUTE ON [xp_sprintf] TO [public]\",\"REVOKE + EXECUTE ON [xp_sscanf] TO [public]\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA2103\",\"severity\":\"Medium\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"NegativeList\",\"title\":\"Unnecessary + execute permissions on extended stored procedures should be revoked.\",\"description\":\"Extended + stored procedures are DLLs that an instance of SQL Server can dynamically + load and run. SQL Server is packaged with many extended stored procedures + that allow for interaction with the system DLLs. This rule checks that unnecessary + execute permissions on extended stored procedures have been revoked.\",\"rationale\":\"The + execution of an extended stored procedure has these characteristics:\\nThe + extended stored procedure function is executed under the security context + of Microsoft SQL Server.\\nThe extended stored procedure function runs in + the process space of SQL Server.\\nThe thread associated with the execution + of the extended stored procedure is the same one used for the client connection.\\n\\nAfter + the extended stored procedure DLL is loaded, the DLL remains loaded in the + address space of the server until SQL Server is stopped or the administrator + explicitly unloads the DLL.\\n\\nBecause extended stored procedures can access + the server machine, they can be a very powerful tool. But if their access + is not properly controlled, they can be exploited by an attacker. As such, + any unnecessary extended stored procedure should be disabled to prevent their + misuse.\",\"queryCheck\":{\"query\":\"SELECT\\n Object_name(major_id) AS + [Stored Procedure],\\n dpr.NAME AS [Principal] \\nFROM\\n sys.database_permissions + AS dp \\n INNER JOIN\\n sys.database_principals AS dpr \\n ON + dp.grantee_principal_id = dpr.principal_id \\nWHERE\\n (\\n major_id + IN \\n (\\n Object_id('xp_dsninfo'),\\n Object_id('xp_enumdsn'),\\n + \ Object_id('xp_enumerrorlogs'),\\n Object_id('xp_eventlog'),\\n + \ Object_id('xp_getfiledetails'),\\n Object_id('xp_getnetname') + \\n )\\n OR \\n (\\n major_id IN \\n (\\n Object_id('xp_availablemedia'),\\n + \ Object_id('xp_dirtree'),\\n Object_id('xp_enumerrorlogs'),\\n + \ Object_id('xp_enumgroups'),\\n Object_id('xp_fixeddrives'),\\n + \ Object_id('xp_logevent'),\\n Object_id('xp_loginconfig'),\\n + \ Object_id('xp_msver'),\\n Object_id('xp_sprintf'),\\n + \ Object_id('xp_sscanf'),\\n Object_id('xp_subdirs'),\\n + \ Object_id('xp_servicecontrol') \\n )\\n AND dp.grantee_principal_id + = 0\\n )\\n )\\n AND dp.[type] = 'EX' \\n AND [state] IN \\n (\\n + \ 'G',\\n 'W'\\n )\",\"expectedResult\":[],\"columnNames\":[\"Stored + Procedure\",\"Principal\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA2108\",\"name\":\"VA2108\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA2108\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Remove + members who should not have access to the database role\",\"scripts\":[],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA2108\",\"severity\":\"High\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"BaselineExpected\",\"title\":\"Minimal + set of principals should be members of fixed high impact database roles\",\"description\":\"SQL + Server provides roles to help manage the permissions. Roles are security principals + that group other principals. Database-level roles are database-wide in their + permission scope. This rule checks that a minimal set of principals are members + of the fixed database roles.\",\"rationale\":\"Fixed database roles may have + administrative permissions on the system. Following the principle of least + privilege, it is important to minimize membership in fixed database roles + and keep a baseline of these memberships. See https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles + for additional information on database roles.\",\"queryCheck\":{\"query\":\"SELECT + user_name(sr.member_principal_id) AS [Principal]\\n ,user_name(sr.role_principal_id) + AS [Role]\\n ,type_desc AS [Principal Type]\\nFROM sys.database_role_members + AS sr\\nINNER JOIN sys.database_principals sp ON sp.principal_id = sr.member_principal_id\\nWHERE + sr.role_principal_id IN (\\n user_id('bulkadmin'),\\n user_id('db_accessadmin'),\\n + \ user_id('db_securityadmin'),\\n user_id('db_ddladmin'),\\n + \ user_id('db_backupoperator'))\\n OR (sr.role_principal_id = user_id('db_owner')\\n + \ AND sr.member_principal_id <> user_id('dbo'))\",\"expectedResult\":[],\"columnNames\":[\"Principal\",\"Role\",\"Principal + Type\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA2109\",\"name\":\"VA2109\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA2109\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Remove + members who should not have access to the database role\",\"scripts\":[],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA2109\",\"severity\":\"Low\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"BaselineExpected\",\"title\":\"Minimal + set of principals should be members of fixed low impact database roles\",\"description\":\"SQL + Server provides roles to help manage the permissions. Roles are security principals + that group other principals. Database-level roles are database-wide in their + permission scope. This rule checks that a minimal set of principals are members + of the fixed database roles.\",\"rationale\":\"Fixed database roles may have + administrative permissions on the system. Following the principle of least + privilege, it is important to minimize membership in fixed database roles + and keep a baseline of these memberships. See https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles + for additional information on database roles.\",\"queryCheck\":{\"query\":\"SELECT + user_name(sr.member_principal_id) as [Principal]\\n ,user_name(sr.role_principal_id) + as [Role]\\n ,type_desc as [Principal Type]\\nFROM sys.database_role_members + AS sr\\nINNER JOIN sys.database_principals AS sp ON sp.principal_id = sr.member_principal_id\\nWHERE + sr.role_principal_id IN (\\n user_id('db_datareader')\\n ,user_id('db_datawriter')\\n + \ ,user_id('db_denydatareader')\\n ,user_id('db_denydatawriter')\\n + \ )\",\"expectedResult\":[],\"columnNames\":[\"Principal\",\"Role\",\"Principal + Type\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA2110\",\"name\":\"VA2110\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA2110\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"xp_instance_regread\",\"NT + Service\\\\Microsoft Defender For SQL\"],[\"xp_instance_regread\",\"public\"],[\"xp_regread\",\"public\"]],\"remediation\":{\"description\":\"Review + the list of principals that have permission to execute registry extended stored + procedures. Revoke execute permissions for principals that should not have + this permission. Set the remaining principals as a baseline and track that + changes made to this list are desirable. Note that revoking execute permissions + to xp_instance_regread and xp_regread will affect applications that use SMO + library such as SSMS.\",\"scripts\":[\"REVOKE EXECUTE ON [xp_instance_regread] + TO [NT Service\\\\Microsoft Defender For SQL]\",\"REVOKE EXECUTE ON [xp_instance_regread] + TO [public]\",\"REVOKE EXECUTE ON [xp_regread] TO [public]\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA2110\",\"severity\":\"High\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"BaselineExpected\",\"title\":\"Execute + permissions to access the registry should be restricted\",\"description\":\"Registry + extended stored procedures allow Microsoft SQL Server to read, write, and + enumerate values and keys in the registry. This rule enumerates principals + with permission to execute registry extended stored procedures.\",\"rationale\":\"The + registry contains sensitive information, including password hashes as well + as clear text passwords. Registry extended stored procedures allow Microsoft + SQL Server to access the machine's registry. The sensitivity of these procedures + are exacerbated if Microsoft SQL Server is run under the Windows account LocalSystem. + LocalSystem can read and write nearly all values in the registry, even those + not accessible by the Administrator. Unlike the xp_cmdshell extended stored + procedure, which runs under a separate context if executed by a login not + in the sysadmin role, the registry extended stored procedures always execute + under the security context of the MSSQLServer service. Because the sensitive + information is stored in the registry, it is essential that access to that + information be properly guarded.\",\"queryCheck\":{\"query\":\"SELECT OBJECT_NAME(major_id) + AS [Stored Procedure]\\n ,dpr.NAME AS [Principal]\\nFROM sys.database_permissions + AS dp\\nINNER JOIN sys.database_principals AS dpr ON dp.grantee_principal_id + = dpr.principal_id\\nWHERE major_id IN (\\n OBJECT_ID('xp_regaddmultistring')\\n + \ ,OBJECT_ID('xp_regdeletekey')\\n ,OBJECT_ID('xp_regdeletevalue')\\n + \ ,OBJECT_ID('xp_regenumvalues')\\n ,OBJECT_ID('xp_regenumkeys')\\n + \ ,OBJECT_ID('xp_regread')\\n ,OBJECT_ID('xp_regremovemultistring')\\n + \ ,OBJECT_ID('xp_regwrite')\\n ,OBJECT_ID('xp_instance_regaddmultistring')\\n + \ ,OBJECT_ID('xp_instance_regdeletekey')\\n ,OBJECT_ID('xp_instance_regdeletevalue')\\n + \ ,OBJECT_ID('xp_instance_regenumkeys')\\n ,OBJECT_ID('xp_instance_regenumvalues')\\n + \ ,OBJECT_ID('xp_instance_regread')\\n ,OBJECT_ID('xp_instance_regremovemultistring')\\n + \ ,OBJECT_ID('xp_instance_regwrite')\\n )\\n AND dp.[type] + = 'EX'\\n AND [state] IN ('G','W')\",\"expectedResult\":[],\"columnNames\":[\"Stored + Procedure\",\"Principal\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA2111\",\"name\":\"VA2111\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA2111\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Remove + the sample database.\",\"scripts\":[],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA2111\",\"severity\":\"Low\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"NegativeList\",\"title\":\"Sample + databases should be removed\",\"description\":\"Microsoft SQL Server comes + shipped with several sample databases. This rule checks whether the sample + databases have been removed.\",\"rationale\":\"Sample database potentially + provide additional surface area against which an attack could be made. If + a security vulnerability exists in a sample database, then the vulnerability + could possibly be exploited to gain unauthorized access to other databases + or the server machine. As such, it is recommended that sample databases be + removed from any production environment.\",\"queryCheck\":{\"query\":\"SELECT + NAME AS [Database]\\nFROM sys.databases\\nWHERE NAME IN ( 'pubs', 'Northwind', + 'AdventureWorks', 'AdventureWorksDW',\\n 'AdventureWorksAS', + 'WideWorldImporters', 'WideWorldImportersDW' )\",\"expectedResult\":[],\"columnNames\":[\"Database\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA2114\",\"name\":\"VA2114\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA2114\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"sysadmin\",\"MIDDLEEAST\\\\ggoldshtein\"]],\"remediation\":{\"description\":\"Remove + members who should not have access to fixed server roles.\",\"scripts\":[\"ALTER + SERVER ROLE [sysadmin] DROP MEMBER [MIDDLEEAST\\\\ggoldshtein]\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA2114\",\"severity\":\"High\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"BaselineExpected\",\"title\":\"Minimal + set of principals should be members of fixed server roles\",\"description\":\"SQL + Server provides roles to help manage permissions. Roles are security principals + that group other principals. Server-level roles are server-wide in their permission + scope. This rule checks that a minimal set of principals are members of the + fixed server roles.\",\"rationale\":\"Fixed server roles typically have administrative + permissions on the system. Following the principle of least privilege, it + is important to minimize membership in fixed server roles and keep a baseline + of these memberships. See https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/server-level-roles + for additional information on server roles.\",\"queryCheck\":{\"query\":\"SELECT\\n + \ Suser_name(sr.role_principal_id) AS [Role],\\n sp.NAME AS [Principal] + \\nFROM\\n sys.server_role_members AS sr \\n INNER JOIN\\n sys.server_principals + sp \\n ON sp.principal_id = sr.member_principal_id \\nWHERE\\n sr.role_principal_id + IN \\n (\\n Suser_id('sysadmin'),\\n suser_id('serveradmin'),\\n + \ suser_id('setupadmin'),\\n suser_id('processadmin'),\\n suser_id('diskadmin'),\\n + \ suser_id('dbcreator'),\\n suser_id('bulkadmin') \\n )\\n AND + sp.principal_id != 1 \\n AND NOT ( ( sr.role_principal_id = 3 \\n AND + sp.NAME = 'NT SERVICE\\\\SQLWriter' ) \\n OR \\n (\\n sr.role_principal_id + = 3 \\n AND sp.NAME = 'NT SERVICE\\\\Winmgmt' \\n )\\n OR \\n (\\n + \ sr.role_principal_id = 3 \\n AND sp.NAME = 'NT Service\\\\MSSQLSERVER' + \\n )\\n OR \\n (\\n sr.role_principal_id = 3 \\n AND sp.NAME + = 'NT SERVICE\\\\SQLSERVERAGENT' \\n )\\n OR \\n (\\n sr.role_principal_id + = 3 \\n AND sp.NAME = 'NT Service\\\\SQLIaaSExtension' \\n )\\n OR + \\n (\\n sr.role_principal_id = 3 \\n AND sp.NAME = 'NT Service\\\\HealthService' + \\n )\\n OR \\n (\\n sr.role_principal_id = 3 \\n AND sp.NAME + = 'NT Service\\\\MSSQL' + ISNULL('$' + convert(sysname, serverproperty('InstanceName')), + '') \\n )\\n OR \\n (\\n sr.role_principal_id = 3 \\n AND + sp.NAME = 'NT SERVICE\\\\SQLAgent' + ISNULL('$' + convert(sysname, serverproperty('InstanceName')), + '') \\n )\\n OR \\n (\\n sr.role_principal_id = 3 \\n AND + sp.NAME LIKE '%\\\\replAgentUser'\\n AND sp.type = 'U'\\n AND SERVERPROPERTY('EngineEdition') + = 8\\n )\\n OR \\n (\\n sr.role_principal_id = 3 \\n AND sp.NAME + LIKE '%\\\\sqlAgentUser'\\n AND sp.type = 'U'\\n AND SERVERPROPERTY('EngineEdition') + = 8\\n ) \\n)\",\"expectedResult\":[],\"columnNames\":[\"Role\",\"Principal\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA2120\",\"name\":\"VA2120\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA2120\",\"status\":\"Finding\",\"isTrimmed\":false,\"queryResults\":[[\"remote + access\"]],\"remediation\":{\"description\":\"Disable the features.\",\"scripts\":[\"EXECUTE + sp_configure 'show advanced options', 1; RECONFIGURE WITH OVERRIDE;\\nEXECUTE + sp_configure 'remote access', 0; RECONFIGURE;\\nEXECUTE sp_configure 'show + advanced options', 0; RECONFIGURE;\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA2120\",\"severity\":\"High\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"NegativeList\",\"title\":\"Features + that may affect security should be disabled\",\"description\":\"SQL Server + is capable of providing a wide range of features and services. Some of the + features and services, provided by default, may not be necessary, and enabling + them could adversely affect the security of the system. This rules checks + that these features are disabled.\",\"rationale\":\"The more SQL Server features + and services you enable, the larger its surface attack area becomes, making + your system more vulnerable to potential attacks. These fetures should be + disabled unless it is absolutely needed in this environment.\",\"queryCheck\":{\"query\":\"SELECT + NAME AS [Feature]\\nFROM sys.configurations\\nWHERE NAME IN ( 'allow updates', + 'cross db ownership chaining',\\n 'contained database authentication', + 'remote access')\\n AND Cast(value AS INT) = 1\",\"expectedResult\":[],\"columnNames\":[\"Feature\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:2.3\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA2121\",\"name\":\"VA2121\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA2121\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[[\"False\"]],\"remediation\":{\"description\":\"Disable + the feature 'OLE Automation Procedures'\",\"scripts\":[\"EXECUTE sp_configure + 'show advanced options', 1; RECONFIGURE;\\nEXECUTE sp_configure 'ole automation + procedures', 0; RECONFIGURE;\\nEXECUTE sp_configure 'show advanced options', + 0; RECONFIGURE;\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA2121\",\"severity\":\"High\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"Binary\",\"title\":\"'OLE + Automation Procedures' feature should be disabled\",\"description\":\"SQL + Server is capable of providing a wide range of features and services. Some + of the features and services, provided by default, may not be necessary, and + enabling them could adversely affect the security of the system.\\nThe OLE + Automation Procedures option controls whether OLE Automation objects can be + instantiated within Transact-SQL batches. These are extended stored procedures + that allow SQL Server users to execute functions external to SQL Server.\\nRegardless + of its benefits it can also be used for exploits, and is known as a popular + mechanism to plant files on the target machines. It is advised to use Powershell + as a replacement for this tool.\\nThis rule checks that 'OLE Automation Procedures' + feature is disabled.\",\"rationale\":\"The more SQL Server features and services + you enable, the larger its surface attack area becomes, making your system + more vulnerable to potential attacks.\\nIf this feature is enabled, users + will be allowed to execute functions in the security context of SQL Server.\",\"queryCheck\":{\"query\":\"SELECT + CASE\\n WHEN EXISTS (SELECT *\\n FROM sys.configurations\\n + \ WHERE NAME = 'ole automation procedures'\\n AND + Cast(value AS INT) = 1) THEN 1\\n ELSE 0\\n END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"CIS\",\"reference\":\"v1.0.0-08-11-2017:2.5\"},{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA2122\",\"name\":\"VA2122\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA2122\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[[\"False\"]],\"remediation\":{\"description\":\"Disable + the feature.\",\"scripts\":[\"EXECUTE sp_configure 'show advanced options', + 1; RECONFIGURE;\\nEXECUTE sp_configure 'user options', 0; RECONFIGURE;\\nEXECUTE + sp_configure 'show advanced options', 0; RECONFIGURE;\"],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA2122\",\"severity\":\"Medium\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"Binary\",\"title\":\"'User + Options' feature should be disabled\",\"description\":\"SQL Server is capable + of providing a wide range of features and services. Some of the features and + services, provided by default, may not be necessary, and enabling them could + adversely affect the security of the system.\\nThe user options option specifies + global defaults for all users. A list of default query processing options + is established for the duration of a user's work session. The user options + option allows you to change the default values of the SET options (if the + server's default settings are not appropriate).\\nThis rules checks that 'user + options' feature is disabled.\",\"rationale\":\"The more SQL Server features + and services you enable, the larger its surface attack area becomes, making + your system more vulnerable to potential attacks. Feature 'user options' should + be disabled unless it is absolutely needed in this environment.\",\"queryCheck\":{\"query\":\"SELECT + CASE\\n WHEN EXISTS (SELECT *\\n FROM sys.configurations\\n + \ WHERE NAME = 'user options'\\n AND + Cast(value AS INT) = 1) THEN 1\\n ELSE 0\\n END AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA2126\",\"name\":\"VA2126\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA2126\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Disable + the features.\",\"scripts\":[],\"automated\":true,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA2126\",\"severity\":\"Medium\",\"category\":\"SurfaceAreaReduction\",\"ruleType\":\"NegativeList\",\"title\":\"Extensibility-features + that may affect security should be disabled if not needed\",\"description\":\"SQL + Server provides a wide range of features and services. Some of the features + and services, provided by default, may not be necessary, and enabling them + could adversely affect the security of the system. This rule checks that configurations + that allow extraction of data to an external data source and the execution + of scripts with certain remote language extensions are disabled.\",\"rationale\":\"The + more SQL Server features and services you enable, the larger its surface attack + area becomes, making your system more vulnerable to potential attacks. These + features should be disabled unless it is absolutely needed in this environment.\",\"queryCheck\":{\"query\":\"SELECT + NAME AS [Feature]\\nFROM sys.configurations\\nWHERE NAME IN ( 'allow polybase + export', 'hadoop connectivity',\\n 'remote data archive', + 'external scripts enabled')\\n AND Cast(value AS INT) = 1\",\"expectedResult\":[],\"columnNames\":[\"Feature\"]},\"benchmarkReferences\":[{\"benchmark\":\"FedRAMP\",\"reference\":null}]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA2128\",\"name\":\"VA2128\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA2128\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[[\"False\"]],\"remediation\":{\"description\":\"Upgrade + your SQL Server version to 2012 or higher.\",\"scripts\":[],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA2128\",\"severity\":\"High\",\"category\":\"InstallationUpdatesAndPatches\",\"ruleType\":\"Binary\",\"title\":\"Vulnerability + Assessment is not supported for SQL Server versions lower than SQL Server + 2012\",\"description\":\"To run a Vulnerability Assessment scan on your SQL + Server, the server needs to be upgraded to SQL Server 2012 or higher.SQL Server + 2008 R2 and below are no longer supported by Microsoft. See here: https://www.microsoft.com/en-us/cloud-platform/windows-sql-server-2008\",\"rationale\":\"Older + versions of SQL server are no longer supported by Microsoft. Windows Server + 2008 R2 end-of-life mainstream support ended on January 13, 2015. On January + 14, 2020, Microsoft will end all support for Windows Server 2008 R2. \",\"queryCheck\":{\"query\":\"SELECT + CASE\\n WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) LIKE + '7.%' THEN '1'\\n WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) + LIKE '8.%' THEN '1'\\n WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) + LIKE '9.%' THEN '1'\\n WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) + LIKE '10.%' THEN '1'\\n ELSE '0'\\nEND AS [Violation]\",\"expectedResult\":[[\"0\"]],\"columnNames\":[\"Violation\"]},\"benchmarkReferences\":[]}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA2201\",\"name\":\"VA2201\",\"type\":\"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults\",\"properties\":{\"ruleId\":\"VA2201\",\"status\":\"NonFinding\",\"isTrimmed\":false,\"queryResults\":[],\"remediation\":{\"description\":\"Disable + or rename the accounts.\",\"scripts\":[],\"automated\":false,\"portalLink\":\"\"},\"baselineAdjustedResult\":null,\"ruleMetadata\":{\"ruleId\":\"VA2201\",\"severity\":\"High\",\"category\":\"AuthenticationAndAuthorization\",\"ruleType\":\"NegativeList\",\"title\":\"SQL + logins with commonly used names should be disabled\",\"description\":\"This + rule checks the accounts with database owner permission for commonly used + names. Assigning commonly used names to accounts with database owner permission + increases the likelihood of successful brute force attacks.\",\"rationale\":\"Removing + or disabling commonly used names to accounts with database owner permission + reduces the likelihood of successful brute force attacks.\",\"queryCheck\":{\"query\":\"SELECT + NAME AS [Name]\\nFROM sys.sql_logins\\nWHERE type_desc = 'SQL_LOGIN'\\nAND + NAME IN (\\n '401hk',\\n 'Guest',\\n 'admin',\\n 'bizbox',\\n + \ 'bwsa',\\n 'dazone',\\n 'dsanc',\\n 'gaibian',\\n + \ 'god',\\n 'hbv7',\\n 'kisadmin',\\n 'kisadminnew1',\\n + \ 'mssqla',\\n 'neterp',\\n 'nt\_authority\\\\anonymous\_logon',\\n + \ 'nxp',\\n 'ps',\\n 'repl_subscriber',\\n 'sa',\\n + \ 'sqladmin',\\n 'ss',\\n 'su',\\n 'sysdba',\\n + \ 'sysdbsa',\\n 'test',\\n 'uep',\\n 'unierp',\\n + \ 'users',\\n 'vice',\\n 'youda')\\nAND is_disabled = + 0\",\"expectedResult\":[],\"columnNames\":[\"Name\"]},\"benchmarkReferences\":[]}}}]}" + headers: + cache-control: + - no-cache + content-length: + - '139661' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:26:52 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=dde7293a6aad00db58800ee68945263f3c56235c3ff8f6c8af4e7bca136cefe9;Path=/;HttpOnly;Secure;Domain=mgmt.weu.sqlva.security.azure.com + - ARRAffinitySameSite=dde7293a6aad00db58800ee68945263f3c56235c3ff8f6c8af4e7bca136cefe9;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.weu.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/westeurope/0f10dc35-8244-4eed-bae6-e4f554115935 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 63CE03A2F0804AEFB3BF3C222417DF91 Ref B: SN4AA2022301021 Ref C: 2026-06-03T09:26:50Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql results show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --scan-id --rule-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fggoldshtein%2Fproviders%2FMicrosoft.HybridCompute%2Fmachines%2FgalLaptop%2FsqlServers%2FSQLEXPRESS%2Fdatabases%2Fmaster/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest/scanResults/VA1018?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1018","name":"VA1018","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1018","status":"Finding","isTrimmed":false,"queryResults":[["True"]],"remediation":{"description":"Install + the latest SQL Server CU corresponding to your version of SQL Server. Go to + https://technet.microsoft.com/en-us/sqlserver/ff803383.aspx to find and download + the required CU.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1018","severity":"High","category":"InstallationUpdatesAndPatches","ruleType":"Binary","title":"Latest + updates should be installed","description":"Microsoft periodically releases + Cumulative Updates (CUs) for each version of SQL Server. This rule checks + whether the latest CU has been installed for the particular version of SQL + Server being used.","rationale":"Running with the latest Cumulative Updates + (CU) for any particular version of SQL Server is important as these CU are + a collection of all available patches up-to-date, including all known security + fixes. Microsoft officially recommends ongoing, proactive installation of + SQL Server CUs as they become available.","queryCheck":{"query":"SELECT CASE\n WHEN + Serverproperty(''ProductVersion'') >= ''16.0.4065.3'' THEN 0\n ELSE + 1\n END AS [Violation]","expectedResult":[["0"]],"columnNames":["Violation"]},"benchmarkReferences":[{"benchmark":"CIS","reference":"v1.0.0-08-11-2017:1.1"},{"benchmark":"FedRAMP","reference":null}]}}}' + headers: + cache-control: + - no-cache + content-length: + - '1813' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:26:55 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=16d4f14a4e0144dd9c1e6857fec0f8a8cca3b8d3ad08369455a1bbfee6885e95;Path=/;HttpOnly;Secure;Domain=mgmt.weu.sqlva.security.azure.com + - ARRAffinitySameSite=16d4f14a4e0144dd9c1e6857fec0f8a8cca3b8d3ad08369455a1bbfee6885e95;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.weu.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/westeurope/b658455a-fe08-4d41-8a22-3d1379a95450 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 1A80417CEFFB41608EB6BC30C6405025 Ref B: SN4AA2022302035 Ref C: 2026-06-03T09:26:55Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql results show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --scan-id --scan-result-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fggoldshtein%2Fproviders%2FMicrosoft.HybridCompute%2Fmachines%2FgalLaptop%2FsqlServers%2FSQLEXPRESS%2Fdatabases%2Fmaster/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest/scanResults/VA1018?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1018","name":"VA1018","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1018","status":"Finding","isTrimmed":false,"queryResults":[["True"]],"remediation":{"description":"Install + the latest SQL Server CU corresponding to your version of SQL Server. Go to + https://technet.microsoft.com/en-us/sqlserver/ff803383.aspx to find and download + the required CU.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1018","severity":"High","category":"InstallationUpdatesAndPatches","ruleType":"Binary","title":"Latest + updates should be installed","description":"Microsoft periodically releases + Cumulative Updates (CUs) for each version of SQL Server. This rule checks + whether the latest CU has been installed for the particular version of SQL + Server being used.","rationale":"Running with the latest Cumulative Updates + (CU) for any particular version of SQL Server is important as these CU are + a collection of all available patches up-to-date, including all known security + fixes. Microsoft officially recommends ongoing, proactive installation of + SQL Server CUs as they become available.","queryCheck":{"query":"SELECT CASE\n WHEN + Serverproperty(''ProductVersion'') >= ''16.0.4065.3'' THEN 0\n ELSE + 1\n END AS [Violation]","expectedResult":[["0"]],"columnNames":["Violation"]},"benchmarkReferences":[{"benchmark":"CIS","reference":"v1.0.0-08-11-2017:1.1"},{"benchmark":"FedRAMP","reference":null}]}}}' + headers: + cache-control: + - no-cache + content-length: + - '1813' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:26:59 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=53d7102ba7b7aa493cd3de5970e95651c20119e6b0c1ed18814931e0ad33bdcb;Path=/;HttpOnly;Secure;Domain=mgmt.weu.sqlva.security.azure.com + - ARRAffinitySameSite=53d7102ba7b7aa493cd3de5970e95651c20119e6b0c1ed18814931e0ad33bdcb;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.weu.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/westeurope/1333dc23-4b63-4758-aef5-4018ff01299e + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 777C081B17FE484A8C45007283059710 Ref B: SN4AA2022303047 Ref C: 2026-06-03T09:26:58Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"latestScan": true}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql baseline create + Connection: + - keep-alive + Content-Length: + - '20' + Content-Type: + - application/json + ParameterSetName: + - --resource-id --rule-id --latest-scan + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fggoldshtein%2Fproviders%2FMicrosoft.HybridCompute%2Fmachines%2FgalLaptop%2FsqlServers%2FSQLEXPRESS%2Fdatabases%2Fmaster/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1018?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1018","name":"VA1018","type":"Microsoft.Security/sqlVulnerabilityAssessments/baselineRules","properties":{"results":[["True"]]}}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:27:02 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=dde7293a6aad00db58800ee68945263f3c56235c3ff8f6c8af4e7bca136cefe9;Path=/;HttpOnly;Secure;Domain=mgmt.weu.sqlva.security.azure.com + - ARRAffinitySameSite=dde7293a6aad00db58800ee68945263f3c56235c3ff8f6c8af4e7bca136cefe9;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.weu.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/westeurope/c05f0180-5c93-4fee-b12f-ce516177d843 + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: FC719EA9CF7A4DFAAADF6AA93B3744E6 Ref B: SN4AA2022304045 Ref C: 2026-06-03T09:27:01Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql baseline show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --rule-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fggoldshtein%2Fproviders%2FMicrosoft.HybridCompute%2Fmachines%2FgalLaptop%2FsqlServers%2FSQLEXPRESS%2Fdatabases%2Fmaster/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1018?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1018","name":"VA1018","type":"Microsoft.Security/sqlVulnerabilityAssessments/baselineRules","properties":{"results":[["True"]]}}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:27:04 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=16d4f14a4e0144dd9c1e6857fec0f8a8cca3b8d3ad08369455a1bbfee6885e95;Path=/;HttpOnly;Secure;Domain=mgmt.weu.sqlva.security.azure.com + - ARRAffinitySameSite=16d4f14a4e0144dd9c1e6857fec0f8a8cca3b8d3ad08369455a1bbfee6885e95;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.weu.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/westeurope/d24f36ae-6ebc-475c-99db-9a8f6fa81f79 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 71E3080B0D364F6A9597FFC085260538 Ref B: SN4AA2022303017 Ref C: 2026-06-03T09:27:04Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql baseline delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-id --rule-id --yes + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: DELETE + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fggoldshtein%2Fproviders%2FMicrosoft.HybridCompute%2Fmachines%2FgalLaptop%2FsqlServers%2FSQLEXPRESS%2Fdatabases%2Fmaster/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1018?api-version=2026-04-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 03 Jun 2026 09:27:08 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=dde7293a6aad00db58800ee68945263f3c56235c3ff8f6c8af4e7bca136cefe9;Path=/;HttpOnly;Secure;Domain=mgmt.weu.sqlva.security.azure.com + - ARRAffinitySameSite=dde7293a6aad00db58800ee68945263f3c56235c3ff8f6c8af4e7bca136cefe9;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.weu.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/westeurope/f14e26c9-72a5-422e-9a1e-c4e78354600a + x-ms-ratelimit-remaining-subscription-deletes: + - '799' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '11999' + x-msedge-ref: + - 'Ref A: 063C8A901589468682C3FA77B572ED04 Ref B: SN4AA2022305039 Ref C: 2026-06-03T09:27:07Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql baseline show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --rule-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fggoldshtein%2Fproviders%2FMicrosoft.HybridCompute%2Fmachines%2FgalLaptop%2FsqlServers%2FSQLEXPRESS%2Fdatabases%2Fmaster/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1018?api-version=2026-04-01-preview + response: + body: + string: '{"code":"NoRuleBaseline","message":"Baseline for rule Id ''VA1018'' + was not found for the latest available scan"}' + headers: + cache-control: + - no-cache + content-length: + - '111' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:27:11 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=53d7102ba7b7aa493cd3de5970e95651c20119e6b0c1ed18814931e0ad33bdcb;Path=/;HttpOnly;Secure;Domain=mgmt.weu.sqlva.security.azure.com + - ARRAffinitySameSite=53d7102ba7b7aa493cd3de5970e95651c20119e6b0c1ed18814931e0ad33bdcb;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.weu.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/westeurope/8689244b-3e72-4c8f-9f47-a80f85966aa0 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: CB1F7D198A09451D89AE3E4212C6B770 Ref B: SN4AA2022304025 Ref C: 2026-06-03T09:27:11Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - security va sql results show + Connection: + - keep-alive + ParameterSetName: + - --resource-id --scan-id --rule-id + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/%2Fsubscriptions%2F00000000-0000-0000-0000-000000000000%2FresourceGroups%2Fggoldshtein%2Fproviders%2FMicrosoft.HybridCompute%2Fmachines%2FgalLaptop%2FsqlServers%2FSQLEXPRESS%2Fdatabases%2Fmaster/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/latest/scanResults/VA1018?api-version=2026-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ggoldshtein/providers/Microsoft.HybridCompute/machines/galLaptop/sqlServers/SQLEXPRESS/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/a9f98e23-7917-405f-adbe-c0a82bafd337/scanResults/VA1018","name":"VA1018","type":"Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults","properties":{"ruleId":"VA1018","status":"Finding","isTrimmed":false,"queryResults":[["True"]],"remediation":{"description":"Install + the latest SQL Server CU corresponding to your version of SQL Server. Go to + https://technet.microsoft.com/en-us/sqlserver/ff803383.aspx to find and download + the required CU.","scripts":[],"automated":false,"portalLink":""},"baselineAdjustedResult":null,"ruleMetadata":{"ruleId":"VA1018","severity":"High","category":"InstallationUpdatesAndPatches","ruleType":"Binary","title":"Latest + updates should be installed","description":"Microsoft periodically releases + Cumulative Updates (CUs) for each version of SQL Server. This rule checks + whether the latest CU has been installed for the particular version of SQL + Server being used.","rationale":"Running with the latest Cumulative Updates + (CU) for any particular version of SQL Server is important as these CU are + a collection of all available patches up-to-date, including all known security + fixes. Microsoft officially recommends ongoing, proactive installation of + SQL Server CUs as they become available.","queryCheck":{"query":"SELECT CASE\n WHEN + Serverproperty(''ProductVersion'') >= ''16.0.4065.3'' THEN 0\n ELSE + 1\n END AS [Violation]","expectedResult":[["0"]],"columnNames":["Violation"]},"benchmarkReferences":[{"benchmark":"CIS","reference":"v1.0.0-08-11-2017:1.1"},{"benchmark":"FedRAMP","reference":null}]}}}' + headers: + cache-control: + - no-cache + content-length: + - '1813' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 03 Jun 2026 09:27:16 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - ARRAffinity=53d7102ba7b7aa493cd3de5970e95651c20119e6b0c1ed18814931e0ad33bdcb;Path=/;HttpOnly;Secure;Domain=mgmt.weu.sqlva.security.azure.com + - ARRAffinitySameSite=53d7102ba7b7aa493cd3de5970e95651c20119e6b0c1ed18814931e0ad33bdcb;Path=/;HttpOnly;SameSite=None;Secure;Domain=mgmt.weu.sqlva.security.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=55210075-c637-4a28-8fac-6606d186eebc/westeurope/ea9bfccb-30a8-45b3-adc7-74cca6066886 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 9EC7B366A5EB4362B07FA22BE55EC2B4 Ref B: SN4AA2022304025 Ref C: 2026-06-03T09:27:16Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/security/tests/latest/test_security_va_sql_scenario.py b/src/azure-cli/azure/cli/command_modules/security/tests/latest/test_security_va_sql_scenario.py index abfcbf79a15..e7d1ecdad70 100644 --- a/src/azure-cli/azure/cli/command_modules/security/tests/latest/test_security_va_sql_scenario.py +++ b/src/azure-cli/azure/cli/command_modules/security/tests/latest/test_security_va_sql_scenario.py @@ -398,6 +398,175 @@ def test_security_va_sql_paas_dbname_form(self, resource_group): # ---- Cleanup: disable VA on the server ------------------------------------- self.cmd('security va sql delete --resource-id {srv_id} --yes') + @AllowLargeResponse(size_kb=4096) + def test_security_va_sql_arc_lifecycle(self): + """Arc-enabled SQL path (IaaS-flavor) against a *pre-existing* resource. + + Arc-enabled SQL Server uses a different resource hierarchy than Azure SQL + PaaS but the same Microsoft.Security extension routes apply:: + + srv_id = /subscriptions/.../Microsoft.HybridCompute/machines/{arc}/sqlServers/{srv} + db_id = {srv_id}/databases/{db} + + On Arc, **the following commands are NOT supported** by the RP and return + 404 -- so they are deliberately excluded from this test: + + * ``security va sql {create,show,update,delete}`` -- settings singleton + * ``security va sql scans initiate-scan`` -- scans are + auto-scheduled by + the Arc SQL agent + (MicrosoftDefenderForSQL + extension) + * ``security va sql scans scan-operation-result show`` -- no on-demand + scan to poll + + Read-only and baseline mutation flows ARE supported. This test + therefore exercises: + + * scans (show via ``--scan-id latest`` + list) + * results (list + show via both --rule-id and --scan-result-id) + * baseline (create + show + delete on a *single* rule that is NOT + already baselined, so we never touch the user's existing baselines) + + Setup: this test targets a fixed real resource (the agent must be + installed and reporting scans). We do NOT use ``ResourceGroupPreparer`` + -- the RG is pre-existing and we never create or delete any Arc/SQL + infra. The only mutation is creating then deleting one baseline entry. + + Re-recording: requires ``az account set --subscription + cca24ec8-99b5-4aa7-9ff6-486e886f304c`` and the galLaptop Arc SQL agent + to be reporting at least one completed scan. After recording, anonymize + the subscription id in the cassette (see paas_lifecycle for the + recipe). + """ + # Use ``self.get_subscription_id()`` rather than hardcoding the real + # subscription id: during live recording it returns the currently + # active subscription (the user must ``az account set --subscription + # cca24ec8-99b5-4aa7-9ff6-486e886f304c`` first), and during replay it + # returns the testsdk's mock subscription (matching the anonymized + # cassette). Hardcoding the real sub would break replay because the + # cassette URLs are anonymized. + srv_id = ( + '/subscriptions/{0}' + '/resourceGroups/ggoldshtein' + '/providers/Microsoft.HybridCompute/machines/galLaptop' + '/sqlServers/SQLEXPRESS' + ).format(self.get_subscription_id()) + self.kwargs.update({ + 'srv_id': srv_id, + 'db_id': srv_id + '/databases/master', + }) + + # ---- Step 1: scans show --scan-id latest ----------------------------------- + scan = self.cmd( + 'security va sql scans show --resource-id {db_id} --scan-id latest' + ).get_output_in_json() + assert scan.get('name'), 'Arc scans show should return a scan record with a name' + assert scan.get('properties', {}).get('totalRulesCount', 0) >= 1, \ + 'Arc scan record should report at least one rule' + self.kwargs['scan_id'] = scan['name'] + + # ---- Step 2: scans list ---------------------------------------------------- + scans = self.cmd( + 'security va sql scans list --resource-id {db_id}' + ).get_output_in_json() + assert isinstance(scans, list) and len(scans) >= 1, \ + 'Arc scans list should include at least the latest scan' + + # ---- Step 3: snapshot pre-existing baselines (so we can avoid them) ------- + # NOTE: the service returns a 404 ``NoBaseline`` when zero baselines + # exist on the DB (instead of an empty list). The aaz codegen surfaces + # that as ``ResourceNotFoundError``. We treat it as "empty set" here. + try: + existing_baselines = self.cmd( + 'security va sql baseline list --resource-id {db_id}' + ).get_output_in_json() + except Exception as ex: # pylint: disable=broad-except + if 'NoBaseline' in str(ex) or 'No baseline have been found' in str(ex): + existing_baselines = [] + else: + raise + if not isinstance(existing_baselines, list): + existing_baselines = [] + existing_rule_ids = {b['name'] for b in existing_baselines if 'name' in b} + + # ---- Step 4: results list -------------------------------------------------- + results = self.cmd( + 'security va sql results list --resource-id {db_id} --scan-id latest' + ).get_output_in_json() + assert isinstance(results, list) and len(results) >= 1, \ + 'Arc results list should return entries for the latest scan' + # Pick the first rule that: + # 1. Has status == 'Finding' (NonFinding/Failed rules have empty + # queryResults; the service returns 400 ``EmptyBaseline`` when you + # try to create a baseline from --latest-scan on such a rule), AND + # 2. Does NOT already have a baseline on this machine -- this + # guarantees the baseline-create/delete pair is a round-trip and + # we never overwrite the user's real baselines. + candidate = next( + (r for r in results + if r.get('name') + and r.get('properties', {}).get('status') == 'Finding' + and r['name'] not in existing_rule_ids), + None, + ) + assert candidate is not None, \ + ('Could not find a scan rule with status="Finding" that is not ' + 'already baselined; the test DB has no baselineable rules') + rule_id = candidate['name'] + self.kwargs['rule_id'] = rule_id + + # ---- Step 5: results show via --rule-id (preferred alias) ----------------- + self.cmd( + 'security va sql results show --resource-id {db_id} ' + '--scan-id latest --rule-id {rule_id}', + checks=[JMESPathCheck('properties.ruleMetadata.ruleId', rule_id)], + ) + + # ---- Step 6: results show via --scan-result-id (legacy alias) ------------- + self.cmd( + 'security va sql results show --resource-id {db_id} ' + '--scan-id latest --scan-result-id {rule_id}', + checks=[JMESPathCheck('properties.ruleMetadata.ruleId', rule_id)], + ) + + # ---- Step 7: baseline create (single rule, from latest scan) -------------- + # Using --latest-scan instead of --results avoids guessing the rule's + # expected-results schema and keeps the test recording stable. + self.cmd( + 'security va sql baseline create --resource-id {db_id} ' + '--rule-id {rule_id} --latest-scan true', + checks=[JMESPathCheck('name', rule_id)], + ) + + # ---- Step 8: baseline show (verify created) ------------------------------- + self.cmd( + 'security va sql baseline show --resource-id {db_id} --rule-id {rule_id}', + checks=[JMESPathCheck('name', rule_id)], + ) + + # ---- Step 9: baseline delete (CLEANUP -- restore the user's prior state) -- + self.cmd( + 'security va sql baseline delete --resource-id {db_id} ' + '--rule-id {rule_id} --yes' + ) + + # ---- Step 10: baseline show after delete -- should 404 -------------------- + self.cmd( + 'security va sql baseline show --resource-id {db_id} --rule-id {rule_id}', + expect_failure=True, + ) + + # ---- Step 11: results show after baseline removed ------------------------- + # The same scan results call still returns 200 (the underlying scan data + # is unchanged); just verifies the read path is independent of baseline + # state. + self.cmd( + 'security va sql results show --resource-id {db_id} ' + '--scan-id latest --rule-id {rule_id}', + checks=[JMESPathCheck('properties.ruleMetadata.ruleId', rule_id)], + ) + def test_security_va_sql_negative(self): """Negative-path coverage that doesn't need any cloud resources. From 5d02a49d3710f97f255d6dd3a60b4354102443ee Mon Sep 17 00:00:00 2001 From: GalGoldi72 Date: Wed, 3 Jun 2026 13:37:35 +0300 Subject: [PATCH 6/7] [Security] custom.py: silence pre-existing line-too-long Twelve long lines in adaptive application controls and automation handlers (lines 597, 861, 866, 870, 875, 886, 906, 919, 934, 941, 943, 977) pre-date this PR and are unrelated to the VA SQL migration. They were not flagged before because the prior pylint disables lived inside the now-removed VA SQL helpers. Add a file-scope disable to unblock azdev-style without touching unrelated functions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/azure-cli/azure/cli/command_modules/security/custom.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/azure-cli/azure/cli/command_modules/security/custom.py b/src/azure-cli/azure/cli/command_modules/security/custom.py index 192512e126a..603ee97768c 100644 --- a/src/azure-cli/azure/cli/command_modules/security/custom.py +++ b/src/azure-cli/azure/cli/command_modules/security/custom.py @@ -6,6 +6,8 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long + from azure.mgmt.security.models import (AutoProvisioningSetting, SecurityAssessment, SecurityAssessmentMetadata, From 0ca6dcbba9c92b92eb9390676c95f4e83ad24073 Mon Sep 17 00:00:00 2001 From: GalGoldi72 Date: Wed, 3 Jun 2026 13:41:58 +0300 Subject: [PATCH 7/7] [Security] va sql baseline create: fix invalid JSON in --results example Replace bare identifiers in the --results example with proper JSON (quoted strings) so users can copy/paste the example and have it parse as AAZDictArg / AAZListArg input. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../security/aaz/latest/security/va/sql/baseline/_create.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_create.py b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_create.py index 124dce5e51a..ef2168f2861 100644 --- a/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_create.py +++ b/src/azure-cli/azure/cli/command_modules/security/aaz/latest/security/va/sql/baseline/_create.py @@ -23,7 +23,7 @@ class Create(AAZCommand): az security va sql baseline create --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{server}/databases/{db} --rule-id VA1234 --latest-scan true :example: Create a baseline for a single rule on an Arc-enabled SQL server with explicit results. - az security va sql baseline create --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.HybridCompute/machines/{arc} --database-name MyDb --rule-id VA1234 --results "[[col1,col2,col3],[col4,col5,col6]]" + az security va sql baseline create --resource-id /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.HybridCompute/machines/{arc} --database-name MyDb --rule-id VA1234 --results '[["col1","col2","col3"],["col4","col5","col6"]]' """ _aaz_info = {