Add SQL Vulnerability Assessment commands for Microsoft.Security 2026-04-01-preview#1021
Open
GalGoldi72 wants to merge 3 commits into
Open
Add SQL Vulnerability Assessment commands for Microsoft.Security 2026-04-01-preview#1021GalGoldi72 wants to merge 3 commits into
GalGoldi72 wants to merge 3 commits into
Conversation
…-04-01-preview Adds atomic commands for 'az security va sql' based on TypeSpec PR Azure/azure-rest-api-specs#41888. Commands added: - security va sql {create, delete, show, update} # settings - security va sql baseline {add, create, delete, list, show, update} - security va sql results {list, show} - security va sql scans {initiate-scan, list, show} - security va sql scans scan-operation-result show Single --resource-id argument replaces previous multi-arg combination. All commands tagged Preview. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Open
2 tasks
Adds `rule-id` as a primary option for the scanResultId argument on `az security va sql results show`, with `scan-result-id` kept as a secondary alias. This aligns with the `baseline` commands which use `--rule-id` for the same logical concept and matches Copilot review feedback on Azure/azure-cli#33482. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds atomic
az security va sqlcommands for Microsoft.Security at API version2026-04-01-preview.Companion to the TypeSpec PR Azure/azure-rest-api-specs#41888 (already merged).
Commands added
security va sqlcreate,delete,show,update(SQL VA settings)security va sql baselineadd,create,delete,list,show,updatesecurity va sql resultslist,showsecurity va sql scansinitiate-scan,list,showsecurity va sql scans scan-operation-resultshowDesign
--resource-idargument identifies the assessed resource (was previously a 7-arg combination).--database-namefor server-level scopes (e.g.master).security vaparent group is marked Preview because the only content under it is SQL VA preview.Scopes supported
--database-name)Files
Commands/security/readme.md— addedvasubgroup linkCommands/security/va/— new markdown command docsResources/mgmt-plane/<9 base64 dirs>/2026-04-01-preview.{json,xml}— operation metadataCompanion PR
Azure-CLI side: link will be added once opened.