From 4f42e221bf0f862549abed354718de9b7b279674 Mon Sep 17 00:00:00 2001 From: rakhimundhada15 <60738948+rakhimundhada15@users.noreply.github.com> Date: Fri, 30 Aug 2024 13:58:11 +0530 Subject: [PATCH] [ENG-55813]:Update the dependancy for below mentioned collectors (#378) * Bump the collector version * Updated the dependancy and fix the code as per latest document * fix the testcases * Fix the okta code and testcase --- collectors/auth0/package.json | 30 +++--- collectors/carbonblack/package.json | 26 ++--- collectors/ciscoamp/package.json | 26 ++--- collectors/ciscoduo/package.json | 26 ++--- collectors/ciscomeraki/package.json | 26 ++--- collectors/crowdstrike/package.json | 26 ++--- collectors/googlestackdriver/collector.js | 9 +- collectors/googlestackdriver/package.json | 30 +++--- collectors/googlestackdriver/test/test.js | 12 ++- collectors/gsuite/package.json | 30 +++--- collectors/mimecast/package.json | 32 +++--- collectors/o365/o365_collector.js | 15 ++- collectors/o365/package.json | 31 +++--- collectors/okta/okta_collector.js | 8 +- collectors/okta/package.json | 32 +++--- collectors/okta/test/okta_test.js | 117 ++++++++++++++-------- collectors/salesforce/package.json | 30 +++--- collectors/salesforce/test/utils_test.js | 8 +- collectors/salesforce/utils.js | 12 ++- collectors/sentinelone/package.json | 28 +++--- collectors/sophos/package.json | 28 +++--- collectors/sophossiem/package.json | 28 +++--- ps_spec.yml | 30 +++--- 23 files changed, 354 insertions(+), 286 deletions(-) diff --git a/collectors/auth0/package.json b/collectors/auth0/package.json index b91db59b..c8dd9f03 100644 --- a/collectors/auth0/package.json +++ b/collectors/auth0/package.json @@ -1,6 +1,6 @@ { "name": "auth0-collector", - "version": "1.1.56", + "version": "1.1.57", "description": "Alert Logic AWS based Auth0 Log Collector extension", "repository": {}, "private": true, @@ -9,27 +9,27 @@ "test": "JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=text mocha --colors" }, "devDependencies": { - "@aws-sdk/client-cloudformation": "^3.600.0", - "@aws-sdk/client-cloudwatch": "^3.600.0", - "@aws-sdk/client-dynamodb": "^3.602.0", - "@aws-sdk/client-kms": "^3.600.0", - "@aws-sdk/client-lambda": "^3.600.0", - "@aws-sdk/client-s3": "^3.600.0", - "@aws-sdk/client-sqs": "^3.600.0", - "@aws-sdk/client-ssm": "^3.600.0", + "@aws-sdk/client-cloudformation": "^3.632.0", + "@aws-sdk/client-cloudwatch": "^3.632.0", + "@aws-sdk/client-dynamodb": "^3.632.0", + "@aws-sdk/client-kms": "^3.632.0", + "@aws-sdk/client-lambda": "^3.634.0", + "@aws-sdk/client-s3": "^3.633.0", + "@aws-sdk/client-sqs": "^3.632.0", + "@aws-sdk/client-ssm": "^3.632.0", "jshint": "^2.13.6", - "mocha": "^10.4.0", + "mocha": "^10.7.3", "mocha-jenkins-reporter": "^0.4.8", "nyc": "^17.0.0", "rewire": "^7.0.0", "sinon": "18.0.0" }, "dependencies": { - "@alertlogic/al-collector-js": "^3.0.11", - "@alertlogic/paws-collector": "2.2.3", - "async": "^3.2.5", - "auth0": "^3.1.2", - "debug": "^4.3.5", + "@alertlogic/al-collector-js": "^3.0.12", + "@alertlogic/paws-collector": "2.2.5", + "async": "^3.2.6", + "auth0": "^3.7.2", + "debug": "^4.3.6", "moment": "^2.30.1" }, "author": "Alert Logic Inc." diff --git a/collectors/carbonblack/package.json b/collectors/carbonblack/package.json index d353eef5..ebd2e74d 100644 --- a/collectors/carbonblack/package.json +++ b/collectors/carbonblack/package.json @@ -1,6 +1,6 @@ { "name": "carbonblack-collector", - "version": "1.0.54", + "version": "1.0.55", "description": "Alert Logic AWS based Carbonblack Log Collector", "repository": {}, "private": true, @@ -9,26 +9,26 @@ "test": "JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=text mocha --colors" }, "devDependencies": { - "@aws-sdk/client-cloudformation": "^3.600.0", - "@aws-sdk/client-cloudwatch": "^3.600.0", - "@aws-sdk/client-dynamodb": "^3.602.0", - "@aws-sdk/client-kms": "^3.600.0", - "@aws-sdk/client-lambda": "^3.600.0", - "@aws-sdk/client-s3": "^3.600.0", - "@aws-sdk/client-sqs": "^3.600.0", - "@aws-sdk/client-ssm": "^3.600.0", + "@aws-sdk/client-cloudformation": "^3.629.0", + "@aws-sdk/client-cloudwatch": "^3.629.0", + "@aws-sdk/client-dynamodb": "^3.629.0", + "@aws-sdk/client-kms": "^3.629.0", + "@aws-sdk/client-lambda": "^3.629.0", + "@aws-sdk/client-s3": "^3.629.0", + "@aws-sdk/client-sqs": "^3.629.0", + "@aws-sdk/client-ssm": "^3.629.0", "jshint": "^2.13.6", - "mocha": "^10.4.0", + "mocha": "^10.7.3", "mocha-jenkins-reporter": "^0.4.8", "nyc": "^17.0.0", "rewire": "^7.0.0", "sinon": "^18.0.0" }, "dependencies": { - "@alertlogic/al-collector-js": "3.0.11", - "@alertlogic/paws-collector": "2.2.3", + "@alertlogic/al-collector-js": "3.0.12", + "@alertlogic/paws-collector": "2.2.5", "async": "^3.2.5", - "debug": "^4.3.5", + "debug": "^4.3.6", "moment": "2.30.1", "test": "^3.3.0" }, diff --git a/collectors/ciscoamp/package.json b/collectors/ciscoamp/package.json index 242f0877..5a3d6d38 100644 --- a/collectors/ciscoamp/package.json +++ b/collectors/ciscoamp/package.json @@ -1,6 +1,6 @@ { "name": "ciscoamp-collector", - "version": "1.0.53", + "version": "1.0.54", "description": "Alert Logic AWS based Ciscoamp Log Collector", "repository": {}, "private": true, @@ -9,26 +9,26 @@ "test": "JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=text mocha --colors" }, "devDependencies": { - "@aws-sdk/client-cloudformation": "^3.600.0", - "@aws-sdk/client-cloudwatch": "^3.600.0", - "@aws-sdk/client-dynamodb": "^3.602.0", - "@aws-sdk/client-kms": "^3.600.0", - "@aws-sdk/client-lambda": "^3.600.0", - "@aws-sdk/client-s3": "^3.600.0", - "@aws-sdk/client-sqs": "^3.600.0", - "@aws-sdk/client-ssm": "^3.600.0", + "@aws-sdk/client-cloudformation": "^3.629.0", + "@aws-sdk/client-cloudwatch": "^3.629.0", + "@aws-sdk/client-dynamodb": "^3.629.0", + "@aws-sdk/client-kms": "^3.629.0", + "@aws-sdk/client-lambda": "^3.629.0", + "@aws-sdk/client-s3": "^3.629.0", + "@aws-sdk/client-sqs": "^3.629.0", + "@aws-sdk/client-ssm": "^3.629.0", "jshint": "^2.13.6", - "mocha": "^10.4.0", + "mocha": "^10.7.3", "mocha-jenkins-reporter": "^0.4.8", "nyc": "^17.0.0", "rewire": "^7.0.0", "sinon": "^18.0.0" }, "dependencies": { - "@alertlogic/al-collector-js": "3.0.11", - "@alertlogic/paws-collector": "2.2.3", + "@alertlogic/al-collector-js": "3.0.12", + "@alertlogic/paws-collector": "2.2.5", "async": "^3.2.5", - "debug": "^4.3.5", + "debug": "^4.3.6", "moment": "2.30.1" }, "author": "Alert Logic Inc." diff --git a/collectors/ciscoduo/package.json b/collectors/ciscoduo/package.json index 0b715a9a..44d5e24f 100644 --- a/collectors/ciscoduo/package.json +++ b/collectors/ciscoduo/package.json @@ -1,6 +1,6 @@ { "name": "ciscoduo-collector", - "version": "1.0.53", + "version": "1.0.54", "description": "Alert Logic AWS based Ciscoduo Log Collector", "repository": {}, "private": true, @@ -9,27 +9,27 @@ "test": "JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=text mocha --colors" }, "devDependencies": { - "@aws-sdk/client-cloudformation": "^3.600.0", - "@aws-sdk/client-cloudwatch": "^3.600.0", - "@aws-sdk/client-dynamodb": "^3.602.0", - "@aws-sdk/client-kms": "^3.600.0", - "@aws-sdk/client-lambda": "^3.600.0", - "@aws-sdk/client-s3": "^3.600.0", - "@aws-sdk/client-sqs": "^3.600.0", - "@aws-sdk/client-ssm": "^3.600.0", + "@aws-sdk/client-cloudformation": "^3.632.0", + "@aws-sdk/client-cloudwatch": "^3.632.0", + "@aws-sdk/client-dynamodb": "^3.632.0", + "@aws-sdk/client-kms": "^3.632.0", + "@aws-sdk/client-lambda": "^3.632.0", + "@aws-sdk/client-s3": "^3.633.0", + "@aws-sdk/client-sqs": "^3.632.0", + "@aws-sdk/client-ssm": "^3.632.0", "jshint": "^2.13.6", - "mocha": "^10.4.0", + "mocha": "^10.7.3", "mocha-jenkins-reporter": "^0.4.8", "nyc": "^17.0.0", "rewire": "^7.0.0", "sinon": "^18.0.0" }, "dependencies": { - "@alertlogic/al-collector-js": "3.0.11", - "@alertlogic/paws-collector": "2.2.4", + "@alertlogic/al-collector-js": "3.0.12", + "@alertlogic/paws-collector": "2.2.5", "@duosecurity/duo_api": "^1.4.0", "async": "^3.2.5", - "debug": "^4.3.5", + "debug": "^4.3.6", "moment": "2.30.1" }, "author": "Alert Logic Inc." diff --git a/collectors/ciscomeraki/package.json b/collectors/ciscomeraki/package.json index 70930bdb..d14f4f68 100644 --- a/collectors/ciscomeraki/package.json +++ b/collectors/ciscomeraki/package.json @@ -1,6 +1,6 @@ { "name": "ciscomeraki-collector", - "version": "1.0.2", + "version": "1.0.3", "description": "Alert Logic AWS based Cisco Meraki Log Collector", "repository": {}, "private": true, @@ -9,26 +9,26 @@ "test": "JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=text mocha --colors" }, "devDependencies": { - "@aws-sdk/client-cloudformation": "^3.600.0", - "@aws-sdk/client-cloudwatch": "^3.600.0", - "@aws-sdk/client-dynamodb": "^3.602.0", - "@aws-sdk/client-kms": "^3.600.0", - "@aws-sdk/client-lambda": "^3.600.0", - "@aws-sdk/client-s3": "^3.600.0", - "@aws-sdk/client-sqs": "^3.600.0", - "@aws-sdk/client-ssm": "^3.600.0", + "@aws-sdk/client-cloudformation": "^3.632.0", + "@aws-sdk/client-cloudwatch": "^3.632.0", + "@aws-sdk/client-dynamodb": "^3.632.0", + "@aws-sdk/client-kms": "^3.632.0", + "@aws-sdk/client-lambda": "^3.632.0", + "@aws-sdk/client-s3": "^3.633.0", + "@aws-sdk/client-sqs": "^3.632.0", + "@aws-sdk/client-ssm": "^3.632.0", "jshint": "^2.13.6", - "mocha": "^10.4.0", + "mocha": "^10.7.3", "mocha-jenkins-reporter": "^0.4.8", "nyc": "^17.0.0", "rewire": "^7.0.0", "sinon": "^18.0.0" }, "dependencies": { - "@alertlogic/al-collector-js": "3.0.11", - "@alertlogic/paws-collector": "2.2.3", + "@alertlogic/al-collector-js": "3.0.12", + "@alertlogic/paws-collector": "2.2.5", "async": "^3.2.5", - "debug": "^4.3.5", + "debug": "^4.3.6", "moment": "2.30.1" }, diff --git a/collectors/crowdstrike/package.json b/collectors/crowdstrike/package.json index 9446ac1f..7099a8e6 100644 --- a/collectors/crowdstrike/package.json +++ b/collectors/crowdstrike/package.json @@ -1,6 +1,6 @@ { "name": "crowdstrike-collector", - "version": "1.0.34", + "version": "1.0.35", "description": "Alert Logic AWS based Crowdstrike Log Collector", "repository": {}, "private": true, @@ -9,26 +9,26 @@ "test": "JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=text mocha --colors" }, "devDependencies": { - "@aws-sdk/client-cloudformation": "^3.600.0", - "@aws-sdk/client-cloudwatch": "^3.600.0", - "@aws-sdk/client-dynamodb": "^3.602.0", - "@aws-sdk/client-kms": "^3.600.0", - "@aws-sdk/client-lambda": "^3.600.0", - "@aws-sdk/client-s3": "^3.600.0", - "@aws-sdk/client-sqs": "^3.600.0", - "@aws-sdk/client-ssm": "^3.600.0", + "@aws-sdk/client-cloudformation": "^3.632.0", + "@aws-sdk/client-cloudwatch": "^3.632.0", + "@aws-sdk/client-dynamodb": "^3.632.0", + "@aws-sdk/client-kms": "^3.632.0", + "@aws-sdk/client-lambda": "^3.632.0", + "@aws-sdk/client-s3": "^3.633.0", + "@aws-sdk/client-sqs": "^3.632.0", + "@aws-sdk/client-ssm": "^3.632.0", "jshint": "^2.13.6", - "mocha": "^10.4.0", + "mocha": "^10.7.3", "mocha-jenkins-reporter": "^0.4.8", "nyc": "^17.0.0", "rewire": "^7.0.0", "sinon": "^18.0.0" }, "dependencies": { - "@alertlogic/al-collector-js": "^3.0.11", - "@alertlogic/paws-collector": "2.2.3", + "@alertlogic/al-collector-js": "^3.0.12", + "@alertlogic/paws-collector": "2.2.5", "async": "^3.2.5", - "debug": "^4.3.5", + "debug": "^4.3.6", "moment": "2.30.1" }, "author": "Alert Logic Inc." diff --git a/collectors/googlestackdriver/collector.js b/collectors/googlestackdriver/collector.js index 1b872b43..606d4bce 100644 --- a/collectors/googlestackdriver/collector.js +++ b/collectors/googlestackdriver/collector.js @@ -142,7 +142,7 @@ timestamp < "${state.until}"`; return callback(null, logs, newState, newState.poll_interval_sec); }) .catch(err => { - AlLogger.error(`GSTA000003 err in collection ${JSON.stringify(err)}`); + AlLogger.debug(`GSTA000003 err in collection ${JSON.stringify(err)}`); // Stackdriver Logging api has some rate limits that we might run into. // If we run inot a rate limit error, instead of returning the error, // we return the state back to the queue with an additional second added, up to 15 min @@ -172,11 +172,12 @@ timestamp < "${state.until}"`; return callback(null, [], backOffState, nextPollInterval); }); } else { + let error = err.response && err.response.data ? err.response.data : err; // set errorCode if not available in error object to showcase client error on DDMetrics - if (err.code) { - err.errorCode = err.code; + if (err.errors && err.errors.length > 0 && err.errors[0].reason) { + error.errorCode = err.errors[0].reason; } - return callback(err); + return callback(error); } }); } diff --git a/collectors/googlestackdriver/package.json b/collectors/googlestackdriver/package.json index f2f27602..0631da7a 100644 --- a/collectors/googlestackdriver/package.json +++ b/collectors/googlestackdriver/package.json @@ -1,6 +1,6 @@ { "name": "googlestackdriver-collector", - "version": "1.2.13", + "version": "1.2.14", "description": "Alert Logic AWS based Googlestackdriver Log Collector", "repository": {}, "private": true, @@ -9,28 +9,28 @@ "test": "JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=text mocha --colors" }, "devDependencies": { - "@aws-sdk/client-cloudformation": "^3.600.0", - "@aws-sdk/client-cloudwatch": "^3.600.0", - "@aws-sdk/client-dynamodb": "^3.602.0", - "@aws-sdk/client-kms": "^3.600.0", - "@aws-sdk/client-lambda": "^3.600.0", - "@aws-sdk/client-s3": "^3.600.0", - "@aws-sdk/client-sqs": "^3.600.0", - "@aws-sdk/client-ssm": "^3.600.0", + "@aws-sdk/client-cloudformation": "^3.632.0", + "@aws-sdk/client-cloudwatch": "^3.632.0", + "@aws-sdk/client-dynamodb": "^3.632.0", + "@aws-sdk/client-kms": "^3.632.0", + "@aws-sdk/client-lambda": "^3.632.0", + "@aws-sdk/client-s3": "^3.633.0", + "@aws-sdk/client-sqs": "^3.632.0", + "@aws-sdk/client-ssm": "^3.632.0", "jshint": "^2.13.6", - "mocha": "^10.4.0", + "mocha": "^10.7.3", "mocha-jenkins-reporter": "^0.4.8", "nyc": "^17.0.0", "rewire": "^7.0.0", "sinon": "^18.0.0" }, "dependencies": { - "@alertlogic/al-collector-js": "3.0.11", - "@alertlogic/paws-collector": "2.2.3", + "@alertlogic/al-collector-js": "3.0.12", + "@alertlogic/paws-collector": "2.2.5", "async": "^3.2.5", - "debug": "^4.3.5", - "google-auth-library": "^9.11.0", - "googleapis": "^126.0.0", + "debug": "^4.3.6", + "google-auth-library": "^9.13.0", + "googleapis": "^140.0.1", "moment": "2.30.1" }, "author": "Alert Logic Inc." diff --git a/collectors/googlestackdriver/test/test.js b/collectors/googlestackdriver/test/test.js index 465681a8..eab9f07f 100644 --- a/collectors/googlestackdriver/test/test.js +++ b/collectors/googlestackdriver/test/test.js @@ -331,7 +331,15 @@ timestamp < "${until}"`; logginClientStub.onCall(0).callsFake(() => { return new Promise((res, rej) => { - rej({code:401}); + rej({ + code: 401, + errors: + [{ + message: 'unauthorized_client', + domain: 'global', + reason: 'Unauthorized' + }] + }); }); }); @@ -345,7 +353,7 @@ timestamp < "${until}"`; }; collector.pawsGetLogs(curState, (err, logs, newState, newPollInterval) =>{ - assert.equal(err.errorCode, 401); + assert.equal(err.errorCode, 'Unauthorized'); restoreLoggingClientStub(); done(); }); diff --git a/collectors/gsuite/package.json b/collectors/gsuite/package.json index 5c47d242..7f64ae1d 100644 --- a/collectors/gsuite/package.json +++ b/collectors/gsuite/package.json @@ -1,6 +1,6 @@ { "name": "gsuite-collector", - "version": "1.2.54", + "version": "1.2.55", "description": "Alert Logic AWS based Gsuite Log Collector", "repository": {}, "private": true, @@ -9,16 +9,16 @@ "test": "JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=text mocha --colors" }, "devDependencies": { - "@aws-sdk/client-cloudformation": "^3.600.0", - "@aws-sdk/client-cloudwatch": "^3.600.0", - "@aws-sdk/client-dynamodb": "^3.602.0", - "@aws-sdk/client-kms": "^3.600.0", - "@aws-sdk/client-lambda": "^3.600.0", - "@aws-sdk/client-s3": "^3.600.0", - "@aws-sdk/client-sqs": "^3.600.0", - "@aws-sdk/client-ssm": "^3.600.0", + "@aws-sdk/client-cloudformation": "^3.632.0", + "@aws-sdk/client-cloudwatch": "^3.632.0", + "@aws-sdk/client-dynamodb": "^3.632.0", + "@aws-sdk/client-kms": "^3.632.0", + "@aws-sdk/client-lambda": "^3.634.0", + "@aws-sdk/client-s3": "^3.633.0", + "@aws-sdk/client-sqs": "^3.632.0", + "@aws-sdk/client-ssm": "^3.632.0", "jshint": "^2.13.6", - "mocha": "^10.4.0", + "mocha": "^10.7.3", "mocha-jenkins-reporter": "^0.4.8", "moment": "2.30.1", "nyc": "^17.0.0", @@ -26,11 +26,11 @@ "sinon": "^18.0.0" }, "dependencies": { - "@alertlogic/al-collector-js": "3.0.11", - "@alertlogic/paws-collector": "2.2.3", - "async": "^3.2.5", - "debug": "^4.3.5", - "googleapis": "^126.0.0", + "@alertlogic/al-collector-js": "3.0.12", + "@alertlogic/paws-collector": "2.2.5", + "async": "^3.2.6", + "debug": "^4.3.6", + "googleapis": "^142.0.0", "moment": "2.30.1" }, "author": "Alert Logic Inc." diff --git a/collectors/mimecast/package.json b/collectors/mimecast/package.json index b8be1bc6..c86c527e 100644 --- a/collectors/mimecast/package.json +++ b/collectors/mimecast/package.json @@ -1,6 +1,6 @@ { "name": "mimecast-collector", - "version": "1.0.46", + "version": "1.0.47", "description": "Alert Logic AWS based Mimecast Log Collector", "repository": {}, "private": true, @@ -9,30 +9,30 @@ "test": "JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=text mocha --colors" }, "devDependencies": { - "@aws-sdk/client-cloudformation": "^3.600.0", - "@aws-sdk/client-cloudwatch": "^3.600.0", - "@aws-sdk/client-dynamodb": "^3.602.0", - "@aws-sdk/client-kms": "^3.600.0", - "@aws-sdk/client-lambda": "^3.600.0", - "@aws-sdk/client-s3": "^3.600.0", - "@aws-sdk/client-sqs": "^3.600.0", - "@aws-sdk/client-ssm": "^3.600.0", + "@aws-sdk/client-cloudformation": "^3.635.0", + "@aws-sdk/client-cloudwatch": "^3.635.0", + "@aws-sdk/client-dynamodb": "^3.635.0", + "@aws-sdk/client-kms": "^3.635.0", + "@aws-sdk/client-lambda": "^3.635.0", + "@aws-sdk/client-s3": "^3.635.0", + "@aws-sdk/client-sqs": "^3.635.0", + "@aws-sdk/client-ssm": "^3.635.0", "@types/adm-zip": "0.5.5", "jshint": "^2.13.6", - "mocha": "^10.4.0", + "mocha": "^10.7.3", "mocha-jenkins-reporter": "^0.4.8", "nyc": "^17.0.0", "rewire": "^7.0.0", "sinon": "^18.0.0" }, "dependencies": { - "@alertlogic/al-collector-js": "3.0.11", - "@alertlogic/paws-collector": "2.2.3", - "adm-zip": "^0.5.14", - "async": "^3.2.5", - "debug": "^4.3.5", + "@alertlogic/al-collector-js": "3.0.12", + "@alertlogic/paws-collector": "2.2.5", + "adm-zip": "^0.5.15", + "async": "^3.2.6", + "debug": "^4.3.6", "moment": "2.30.1", - "uuid": "^9.0.0" + "uuid": "^10.0.0" }, "author": "Alert Logic Inc." } diff --git a/collectors/o365/o365_collector.js b/collectors/o365/o365_collector.js index 00998426..798dc571 100644 --- a/collectors/o365/o365_collector.js +++ b/collectors/o365/o365_collector.js @@ -151,7 +151,7 @@ class O365Collector extends PawsCollector { const contentUriFun = ({contentUri}) => collector.o365_mgmnt_client.getPreFormedUrl(contentUri); const poolLimit = 20; - return asyncPool(poolLimit, parsedBody, contentUriFun).then(content => { + return this.asyncPoolAll(poolLimit, parsedBody, contentUriFun).then(content => { return { logs: content.reduce((agg, {parsedBody}) => [...parsedBody, ...agg], []), nextPage: nextPageUri @@ -201,6 +201,19 @@ class O365Collector extends PawsCollector { }); } + /** + * Upgraded asyncPool to 2.x which use the async iterator (ES9) + * @param {...any} args + * @returns + */ + async asyncPoolAll(...args) { + const results = []; + for await (const result of asyncPool(...args)) { + results.push(result); + } + return results; + } + _getNextCollectionState(curState) { const untilMoment = moment(curState.until); diff --git a/collectors/o365/package.json b/collectors/o365/package.json index fe7ce9d7..e15cc178 100644 --- a/collectors/o365/package.json +++ b/collectors/o365/package.json @@ -1,6 +1,6 @@ { "name": "o365-collector", - "version": "1.2.66", + "version": "1.2.67", "description": "Alert Logic AWS based O365 Log Collector", "repository": {}, "private": true, @@ -9,16 +9,16 @@ "test": "JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=text mocha --colors" }, "devDependencies": { - "@aws-sdk/client-cloudformation": "^3.600.0", - "@aws-sdk/client-cloudwatch": "^3.600.0", - "@aws-sdk/client-dynamodb": "^3.602.0", - "@aws-sdk/client-kms": "^3.600.0", - "@aws-sdk/client-lambda": "^3.600.0", - "@aws-sdk/client-s3": "^3.600.0", - "@aws-sdk/client-sqs": "^3.600.0", - "@aws-sdk/client-ssm": "^3.600.0", + "@aws-sdk/client-cloudformation": "^3.632.0", + "@aws-sdk/client-cloudwatch": "^3.632.0", + "@aws-sdk/client-dynamodb": "^3.632.0", + "@aws-sdk/client-kms": "^3.632.0", + "@aws-sdk/client-lambda": "^3.634.0", + "@aws-sdk/client-s3": "^3.633.0", + "@aws-sdk/client-sqs": "^3.632.0", + "@aws-sdk/client-ssm": "^3.632.0", "jshint": "^2.13.6", - "mocha": "^10.4.0", + "mocha": "^10.7.3", "mocha-jenkins-reporter": "^0.4.8", "nyc": "^17.0.0", "rewire": "^7.0.0", @@ -26,15 +26,16 @@ }, "dependencies": { "@alertlogic/al-aws-collector-js": "4.1.26", - "@alertlogic/al-collector-js": "3.0.11", - "@alertlogic/paws-collector": "2.2.3", + "@alertlogic/al-collector-js": "3.0.12", + "@alertlogic/paws-collector": "2.2.5", "@azure/ms-rest-azure-js": "2.1.0", "@azure/ms-rest-js": "2.7.0", "@azure/ms-rest-nodeauth": "3.1.1", - "async": "^3.2.5", - "debug": "^4.3.5", + "@smithy/node-http-handler": "^3.1.4", + "async": "^3.2.6", + "debug": "^4.3.6", "moment": "2.30.1", - "tiny-async-pool": "^1.3.0" + "tiny-async-pool": "^2.1.0" }, "author": "Alert Logic Inc." } diff --git a/collectors/okta/okta_collector.js b/collectors/okta/okta_collector.js index c5f7a9ed..436e56de 100644 --- a/collectors/okta/okta_collector.js +++ b/collectors/okta/okta_collector.js @@ -54,16 +54,16 @@ class OktaCollector extends PawsCollector { return callback(null, initialState, initialState.poll_interval_sec); } - pawsGetLogs(state, callback) { + async pawsGetLogs(state, callback) { let collector = this; const oktaClient = new okta.Client({ orgUrl: collector.pawsHttpsEndpoint, token: collector.secret }); AlLogger.info(`OKTA000001 Collecting data from ${state.since} till ${state.until}`); - const collection = oktaClient.getLogs({ - since: state.since, - until: state.until + const collection = await oktaClient.systemLogApi.listLogEvents({ + since: new Date(state.since), + until: new Date(state.until) }); let logAcc = []; collection.each(log => { diff --git a/collectors/okta/package.json b/collectors/okta/package.json index 84335472..4c3cf2db 100644 --- a/collectors/okta/package.json +++ b/collectors/okta/package.json @@ -1,6 +1,6 @@ { "name": "okta-collector", - "version": "1.2.26", + "version": "1.2.27", "description": "Alert Logic AWS based Okta Log Collector", "repository": {}, "private": true, @@ -9,28 +9,28 @@ "test": "JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=text mocha --colors" }, "devDependencies": { - "@aws-sdk/client-cloudformation": "^3.600.0", - "@aws-sdk/client-cloudwatch": "^3.600.0", - "@aws-sdk/client-dynamodb": "^3.602.0", - "@aws-sdk/client-kms": "^3.600.0", - "@aws-sdk/client-lambda": "^3.600.0", - "@aws-sdk/client-s3": "^3.600.0", - "@aws-sdk/client-sqs": "^3.600.0", - "@aws-sdk/client-ssm": "^3.600.0", + "@aws-sdk/client-cloudformation": "^3.635.0", + "@aws-sdk/client-cloudwatch": "^3.635.0", + "@aws-sdk/client-dynamodb": "^3.635.0", + "@aws-sdk/client-kms": "^3.635.0", + "@aws-sdk/client-lambda": "^3.635.0", + "@aws-sdk/client-s3": "^3.635.0", + "@aws-sdk/client-sqs": "^3.635.0", + "@aws-sdk/client-ssm": "^3.635.0", "jshint": "^2.13.6", - "mocha": "^10.4.0", + "mocha": "^10.7.3", "mocha-jenkins-reporter": "^0.4.8", - "nock": "^13.5.4", + "nock": "^13.5.5", "nyc": "^17.0.0", "rewire": "^7.0.0", "sinon": "^18.0.0" }, "dependencies": { - "@alertlogic/al-collector-js": "3.0.11", - "@alertlogic/paws-collector": "2.2.3", - "@okta/okta-sdk-nodejs": "^6.6.0", - "async": "^3.2.5", - "debug": "^4.3.5", + "@alertlogic/al-collector-js": "3.0.12", + "@alertlogic/paws-collector": "2.2.5", + "@okta/okta-sdk-nodejs": "^7.1.1", + "async": "^3.2.6", + "debug": "^4.3.6", "moment": "2.30.1" }, "author": "Alert Logic Inc." diff --git a/collectors/okta/test/okta_test.js b/collectors/okta/test/okta_test.js index dc0e2d7c..cd31a8f6 100644 --- a/collectors/okta/test/okta_test.js +++ b/collectors/okta/test/okta_test.js @@ -17,6 +17,8 @@ const { CloudWatch } = require("@aws-sdk/client-cloudwatch"), var alserviceStub = {}; var responseStub = {}; var setEnvStub = {}; +let stubOktaClient = {}; +var stubListLogEvents = {}; function setAlServiceStub() { alserviceStub.get = sinon.stub(m_alCollector.AlServiceC.prototype, 'get').callsFake( @@ -78,12 +80,19 @@ function mockSetEnvStub() { } describe('Unit Tests', function() { - + beforeEach(function(){ if (!nock.isActive()) { nock.activate(); } - + + stubOktaClient = sinon.stub(okta, 'Client').returns({ + systemLogApi: { + listLogEvents: sinon.stub() + } + }); + + stubListLogEvents = stubOktaClient().systemLogApi.listLogEvents; sinon.stub(SSM.prototype, 'getParameter').callsFake(function (params, callback) { const data = Buffer.from('test-secret'); return callback(null, { Parameter: { Value: data.toString('base64') } }); @@ -111,6 +120,7 @@ describe('Unit Tests', function() { responseStub.restore(); KMS.prototype.decrypt.restore(); SSM.prototype.getParameter.restore(); + stubOktaClient.restore(); }); describe('pawsInitCollectionState', function() { @@ -185,8 +195,7 @@ describe('Unit Tests', function() { succeed : function() {} }; it('gets logs correctly', function(done) { - const {Client} = okta; - const oktaSdkMock = sinon.stub(Client.prototype, 'getLogs').callsFake(() => { + stubListLogEvents.callsFake(() => { return { each: (callback) => { ['foo', 'bar', 'baz'].forEach(callback); @@ -205,18 +214,22 @@ describe('Unit Tests', function() { }; collector.pawsGetLogs(mockState, (err, logs, newState, nextPoll) => { - assert.equal(logs.length, 3); - assert.equal(newState.since, mockState.until); - oktaSdkMock.restore(); - done(); + try { + assert.equal(logs.length, 3); + assert.equal(newState.since, mockState.until); + done(); + } catch (e) { + console.error(e); + } finally { + stubListLogEvents.restore(); + } }); }); }); it('it should return the same state with pollinterval delay if get api return throttle error', function (done) { - const { Client } = okta; const error = { "name": "OktaApiError", "status": 429, "errorCode": "E0000047", "errorSummary": "API call exceeded rate limit due to too many requests.", "errorCauses": [], "errorLink": "E0000047", "errorId": "oaeJacBsJ0pQES61B_uegmlzA", "url": "https://alertlogic-admin.okta.com/api/v1/logs?since=2023-06-03T08%3A32%3A20.000Z&until=2023-06-03T08%3A33%3A20.000Z", "headers": {}, "message": "Okta HTTP 429 E0000047 API call exceeded rate limit due to too many requests.. " }; - const oktaSdkMock = sinon.stub(Client.prototype, 'getLogs').callsFake(() => { + stubListLogEvents.callsFake(() => { return { each: () => { return new Promise((res, rej) => { @@ -234,23 +247,25 @@ describe('Unit Tests', function() { poll_interval_sec: 60 }; var reportSpy = sinon.spy(collector, 'reportApiThrottling'); - let putMetricDataStub = sinon.stub(CloudWatch.prototype, 'putMetricData').callsFake((params, callback) => callback()) ; + let putMetricDataStub = sinon.stub(CloudWatch.prototype, 'putMetricData').callsFake((params, callback) => callback()); collector.pawsGetLogs(mockState, (err, logs, state, pollIntervalSec) => { - assert.equal(true, reportSpy.calledOnce); - assert.equal(err, null); - // if header not return rate-limit-resect-sec then add the 60 sec in existing pollinterval seconds - assert.equal(pollIntervalSec, 120); - oktaSdkMock.restore(); - putMetricDataStub.restore(); - done(); + try { + assert.equal(true, reportSpy.calledOnce); + assert.equal(err, null); + // if header not return rate-limit-resect-sec then add the 60 sec in existing pollinterval seconds + assert.equal(pollIntervalSec, 120); + putMetricDataStub.restore(); + done(); + } finally { + stubListLogEvents.restore(); + } }); }); }); it('It should set the delay second if there is throttle error and header contain X-Rate-Limit-Reset', function (done) { - const { Client } = okta; const resetSecs = moment().add(120, 'seconds').unix(); const error = { "name": "OktaApiError", "status": 429, "errorCode": "E0000047", "errorSummary": "API call exceeded rate limit due to too many requests.", "url": "https://alertlogic-admin.okta.com/api/v1/logs?since=2023-06-03T08%3A32%3A20.000Z&until=2023-06-03T08%3A33%3A20.000Z", "headers": { "x-rate-limit-reset": resetSecs }, "message": "Okta HTTP 429 E0000047 API call exceeded rate limit due to too many requests.. " }; - const oktaSdkMock = sinon.stub(Client.prototype, 'getLogs').callsFake(() => { + stubListLogEvents.callsFake(() => { return { each: () => { return new Promise((res, rej) => { @@ -270,25 +285,36 @@ describe('Unit Tests', function() { var reportSpy = sinon.spy(collector, 'reportApiThrottling'); let putMetricDataStub = sinon.stub(CloudWatch.prototype, 'putMetricData').callsFake((params, callback) => callback()) ; collector.pawsGetLogs(mockState, (err, logs, state, poll_interval_sec) => { - assert.equal(true, reportSpy.calledOnce); - assert.equal(err, null); - assert.equal(poll_interval_sec, 180); - oktaSdkMock.restore(); - putMetricDataStub.restore(); - done(); + try { + // Perform assertions + assert.equal(true, reportSpy.calledOnce); + assert.equal(err, null); + assert.equal(poll_interval_sec, 180); + putMetricDataStub.restore(); + done(); + } catch (e) { + console.error(e); + } finally { + stubListLogEvents.restore(); + } }); }); }); it('gets logs throttling response', function(done) { - + // Okta endpoints mock - nock('https://test.alertlogic.com:443', {'encodedQueryParams':true}) - .get('/api/v1/logs') - .query(true) - .times(1) - .reply(429); - OktaCollector.load().then(function(creds) { + const error = { "name": "OktaApiError", "status": 429, "errorCode": "E0000047", "errorSummary": "API call exceeded rate limit due to too many requests.", "url": "https://alertlogic-admin.okta.com/api/v1/logs?since=2023-06-03T08%3A32%3A20.000Z&until=2023-06-03T08%3A33%3A20.000Z", "message": "Okta HTTP 429 E0000047 API call exceeded rate limit due to too many request" }; + stubListLogEvents.callsFake(() => { + return { + each: () => { + return new Promise((res, rej) => { + rej(error); + }); + } + }; + }); + OktaCollector.load().then(function (creds) { var collector = new OktaCollector(ctx, creds); const startDate = moment().subtract(1, 'days').toISOString(); const mockState = { @@ -298,9 +324,16 @@ describe('Unit Tests', function() { var reportSpy = sinon.spy(collector, 'reportApiThrottling'); let putMetricDataStub = sinon.stub(CloudWatch.prototype, 'putMetricData').callsFake((params, callback) => callback()) ; collector.pawsGetLogs(mockState, (err) => { - assert.equal(true, reportSpy.calledOnce); - putMetricDataStub.restore(); - done(); + try { + assert.equal(true, reportSpy.calledOnce); + putMetricDataStub.restore(); + done(); + } catch (e) { + console.error(e); + } + finally { + stubListLogEvents.restore(); + } }); }); }); @@ -400,7 +433,6 @@ describe('Unit Tests', function() { }); it('no error code', function(done) { - const {Client} = okta; let errorObj = { status: 401, url: "https://ft-test.oktapreview.com/api/v1/logs?since=2020-08-13T20%3A00%3A04.000Z&until=2020-08-13T20%3A01%3A04.000Z" @@ -415,7 +447,7 @@ describe('Unit Tests', function() { done(); } }; - const oktaSdkMock = sinon.stub(Client.prototype, 'getLogs').callsFake(() => { + stubListLogEvents.callsFake(() => { return { each: (callback) => { ['foo', 'bar', 'baz'].forEach(callback); @@ -434,9 +466,14 @@ describe('Unit Tests', function() { }; collector.pawsGetLogs(mockState, (err, logs, newState, nextPoll) => { - oktaSdkMock.restore(); - assert.equal(err.status, "401"); + try{ + assert.equal(err.status, "401"); done(); + }catch(e){ + + }finally{ + stubListLogEvents.restore(); + } }); }); }); diff --git a/collectors/salesforce/package.json b/collectors/salesforce/package.json index f2dd69f1..8a72286d 100644 --- a/collectors/salesforce/package.json +++ b/collectors/salesforce/package.json @@ -1,6 +1,6 @@ { "name": "salesforce-collector", - "version": "1.1.55", + "version": "1.1.56", "description": "Alert Logic AWS based Salesforce Log Collector", "repository": {}, "private": true, @@ -9,27 +9,27 @@ "test": "JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=text mocha --colors" }, "devDependencies": { - "@aws-sdk/client-cloudformation": "^3.600.0", - "@aws-sdk/client-cloudwatch": "^3.600.0", - "@aws-sdk/client-dynamodb": "^3.602.0", - "@aws-sdk/client-kms": "^3.600.0", - "@aws-sdk/client-lambda": "^3.600.0", - "@aws-sdk/client-s3": "^3.600.0", - "@aws-sdk/client-sqs": "^3.600.0", - "@aws-sdk/client-ssm": "^3.600.0", + "@aws-sdk/client-cloudformation": "^3.635.0", + "@aws-sdk/client-cloudwatch": "^3.635.0", + "@aws-sdk/client-dynamodb": "^3.635.0", + "@aws-sdk/client-kms": "^3.635.0", + "@aws-sdk/client-lambda": "^3.636.0", + "@aws-sdk/client-s3": "^3.635.0", + "@aws-sdk/client-sqs": "^3.635.0", + "@aws-sdk/client-ssm": "^3.635.0", "jshint": "^2.13.6", - "mocha": "^10.4.0", + "mocha": "^10.7.3", "mocha-jenkins-reporter": "^0.4.8", "nyc": "^17.0.0", "rewire": "^7.0.0", "sinon": "^18.0.0" }, "dependencies": { - "@alertlogic/al-collector-js": "3.0.11", - "@alertlogic/paws-collector": "2.2.3", - "async": "^3.2.5", - "debug": "^4.3.5", - "jsforce": "^1.11.1", + "@alertlogic/al-collector-js": "3.0.12", + "@alertlogic/paws-collector": "2.2.5", + "async": "^3.2.6", + "debug": "^4.3.6", + "jsforce": "^3.4.1", "jsonwebtoken": "^9.0.2", "moment": "2.30.1" }, diff --git a/collectors/salesforce/test/utils_test.js b/collectors/salesforce/test/utils_test.js index 879004b6..619625f2 100644 --- a/collectors/salesforce/test/utils_test.js +++ b/collectors/salesforce/test/utils_test.js @@ -24,7 +24,9 @@ describe('Unit Tests', function () { it('Get Object Logs', function (done) { mockActivityObject = sinon.stub(conn, 'query').callsFake( function fakeFn(err, result) { - return result(null, { records: [salesforceMock.LOG_EVENT] }); + return new Promise(function (resolve, reject) { + return resolve({ records: [salesforceMock.LOG_EVENT] }); + }); }); let maxPagesPerInvocation = 5; let response = { @@ -55,7 +57,9 @@ describe('Unit Tests', function () { it('Get Object Logs with no records', function (done) { mockActivityObject = sinon.stub(conn, 'query').callsFake( function fakeFn(err, result) { - return result(null, { records: [] }); + return new Promise(function (resolve, reject) { + return resolve({ records: [] }); + }); }); let maxPagesPerInvocation = 5; let response = { diff --git a/collectors/salesforce/utils.js b/collectors/salesforce/utils.js index 37921814..c43b9416 100644 --- a/collectors/salesforce/utils.js +++ b/collectors/salesforce/utils.js @@ -14,7 +14,7 @@ function getObjectLogs(response, objectQueryDetails, accumulator, state, maxPage let lastValue = state.nextPage ? state.nextPage : null; return new Promise(function (resolve, reject) { getSalesforceData(); - function getSalesforceData() { + async function getSalesforceData() { if (pageCount < maxPagesPerInvocation) { var conn = new jsforce.Connection({ accessToken: response.access_token, @@ -35,8 +35,8 @@ function getObjectLogs(response, objectQueryDetails, accumulator, state, maxPage break; } queryWithLimit = `${queryWithLimit} ORDER BY ${objectQueryDetails.sortFieldName} ${objectQueryDetails.sortType} LIMIT ${limit}`; - conn.query(queryWithLimit, function (err, result) { - if (err) { return reject(err); } + try { + const result = await conn.query(queryWithLimit); if (result.records.length === 0) { return resolve({ accumulator, nextPage }); } @@ -44,7 +44,11 @@ function getObjectLogs(response, objectQueryDetails, accumulator, state, maxPage lastValue = accumulator[accumulator.length - 1][objectQueryDetails.sortFieldName]; pageCount++; return getSalesforceData(); - }); + + } + catch (err) { + return reject(err); + } } else { nextPage = lastValue; diff --git a/collectors/sentinelone/package.json b/collectors/sentinelone/package.json index 5b0e4642..23eabcfa 100644 --- a/collectors/sentinelone/package.json +++ b/collectors/sentinelone/package.json @@ -1,6 +1,6 @@ { "name": "sentinelone-collector", - "version": "1.0.52", + "version": "1.0.53", "description": "Alert Logic AWS based Sentinelone Log Collector", "repository": {}, "private": true, @@ -9,26 +9,26 @@ "test": "JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=text mocha --colors" }, "devDependencies": { - "@aws-sdk/client-cloudformation": "^3.600.0", - "@aws-sdk/client-cloudwatch": "^3.600.0", - "@aws-sdk/client-dynamodb": "^3.602.0", - "@aws-sdk/client-kms": "^3.600.0", - "@aws-sdk/client-lambda": "^3.600.0", - "@aws-sdk/client-s3": "^3.600.0", - "@aws-sdk/client-sqs": "^3.600.0", - "@aws-sdk/client-ssm": "^3.600.0", + "@aws-sdk/client-cloudformation": "^3.635.0", + "@aws-sdk/client-cloudwatch": "^3.635.0", + "@aws-sdk/client-dynamodb": "^3.635.0", + "@aws-sdk/client-kms": "^3.635.0", + "@aws-sdk/client-lambda": "^3.636.0", + "@aws-sdk/client-s3": "^3.635.0", + "@aws-sdk/client-sqs": "^3.635.0", + "@aws-sdk/client-ssm": "^3.635.0", "jshint": "^2.13.6", - "mocha": "^10.4.0", + "mocha": "^10.7.3", "mocha-jenkins-reporter": "^0.4.8", "nyc": "^17.0.0", "rewire": "^7.0.0", "sinon": "^18.0.0" }, "dependencies": { - "@alertlogic/al-collector-js": "3.0.11", - "@alertlogic/paws-collector": "2.2.3", - "async": "3.2.5", - "debug": "^4.3.5", + "@alertlogic/al-collector-js": "3.0.12", + "@alertlogic/paws-collector": "2.2.5", + "async": "3.2.6", + "debug": "^4.3.6", "moment": "2.30.1" }, "author": "Alert Logic Inc." diff --git a/collectors/sophos/package.json b/collectors/sophos/package.json index 0bf9d5f1..5db1f193 100644 --- a/collectors/sophos/package.json +++ b/collectors/sophos/package.json @@ -1,6 +1,6 @@ { "name": "sophos-collector", - "version": "1.0.52", + "version": "1.0.53", "description": "Alert Logic AWS based Sophos Log Collector", "repository": {}, "private": true, @@ -10,16 +10,16 @@ "test": "JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=text mocha --colors" }, "devDependencies": { - "@aws-sdk/client-cloudformation": "^3.600.0", - "@aws-sdk/client-cloudwatch": "^3.600.0", - "@aws-sdk/client-dynamodb": "^3.602.0", - "@aws-sdk/client-kms": "^3.600.0", - "@aws-sdk/client-lambda": "^3.600.0", - "@aws-sdk/client-s3": "^3.600.0", - "@aws-sdk/client-sqs": "^3.600.0", - "@aws-sdk/client-ssm": "^3.600.0", + "@aws-sdk/client-cloudformation": "^3.635.0", + "@aws-sdk/client-cloudwatch": "^3.635.0", + "@aws-sdk/client-dynamodb": "^3.635.0", + "@aws-sdk/client-kms": "^3.635.0", + "@aws-sdk/client-lambda": "^3.636.0", + "@aws-sdk/client-s3": "^3.635.0", + "@aws-sdk/client-sqs": "^3.635.0", + "@aws-sdk/client-ssm": "^3.635.0", "jshint": "^2.13.6", - "mocha": "^10.4.0", + "mocha": "^10.7.3", "mocha-jenkins-reporter": "^0.4.8", "mockserver": "^3.1.1", "nyc": "^17.0.0", @@ -27,10 +27,10 @@ "sinon": "^18.0.0" }, "dependencies": { - "@alertlogic/al-collector-js": "3.0.11", - "@alertlogic/paws-collector": "2.2.3", - "async": "3.2.5", - "debug": "^4.3.5", + "@alertlogic/al-collector-js": "3.0.12", + "@alertlogic/paws-collector": "2.2.5", + "async": "3.2.6", + "debug": "^4.3.6", "moment": "2.30.1" }, "author": "Alert Logic Inc." diff --git a/collectors/sophossiem/package.json b/collectors/sophossiem/package.json index 2c1a6090..5871aea4 100644 --- a/collectors/sophossiem/package.json +++ b/collectors/sophossiem/package.json @@ -1,6 +1,6 @@ { "name": "sophossiem-collector", - "version": "1.2.11", + "version": "1.2.12", "description": "Alert Logic AWS based Sophossiem Log Collector", "repository": {}, "private": true, @@ -9,26 +9,26 @@ "test": "JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=text mocha --colors" }, "devDependencies": { - "@aws-sdk/client-cloudformation": "^3.600.0", - "@aws-sdk/client-cloudwatch": "^3.600.0", - "@aws-sdk/client-dynamodb": "^3.602.0", - "@aws-sdk/client-kms": "^3.600.0", - "@aws-sdk/client-lambda": "^3.600.0", - "@aws-sdk/client-s3": "^3.600.0", - "@aws-sdk/client-sqs": "^3.600.0", - "@aws-sdk/client-ssm": "^3.600.0", + "@aws-sdk/client-cloudformation": "^3.635.0", + "@aws-sdk/client-cloudwatch": "^3.635.0", + "@aws-sdk/client-dynamodb": "^3.635.0", + "@aws-sdk/client-kms": "^3.635.0", + "@aws-sdk/client-lambda": "^3.636.0", + "@aws-sdk/client-s3": "^3.635.0", + "@aws-sdk/client-sqs": "^3.635.0", + "@aws-sdk/client-ssm": "^3.635.0", "jshint": "^2.13.6", - "mocha": "^10.4.0", + "mocha": "^10.7.3", "mocha-jenkins-reporter": "^0.4.8", "nyc": "^17.0.0", "rewire": "^7.0.0", "sinon": "^18.0.0" }, "dependencies": { - "@alertlogic/al-collector-js": "3.0.11", - "@alertlogic/paws-collector": "2.2.3", - "async": "^3.2.5", - "debug": "^4.3.5", + "@alertlogic/al-collector-js": "3.0.12", + "@alertlogic/paws-collector": "2.2.5", + "async": "^3.2.6", + "debug": "^4.3.6", "moment": "2.30.1" }, "author": "Alert Logic Inc." diff --git a/ps_spec.yml b/ps_spec.yml index bb85d77a..a4452958 100644 --- a/ps_spec.yml +++ b/ps_spec.yml @@ -60,7 +60,7 @@ stages: trigger_phrase: build-collectors env: ALPS_SERVICE_NAME: "paws-auth0-collector" - ALPS_SERVICE_VERSION: "1.1.56" #set the value from collector package json + ALPS_SERVICE_VERSION: "1.1.57" #set the value from collector package json commands: - source $NVM_DIR/nvm.sh && nvm use 20 - ./build_collector.sh auth0 @@ -82,7 +82,7 @@ stages: - ./build_collector.sh carbonblack env: ALPS_SERVICE_NAME: "paws-carbonblack-collector" - ALPS_SERVICE_VERSION: "1.0.54" #set the value from collector package json + ALPS_SERVICE_VERSION: "1.0.55" #set the value from collector package json outputs: file: ./carbonblack-collector* packagers: @@ -98,7 +98,7 @@ stages: trigger_phrase: build-collectors env: ALPS_SERVICE_NAME: "paws-ciscoamp-collector" - ALPS_SERVICE_VERSION: "1.0.53" #set the value from collector package json + ALPS_SERVICE_VERSION: "1.0.54" #set the value from collector package json commands: - source $NVM_DIR/nvm.sh && nvm use 20 - ./build_collector.sh ciscoamp @@ -120,7 +120,7 @@ stages: - ./build_collector.sh ciscoduo env: ALPS_SERVICE_NAME: "paws-ciscoduo-collector" - ALPS_SERVICE_VERSION: "1.0.53" #set the value from collector package json + ALPS_SERVICE_VERSION: "1.0.54" #set the value from collector package json outputs: file: ./ciscoduo-collector* packagers: @@ -139,7 +139,7 @@ stages: - ./build_collector.sh ciscomeraki env: ALPS_SERVICE_NAME: "paws-ciscomeraki-collector" - ALPS_SERVICE_VERSION: "1.0.2" #set the value from collector package json + ALPS_SERVICE_VERSION: "1.0.3" #set the value from collector package json outputs: file: ./ciscomeraki-collector* packagers: @@ -155,7 +155,7 @@ stages: trigger_phrase: build-collectors env: ALPS_SERVICE_NAME: "paws-crowdstrike-collector" - ALPS_SERVICE_VERSION: "1.0.34" #set the value from collector package json + ALPS_SERVICE_VERSION: "1.0.35" #set the value from collector package json commands: - source $NVM_DIR/nvm.sh && nvm use 20 - ./build_collector.sh crowdstrike @@ -177,7 +177,7 @@ stages: - ./build_collector.sh googlestackdriver env: ALPS_SERVICE_NAME: "paws-googlestackdriver-collector" - ALPS_SERVICE_VERSION: "1.2.13" #set the value from collector package json + ALPS_SERVICE_VERSION: "1.2.14" #set the value from collector package json outputs: file: ./googlestackdriver-collector* packagers: @@ -193,7 +193,7 @@ stages: trigger_phrase: build-collectors env: ALPS_SERVICE_NAME: "paws-gsuite-collector" - ALPS_SERVICE_VERSION: "1.2.54" #set the value from collector package json + ALPS_SERVICE_VERSION: "1.2.55" #set the value from collector package json commands: - source $NVM_DIR/nvm.sh && nvm use 20 - ./build_collector.sh gsuite @@ -215,7 +215,7 @@ stages: - ./build_collector.sh mimecast env: ALPS_SERVICE_NAME: "paws-mimecast-collector" - ALPS_SERVICE_VERSION: "1.0.46" #set the value from collector package json + ALPS_SERVICE_VERSION: "1.0.47" #set the value from collector package json outputs: file: ./mimecast-collector* packagers: @@ -231,7 +231,7 @@ stages: trigger_phrase: build-collectors env: ALPS_SERVICE_NAME: "paws-o365-collector" - ALPS_SERVICE_VERSION: "1.2.66" #set the value from collector package json + ALPS_SERVICE_VERSION: "1.2.67" #set the value from collector package json commands: - source $NVM_DIR/nvm.sh && nvm use 20 - ./build_collector.sh o365 @@ -253,7 +253,7 @@ stages: - ./build_collector.sh okta env: ALPS_SERVICE_NAME: "paws-okta-collector" - ALPS_SERVICE_VERSION: "1.2.26" #set the value from collector package json + ALPS_SERVICE_VERSION: "1.2.27" #set the value from collector package json outputs: file: ./okta-collector* packagers: @@ -269,7 +269,7 @@ stages: trigger_phrase: build-collectors env: ALPS_SERVICE_NAME: "paws-salesforce-collector" - ALPS_SERVICE_VERSION: "1.1.55" #set the value from collector package json + ALPS_SERVICE_VERSION: "1.1.56" #set the value from collector package json commands: - source $NVM_DIR/nvm.sh && nvm use 20 - ./build_collector.sh salesforce @@ -291,7 +291,7 @@ stages: - ./build_collector.sh sentinelone env: ALPS_SERVICE_NAME: "paws-sentinelone-collector" - ALPS_SERVICE_VERSION: "1.0.52" #set the value from collector package json + ALPS_SERVICE_VERSION: "1.0.53" #set the value from collector package json outputs: file: ./sentinelone-collector* packagers: @@ -307,7 +307,7 @@ stages: trigger_phrase: build-collectors env: ALPS_SERVICE_NAME: "paws-sophos-collector" - ALPS_SERVICE_VERSION: "1.0.52" #set the value from collector package json + ALPS_SERVICE_VERSION: "1.0.53" #set the value from collector package json commands: - source $NVM_DIR/nvm.sh && nvm use 20 - ./build_collector.sh sophos @@ -329,7 +329,7 @@ stages: - ./build_collector.sh sophossiem env: ALPS_SERVICE_NAME: "paws-sophossiem-collector" - ALPS_SERVICE_VERSION: "1.2.11" #set the value from collector package json + ALPS_SERVICE_VERSION: "1.2.12" #set the value from collector package json outputs: file: ./sophossiem-collector* packagers: