Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions collectors/azure/collector.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,12 @@ let collect = function(AzureConfig, settings, callback) {
return accumulator;
}, {});

settings.previousCollection = Object.keys(settings.previousCollection).reduce((accumulator, key) => {
accumulator[key.toLowerCase()] = settings.previousCollection[key];
return accumulator;
}, {});
if (settings.previousCollection) {
settings.previousCollection = Object.keys(settings.previousCollection).reduce((accumulator, key) => {
accumulator[key.toLowerCase()] = settings.previousCollection[key];
return accumulator;
}, {});
}

if (collect[service.toLowerCase()] &&
Object.keys(collect[service.toLowerCase()]) &&
Expand Down
191 changes: 120 additions & 71 deletions helpers/aws/api.js

Large diffs are not rendered by default.

22 changes: 12 additions & 10 deletions helpers/aws/api_multipart.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var calls = [
property: 'collectionSummaries'
},
listNetworkSecurityPolicies: {
override: true,
override: true,
},
listEncryptionSecurityPolicies:{
override: true,
Expand Down Expand Up @@ -128,7 +128,7 @@ var calls = [
paginate: 'NextToken',
},
getModelInvocationLoggingConfiguration: {
property: 'loggingConfig',
property: 'loggingConfig',
paginate: 'NextToken'
}
},
Expand Down Expand Up @@ -169,7 +169,10 @@ var calls = [
},
CloudTrail: {
describeTrails: {
property: 'trailList'
property: 'trailList',
params: {
includeShadowTrails: false
}
}
},
CloudWatch: {
Expand Down Expand Up @@ -397,7 +400,6 @@ var calls = [
Values: [
'pending',
'running',
'shutting-down',
'stopping',
'stopped'
]
Expand Down Expand Up @@ -1328,17 +1330,17 @@ var postcalls = [
getRdsMetricStatistics: {
reliesOnService: 'rds',
reliesOnCall: 'describeDBInstances',
override: true,
override: true,
},
getRdsWriteIOPSMetricStatistics: {
reliesOnService: 'rds',
reliesOnCall: 'describeDBInstances',
override: true,
override: true,
},
getRdsReadIOPSMetricStatistics: {
reliesOnService: 'rds',
reliesOnCall: 'describeDBInstances',
override: true,
override: true,
}
},
ConfigService: {
Expand Down Expand Up @@ -2357,12 +2359,12 @@ var postcalls = [
getNetworkSecurityPolicy: {
reliesOnService: 'opensearchserverless',
reliesOnCall: 'listNetworkSecurityPolicies',
override: true,
override: true,
},
getEncryptionSecurityPolicy: {
reliesOnService: 'opensearchserverless',
reliesOnCall: 'listEncryptionSecurityPolicies',
override: true,
override: true,
}
}
},
Expand All @@ -2373,4 +2375,4 @@ module.exports = {
callsMultipart: calls,
postcallsMultipart: postcalls,
integrationSendLast: integrationSendLast
};
};
2 changes: 2 additions & 0 deletions helpers/azure/locations.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ var locations = [
'canadaeast', // (Canada) Canada East
'qatarcentral', // (Middle East) Qatar
'polandcentral', // (Europe) Poland Central
'italynorth', // (Europe) Italy North
'israelcentral', // (Middle East) Israel Central
];

module.exports = {
Expand Down
3 changes: 2 additions & 1 deletion helpers/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ var processIntegration = function(serviceName, settings, collection, calls, post
if (settings.govcloud) {
localEvent.awsOrGov = 'aws-us-gov';
}


localEvent.scanTriggeredFromEventsFlow = settings.scanTriggeredFromEventsFlow;
localEvent.collection = {};
localEvent.previousCollection = {};

Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/bedrock/customModelEncryptionEnabled.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Custom Model Encryption Enabled',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Machine Learning',
description: 'Ensure that an Amazon Bedrock custom models are encrypted with desired encryption level.',
more_info: 'When you encrypt AWS Bedrock custom model using your own AWS Customer Managed Keys (CMKs) for enhanced protection, you have full control over who can use the encryption keys to access your custom model.',
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/bedrock/customModelInVpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Custom Model In VPC',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Machine Learning',
description: 'Ensure that an Amazon Bedrock custom model is configured with a VPC.',
more_info: 'When the custom model is configured within a VPC, it establishes a secure environment that prevents unauthorized internet access to your training data, enhancing the overall security and confidentiality of your model.',
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/bedrock/modelInvocationLoggingEnabled.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Bedrock Model Invocation Logging Enabled',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Machine Learning',
description: 'Ensure that Amazon Bedrock model invocation logging is enabled.',
more_info: 'With invocation logging enabled, you can collect the full request data, response data, and metadata associated with all calls performed in account. This detailed logging provides valuable insights into model usage patterns, helps in troubleshooting, and enhances security by allowing for thorough analysis of model interactions. It also facilitates compliance with auditing requirements, offering a comprehensive record of model invocations.',
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/bedrock/privateCustomModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Private Custom Model',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Machine Learning',
description: 'Ensure that an Amazon Bedrock custom model is configured within a private VPC.',
more_info: 'When the custom model is configured within a private VPC or with a private VPC endpoint, it enhances security by restricting access to authorized networks only, preventing exposure to the public internet.',
Expand Down
4 changes: 2 additions & 2 deletions plugins/aws/cloudtrail/cloudtrailEncryption.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = {
helpers.addResult(results, 2, 'CloudTrail is not enabled', region);
} else if (describeTrails.data[0]) {
for (var t in describeTrails.data) {
if (describeTrails.data[t].S3BucketName == helpers.CLOUDSPLOIT_EVENTS_BUCKET) continue;
if (describeTrails.data[t].S3BucketName == helpers.CLOUDSPLOIT_EVENTS_BUCKET || (describeTrails.data[t].HomeRegion && describeTrails.data[t].HomeRegion.toLowerCase() !== region)) continue;
if (!describeTrails.data[t].KmsKeyId) {
helpers.addResult(results, 2, 'CloudTrail encryption is not enabled',
region, describeTrails.data[t].TrailARN);
Expand Down Expand Up @@ -122,4 +122,4 @@ module.exports = {
return callback(null, action);
});
}
};
};
4 changes: 2 additions & 2 deletions plugins/aws/cloudtrail/cloudtrailToCloudwatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = {
helpers.addResult(results, 2, 'CloudTrail is not enabled', region);
} else if (describeTrails.data[0]) {
for (var t in describeTrails.data) {
if (describeTrails.data[t].S3BucketName == helpers.CLOUDSPLOIT_EVENTS_BUCKET) continue;
if (describeTrails.data[t].S3BucketName == helpers.CLOUDSPLOIT_EVENTS_BUCKET || (describeTrails.data[t].HomeRegion && describeTrails.data[t].HomeRegion.toLowerCase() !== region)) continue;
if (!describeTrails.data[t].CloudWatchLogsLogGroupArn) {
helpers.addResult(results, 2, 'CloudTrail CloudWatch integration is not enabled',
region, describeTrails.data[t].TrailARN);
Expand All @@ -53,4 +53,4 @@ module.exports = {
callback(null, results, source);
});
}
};
};
2 changes: 1 addition & 1 deletion plugins/aws/comprehend/outputResultEncryption.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Amazon Comprehend Output Result Encryption',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Compute',
description: 'Ensures the Comprehend service is using encryption for all result output.',
more_info: 'Comprehend supports using KMS keys to result output, which should be enabled.',
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/comprehend/volumeEncryption.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Amazon Comprehend Volume Encryption',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Compute',
description: 'Ensures the Comprehend service is using encryption for all volumes storing data at rest.',
more_info: 'Comprehend supports using KMS keys to encrypt data at rest, which should be enabled.',
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/devopsguru/devOpsGuruNotificationEnabled.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'DevOps Guru Notifications Enabled',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Availability',
description: 'Ensures SNS topic is set up for Amazon DevOps Guru.',
more_info: 'Amazon DevOps Guru uses an SNS topic to notify you about important DevOps Guru events.',
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/forecast/datasetExportEncrypted.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Forecast Dataset Export Encrypted',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Content Delivery',
description: 'Ensure that AWS Forecast exports have encryption enabled before they are being saved on S3.',
more_info: 'In AWS Forecast, you can save forecast reports on S3 in CSV format. Make sure to encrypt these export before writing them to the bucket in order to follow your organizations\'s security and compliance requirements.',
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/forecast/forecastDatasetEncrypted.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Forecast Dataset Encrypted',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Content Delivery',
description: 'Ensure that AWS Forecast datasets are using desired KMS key for data encryption.',
more_info: 'Datasets contain the data used to train a predictor. You create one or more Amazon Forecast datasets and import your training data into them. ' +
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/frauddetector/fraudDetectorDataEncrypted.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Fraud Detector Data Encrypted',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Application Integration',
description: 'Ensure that Amazon Fraud Detector has encryption enabled for data at rest with desired KMS encryption level.',
more_info: 'Amazon Fraud Detector encrypts your data at rest with AWS-managed KMS key. Use customer-manager KMS keys (CMKs) instead in order to follow your organizations\'s security and compliance requirements.',
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/healthlake/dataStoreEncrypted.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'HealthLake Data Store Encrypted',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Content Delivery',
description: 'Ensure that AWS HealthLake Data Store is using desired encryption level.',
more_info: 'Amazon HealthLake is a Fast Healthcare Interoperability Resources (FHIR)-enabled patient Data Store that uses AWS-managed KMS keys for encryption. ' +
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/kendra/kendraIndexEncrypted.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Kendra Index Encrypted',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Databases',
description: 'Ensure that the Kendra index is encrypted using desired encryption level.',
more_info: 'Amazon Kendra encrypts your data at rest with AWS-manager keys by default. Use customer-managed keys instead in order to gain more granular control over encryption/decryption process.',
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/lex/lexAudioLogsEncrypted.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Audio Logs Encrypted',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Content Delivery',
description: 'Ensure that Amazon Lex audio logs are encrypted using desired KMS encryption level',
more_info: 'For audio logs you use default encryption on your S3 bucket or specify an AWS KMS key to encrypt your audio objects. Even if your S3 bucket uses default encryption you can still specify a different AWS KMS key to encrypt your audio objects for enhanced security.',
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/lookout/anomalyDetectorEncrypted.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'LookoutMetrics Anomaly Detector Encrypted',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Content Delivery',
description: 'Ensure that Amazon LookoutMetrics Anomaly Detector is encrypted using desired KMS encryption level',
more_info: 'Amazon Lookout for Metrics encrypts your data at rest with your choice of an encryption key. If you do not specify an encryption key, your data is encrypted with AWS owned key by default. ' +
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/lookout/equipmentdatasetEncrypted.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'LookoutEquipment Dataset Encrypted',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Content Delivery',
description: 'Ensure that Amazon Lookout for Equipment datasets are encrypted using desired KMS encryption level',
more_info: 'Amazon Lookout for Equipment encrypts your data at rest with AWS owned KMS key by default. ' +
Expand Down
10 changes: 5 additions & 5 deletions plugins/aws/lookout/modelDataEncrypted.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Model Data Encrypted',
category: 'Lookout',
domain: 'ML & AI',
category: 'AI & ML',
domain: 'Management and Governance',
description: 'Ensure that Lookout for Vision model data is encrypted using desired KMS encryption level',
more_info: 'By default, trained models and manifest files are encrypted in Amazon S3 using server-side encryption with KMS keys stored in AWS Key Management Service (SSE-KMS). ' +
'You can also use customer-managed keys instead in order to gain more granular control over encryption/decryption process.',
Expand Down Expand Up @@ -58,7 +58,7 @@ module.exports = {
'Unable to list KMS keys: ' + helpers.addError(listKeys), region);
return rcb();
}

for (let project of listProjects.data){
if (!project.ProjectName) continue;

Expand Down Expand Up @@ -102,7 +102,7 @@ module.exports = {
let keyId = kmsKey.split('/')[1] ? kmsKey.split('/')[1] : kmsKey;

let describeKey = helpers.addSource(cache, source,
['kms', 'describeKey', region, keyId]);
['kms', 'describeKey', region, keyId]);

if (!describeKey || describeKey.err || !describeKey.data || !describeKey.data.KeyMetadata) {
helpers.addResult(results, 3,
Expand Down Expand Up @@ -138,4 +138,4 @@ module.exports = {
callback(null, results, source);
});
}
};
};
2 changes: 1 addition & 1 deletion plugins/aws/s3/bucketVersioning.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,4 @@ module.exports = {
console.log(config, cache, settings, resource);
callback();
}
};
};
2 changes: 1 addition & 1 deletion plugins/aws/s3/versionedBucketsLC.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
recommended_action: 'Configure lifecycle rules for buckets which have versioning enabled',
link: 'https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-set-lifecycle-configuration-intro.html',
apis: ['S3:listBuckets', 'S3:getBucketVersioning', 'S3:getBucketLocation', 'S3:getBucketLifecycleConfiguration'],
realtime_triggers: ['s3:CreateBucket', 's3:PutBucketVersioninng', 's3:putBucketLifecycleConfiguration','s3:DeleteBucket'],
realtime_triggers: ['s3:CreateBucket', 's3:PutBucketVersioning', 's3:putBucketLifecycleConfiguration','s3:DeleteBucket'],

run: function(cache, settings, callback) {
var results = [];
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/sagemaker/notebookDataEncrypted.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Notebook Data Encrypted',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Compute',
description: 'Ensure Notebook data is encrypted',
more_info: 'An optional encryption key can be supplied during Notebook Instance creation.',
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/sagemaker/notebookDirectInternetAccess.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Notebook Direct Internet Access',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Compute',
description: 'Ensure Notebook Instance is not publicly available.',
more_info: 'SageMaker notebooks should not be exposed to the Internet. Public availability can be configured via the DirectInternetAccess attribute.',
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/sagemaker/notebookInstanceInVpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Notebook instance in VPC',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Compute',
description: 'Ensure that Amazon SageMaker Notebook instances are launched within a VPC.',
more_info: 'Launching instances can bring multiple advantages such as better networking infrastructure, much more flexible control over access security. Also it makes it possible to access VPC-only resources such as EFS file systems.',
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/translate/translateJobOutputEncrypted.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Translate Job Output Encrypted',
category: 'ML & AI',
category: 'AI & ML',
domain: 'Compute',
description: 'Ensure that your Amazon Translate jobs have CMK encryption enabled for output data residing on S3.',
more_info: 'Amazon Translate encrypts your output data with AWS-manager keys by default. ' +
Expand Down
4 changes: 2 additions & 2 deletions plugins/azure/appConfigurations/appConfigManagedIdentity.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
var locations = helpers.locations(settings.govcloud);

async.each(locations.appConfigurations, function(location, rcb){
var appConfigurations = helpers.addSource(cache, source,
var appConfigurations = helpers.addSource(cache, source,
['appConfigurations', 'list', location]);

if (!appConfigurations) return rcb();
Expand Down Expand Up @@ -48,4 +48,4 @@ module.exports = {
callback(null, results, source);
});
}
};
};
Loading