Skip to content

Conversation

@abdullahaslam306
Copy link
Contributor

No description provided.

domain: 'Compute',
description: 'Ensures that Azure Virtual Machine scale sets with Linux OS has SSH enabled.',
more_info: 'SSH is an encrypted connection protocol that allows secure sign-ins over unsecured connections. SSH is the default connection protocol for Linux VMs hosted in Azure.',
link: 'https://learn.microsoft.com/en-us/azure/virtual-machines/linux/ssh-from-windows',
Copy link
Collaborator

Choose a reason for hiding this comment

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

category: 'Virtual Machine Scale Set',
domain: 'Compute',
description: 'Ensures that Azure Virtual Machine scale sets with Linux OS has SSH enabled.',
more_info: 'SSH is an encrypted connection protocol that allows secure sign-ins over unsecured connections. SSH is the default connection protocol for Linux VMs hosted in Azure.',
Copy link
Collaborator

Choose a reason for hiding this comment

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

write an advantage of using SSH key.

var source = {};
var locations = helpers.locations(settings.govcloud);

async.each(locations.vmScaleSet, function(location, rcb) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have two resources in locations.js vmScaleSet and virtualMachineScaleSets, can you use virtualMachineScaleSets instead making it consistent, and also remove the other from locations file along with its usage

Comment on lines +36 to +39
if ((scaleSet.virtualMachineProfile.storageProfile && scaleSet.virtualMachineProfile.storageProfile.osDisk &&
scaleSet.virtualMachineProfile.storageProfile.osDisk.osType &&
scaleSet.virtualMachineProfile.storageProfile.osDisk.osType.toLowerCase() === 'linux')){

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if ((scaleSet.virtualMachineProfile.storageProfile && scaleSet.virtualMachineProfile.storageProfile.osDisk &&
scaleSet.virtualMachineProfile.storageProfile.osDisk.osType &&
scaleSet.virtualMachineProfile.storageProfile.osDisk.osType.toLowerCase() === 'linux')){
if (scaleSet.virtualMachineProfile &&
scaleSet.virtualMachineProfile.storageProfile &&
scaleSet.virtualMachineProfile.storageProfile.osDisk &&
scaleSet.virtualMachineProfile.storageProfile.osDisk.osType &&
scaleSet.virtualMachineProfile.storageProfile.osDisk.osType.toLowerCase() === 'linux'){

scaleSet.virtualMachineProfile.osProfile.linuxConfiguration.ssh){
helpers.addResult(results, 0, 'VM scale set for linux has SSH enabled', location, scaleSet.id);
} else {
helpers.addResult(results, 2, 'VM scale set for linux does not have SSH enabled', location, scaleSet.id);
Copy link
Collaborator

Choose a reason for hiding this comment

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

produce the message according to ssh keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants