Skip to content

Conversation

@cx-andre-pereira
Copy link
Contributor

@cx-andre-pereira cx-andre-pereira commented Nov 6, 2025

Reason for Proposed Changes

  • Currently there is no query to ensure that resources of type "azurerm_storage_account" set the "shared_access_key_enabled" field to false.

  • Quoting CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0 page 504: "Microsoft Entra ID provides superior security and ease of use compared to Shared Key and is recommended by Microsoft. To require clients to use Microsoft Entra ID for authorizing requests, you can disallow requests to the storage account that are authorized with Shared Key."

Proposed Changes

  • Implemented the missing query.
  • The query will flag any "azurerm_storage_account" resource that does not set the "shared_access_key_enabled" field or sets it to a value that is not false.

I submit this contribution under the Apache-2.0 license.

@github-actions github-actions bot added feature New feature query New query feature labels Nov 6, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

kics-logo

KICS version: v2.1.17

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

@github-actions github-actions bot added terraform Terraform query azure PR related with Azure Cloud labels Nov 7, 2025
@cx-andre-pereira cx-andre-pereira marked this pull request as ready for review November 7, 2025 11:25
@cx-andre-pereira cx-andre-pereira requested a review from a team as a code owner November 7, 2025 11:25
Copy link
Contributor

@cx-eduardo-semanas cx-eduardo-semanas left a comment

Choose a reason for hiding this comment

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

LGTM

…_account_key_access_for_azure_storage_accounts_is_disabled
Copy link
Contributor

@cx-eduardo-semanas cx-eduardo-semanas left a comment

Choose a reason for hiding this comment

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

LGTM

@cx-andre-pereira cx-andre-pereira merged commit f625abb into master Dec 9, 2025
29 checks passed
@cx-andre-pereira cx-andre-pereira deleted the AST-116659_49_9.3.1.3_ensure_allow_storage_account_key_access_for_azure_storage_accounts_is_disabled branch December 9, 2025 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

azure PR related with Azure Cloud feature New feature query New query feature terraform Terraform query

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants