Skip to content

fix(query): directly covered the cases where vhd_containers is defined on the azurerm_virtual_machine_scale_set_resource#7923

Merged
cx-rui-araujo merged 7 commits into
masterfrom
AST-127837
Jan 27, 2026
Merged

fix(query): directly covered the cases where vhd_containers is defined on the azurerm_virtual_machine_scale_set_resource#7923
cx-rui-araujo merged 7 commits into
masterfrom
AST-127837

Conversation

@cx-ricardo-jesus

@cx-ricardo-jesus cx-ricardo-jesus commented Dec 26, 2025

Copy link
Copy Markdown
Contributor

Closes #

Reason for Proposed Changes

  • Currently, the query "Beta - VM Without Managed Disk" supports the cases when the field vhd_containers is defined inside the storage_profile_os_disk block, but in reality it flags these cases because the field managed_disk_type, which, according to the azurerm_virtual_machine_scale_set Terraform resource documentation the field mentioned before cannot be both defined insidere the resource.
  • NOTE: There is a resource on Terraform, that is azurerm_virtual_machine_data_disk_attachment, which only supports managed disks but can reference a resource of type azurerm_virtual_machine that supports unmanaged disks. The support for this resource type wasn't added because the support for the resource of type azurerm_virtual_machine was already on the query.

Proposed Changes

  • Added a simple case on the helper function get_results that checks if the field vhd_containers is defined inside the storage__profile_os_disk.

I submit this contribution under the Apache-2.0 license.

@cx-ricardo-jesus cx-ricardo-jesus requested a review from a team as a code owner December 26, 2025 10:00
@github-actions github-actions Bot added query New query feature terraform Terraform query labels Dec 26, 2025
@github-actions

Copy link
Copy Markdown
Contributor

kics-logo

KICS version: v2.1.18

Category Results
CRITICAL CRITICAL 0
HIGH HIGH 0
MEDIUM MEDIUM 0
LOW LOW 0
INFO INFO 0
TRACE TRACE 0
TOTAL TOTAL 0
Metric Values
Files scanned placeholder 1
Files parsed placeholder 1
Files failed to scan placeholder 0
Total executed queries placeholder 47
Queries failed to execute placeholder 0
Execution time placeholder 0

@cx-artur-ribeiro cx-artur-ribeiro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cx-rui-araujo cx-rui-araujo merged commit a511b6f into master Jan 27, 2026
30 of 31 checks passed
@cx-rui-araujo cx-rui-araujo deleted the AST-127837 branch January 27, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

query New query feature terraform Terraform query

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants