Skip to content

SLK-133892/azure-plugins-draft-1 - #2205

Open
Hamza-Aziz61 wants to merge 5 commits into
aquasecurity:masterfrom
Hamza-Aziz61:SLK-133892/azure-plugins-draft-1
Open

SLK-133892/azure-plugins-draft-1#2205
Hamza-Aziz61 wants to merge 5 commits into
aquasecurity:masterfrom
Hamza-Aziz61:SLK-133892/azure-plugins-draft-1

Conversation

@Hamza-Aziz61

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread helpers/azure/api.js
users: {
list: {
url: 'https://graph.microsoft.com/v1.0/users',
url: 'https://graph.microsoft.com/v1.0/users?$select=id,displayName,userPrincipalName,mail,userType,accountEnabled',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Did you test the existing plugin after this change?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ensure No Guest User

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, I tested both the existing plugins and the new one

Comment thread helpers/azure/api.js
users: {
list: {
url: 'https://graph.microsoft.com/v1.0/users',
url: 'https://graph.microsoft.com/v1.0/users?$select=id,displayName,userPrincipalName,mail,userType,accountEnabled',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ensure No Guest User

Comment thread plugins/azure/databricks/workspacePublicAccess.js Outdated
description: 'Ensures that Azure Databricks Workspace has public network access disabled.',
more_info: 'Disabling public network access ensures that the Databricks workspace is not reachable over the public internet and can only be accessed through private endpoints within trusted networks. This reduces the attack surface and the risk of unauthorized access.',
recommended_action: 'Modify Databricks workspace networking settings and set Allow Public Network Access to Disabled.',
link: 'https://learn.microsoft.com/en-us/azure/databricks/security/network/front-end/front-end-private-connect',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

your endpoint is more about enableNoPublicIp which is different from Public Access which we are targeting in this plugin, so i dont think we should change it

Comment thread plugins/azure/entraid/subscriptionOwnerCount.js Outdated
name: 'Subscription Owners Minimum',
description: 'Return a failing result when the number of subscription owners is below this value',
regex: '^[1-9]{1}[0-9]{0,3}$',
default: 2

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
default: 2
default: 1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the minimum number should be 1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

but CIS explicitly states that "5.7 Ensure there are between 2 and 3 Subscription Owners", so I don't think we should change it but I can if you say so

category: 'Storage Accounts',
domain: 'Storage',
severity: 'Medium',
description: 'Ensures that SMB file shares are configured to only allow AES-256-GCM or higher for SMB channel encryption.',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

how do we know which encryptions are higher?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

CIS says "9.1.3 Ensure 'SMB channel encryption' is Set to 'AES-256-GCM' or Higher for SMB file shares" , but the max encryption is AES-256-GCM nothing higher is available CIS basically future proofed the title and i used same wording, should i change it to only AES-256-GCM?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lets add/maintain the array for now for encryption and in future if there is a higher encryption we can add it in the same array

const encryptionList = channelEncryption ?
channelEncryption.split(';').map(algorithm => algorithm.trim()).filter(algorithm => algorithm) : [];

if (encryptionList.length && encryptionList.every(algorithm => algorithm.toUpperCase() === 'AES-256-GCM')) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this will only pass if the encryption channel is this, not higher?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

as there is no higher encryption i hardcoded AES-256-GCM, we don't know the name of higher encryption that will be released so we will have to update the plugin when it is released

category: 'Storage Accounts',
domain: 'Storage',
severity: 'Medium',
description: 'Ensures that SMB file shares are configured to only allow SMB 3.1.1 or higher.',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same concern how do we check higher

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

same as above 3.1.1 is the highest version in azure we don't know what higher version will look like so i hardcoded it, i can change the description if you like


if (!skuName) {
helpers.addResult(results, 3,
'Unable to determine Storage Account redundancy setting',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

sku tells us the storage account redundancy settings? i think it tells us about the tier of storage account

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sku.tier tells the tier but this plugin is reading sku.name which gives redundancy settings

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

how will sku.name will give us redundancy setting?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is from official azure doc it gives what we want
image

const helpers = require('../../../helpers/azure');

module.exports = {
title: 'Storage Account Entra ID Authorization Default',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is this different than Storage Accounts Entra ID Enabled?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes this plugin Storage Accounts Entra ID Enabled reads enableAzureFilesAadIntegration that is about mounting Azure Files (SMB) using AD/Entra Domain Services but the pr plugin reads defaultToOAuthAuthentication to check whether the Azure Portal UI defaults to Entra ID

Hamza-Aziz61 and others added 3 commits September 1, 2026 13:05
Co-authored-by: Meerab-Shafique <meerab.shafique.ext@aquasec.com>
Co-authored-by: Meerab-Shafique <meerab.shafique.ext@aquasec.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants