Azure / Azure/azure-cli

Support Azure SQL Server Vulnerability Assessment Baselines

Open
#16,895 4 comments 4 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad Service Attention SQL
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Is your feature request related to a problem? Please describe.**
After creating an Azure SQL Server and Databases using the Azure CLI, with Vulnerability Assessment enabled, Azure's Security Centre flagged up that no vulnerability assessment baselines had been created (as it's meant to).

I set about trying to create these baselines with Azure CLI, since we use it for all other IaC tasks - but Azure CLI doesn't appear to support anything like Powershell's `Set-AzSqlDatabaseVulnerabilityAssessmentRuleBaseline` - so I had to hack something together with Azure Powershell instead.

**Describe the solution you'd like**
I'd like Azure CLI to have capabilities to work with SQL Server Vulnerability Assessment Baselines. In particular, I'd like to be able to do the same things as these Azure Powershell cmdlets:

```powershell
Clear-AzSqlDatabaseVulnerabilityAssessmentRuleBaseline
Get-AzSqlDatabaseVulnerabilityAssessmentRuleBaseline
Set-AzSqlDatabaseVulnerabilityAssessmentRuleBaseline

Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentRuleBaseline
Get-AzSqlInstanceDatabaseVulnerabilityAssessmentRuleBaseline
Set-AzSqlInstanceDatabaseVulnerabilityAssessmentRuleBaseline
```

**Describe alternatives you've considered**

- Using Azure Powershell instead
- using ARM templates instead (would have been horrible though, considering all the dynamic variables I'd need to stuff into them)

**Additional context**
None

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.