diff --git a/.eslintignore b/.eslintignore index ba4f778..3fe38f3 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,8 +1,8 @@ .gitignore .git/ -cloud/app-slave-provisioner/node_modules/ +cloud/app-emissary-provisioner/node_modules/ cloud/s2-deprovisioner/node_modules/ -local/app-slave-provisioner/node_modules/ +local/app-emissary-provisioner/node_modules/ local/selenium-standalone-provisioner/node_modules/ local/s2-deprovisioner/node_modules/ sam-app/ diff --git a/.vscode/launch.json b/.vscode/launch.json index 9f2b02b..25f2702 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -15,12 +15,12 @@ "protocol": "inspector", "stopOnEntry": false }, { - "name": "app-slave-provisioner", + "name": "app-emissary-provisioner", "type": "node", "request": "attach", "address": "localhost", "port": 5858, - "localRoot": "${workspaceFolder}/local/app-slave-provisioner", + "localRoot": "${workspaceFolder}/local/app-emissary-provisioner", "remoteRoot": "/var/task", "protocol": "inspector", "stopOnEntry": false diff --git a/README.md b/README.md index 9e542f1..a6554e2 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,9 @@ lambda functions of pu Top Level selenium
provisioner - app-slave
provisioner + app-emissary
provisioner s2
deprovisioner - app-slave
provisioner + app-emissary
provisioner s2
deprovisioner @@ -36,13 +36,13 @@ lambda functions of
pu Known Vulnerabilities - Known Vulnerabilities + Known Vulnerabilities Known Vulnerabilities - Known Vulnerabilities + Known Vulnerabilities Known Vulnerabilities diff --git a/cloud/app-slave-provisioner/index.js b/cloud/app-emissary-provisioner/index.js similarity index 83% rename from cloud/app-slave-provisioner/index.js rename to cloud/app-emissary-provisioner/index.js index 37e408e..154f549 100644 --- a/cloud/app-slave-provisioner/index.js +++ b/cloud/app-emissary-provisioner/index.js @@ -67,7 +67,7 @@ internals.promiseAllTimeout = async (promises, timeout, resolvePartial = true) = })); -internals.deploySlaves = async (dTOItems, { +internals.deployEmissaries = async (dTOItems, { invokedFunctionArn, clientContext: { Custom: { customer, @@ -79,7 +79,7 @@ internals.deploySlaves = async (dTOItems, { const { promiseAllTimeout, s2ProvisioningTimeout } = internals; const result = { items: undefined, error: undefined }; // Doc: [Lambda Environment Variables](https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html) - console.info(`provisionAppSlaves invoked for pt customer: ${customer}.`); + console.info(`provisionAppEmissaries invoked for pt customer: ${customer}.`); console.info(`The customerClusterArn is: ${customerClusterArn}`); console.info(`The Account Id is: ${invokedFunctionArn.split(':')[4]}`); console.info(`The serviceDiscoveryServices are ${JSON.stringify(serviceDiscoveryServices)}`); @@ -105,20 +105,20 @@ internals.deploySlaves = async (dTOItems, { const itemClone = { ...cV }; const browserNumber = numberOfBrowsersToAdd[itemClone.browser] - (runningCountOfBrowsersLeftToAdd[itemClone.browser] - 1); runningCountOfBrowsersLeftToAdd[itemClone.browser] -= 1; - itemClone.appSlaveContainerName = `appslave-zap-${itemClone.browser}-${browserNumber}`; - itemClone.appSlaveTaskDefinition = `s2_app_slave_zap_${itemClone.browser}_${browserNumber}`; - itemClone.appEcsServiceName = `s2_app_slave_zap_${itemClone.browser}_${browserNumber}_${customer}`; - itemClone.appServiceDiscoveryServiceArn = `${serviceDiscoveryServiceArnPrefix}${serviceDiscoveryServices[`s2_app_slave_zap_${itemClone.browser}_${browserNumber}`]}`; + itemClone.appEmissaryContainerName = `appemissary-zap-${itemClone.browser}-${browserNumber}`; + itemClone.appEmissaryTaskDefinition = `s2_app_emissary_zap_${itemClone.browser}_${browserNumber}`; + itemClone.appEcsServiceName = `s2_app_emissary_zap_${itemClone.browser}_${browserNumber}_${customer}`; + itemClone.appServiceDiscoveryServiceArn = `${serviceDiscoveryServiceArnPrefix}${serviceDiscoveryServices[`s2_app_emissary_zap_${itemClone.browser}_${browserNumber}`]}`; itemClone.seleniumContainerName = `seleniumstandalone-${itemClone.browser}-${browserNumber}`; - itemClone.seleniumTaskDefinition = `s2_app_slave_selenium_${itemClone.browser}_${browserNumber}`; - itemClone.seleniumEcsServiceName = `s2_app_slave_selenium_${itemClone.browser}_${browserNumber}_${customer}`; - itemClone.seleniumServiceDiscoveryServiceArn = `${serviceDiscoveryServiceArnPrefix}${serviceDiscoveryServices[`s2_app_slave_selenium_${itemClone.browser}_${browserNumber}`]}`; + itemClone.seleniumTaskDefinition = `s2_app_emissary_selenium_${itemClone.browser}_${browserNumber}`; + itemClone.seleniumEcsServiceName = `s2_app_emissary_selenium_${itemClone.browser}_${browserNumber}_${customer}`; + itemClone.seleniumServiceDiscoveryServiceArn = `${serviceDiscoveryServiceArnPrefix}${serviceDiscoveryServices[`s2_app_emissary_selenium_${itemClone.browser}_${browserNumber}`]}`; return itemClone; }); console.info(`The value of itemsWithExtras is: ${JSON.stringify(itemsWithExtras)}`); const appItemsWithExtras = itemsWithExtras.map((item) => ({ - containerName: item.appSlaveContainerName, - taskDefinition: item.appSlaveTaskDefinition, + containerName: item.appEmissaryContainerName, + taskDefinition: item.appEmissaryTaskDefinition, ecsServiceName: item.appEcsServiceName, serviceDiscoveryServiceArn: item.appServiceDiscoveryServiceArn, containerPort: 8080 @@ -149,7 +149,7 @@ internals.deploySlaves = async (dTOItems, { try { const resolved = await promiseAllTimeout(promisedResponses, s2ProvisioningTimeout); console.info(`The data objects returned from calling ecs.createService were: ${JSON.stringify(resolved)}`); - resolved.every((e) => !e) && (result.error = 'Timeout exceeded: App Slave container(s) took too long to start. Although they timed out, they may have still started.'); + resolved.every((e) => !e) && (result.error = 'Timeout exceeded: App Emissary container(s) took too long to start. Although they timed out, they may have still started.'); } catch (e) { console.error('Exception occurred, details follow:'); console.error(e); @@ -163,7 +163,7 @@ internals.deploySlaves = async (dTOItems, { } result.items = itemsWithExtras.map((testSession) => { - const { appSlaveTaskDefinition, seleniumTaskDefinition, ...itemsForConsumer } = testSession; + const { appEmissaryTaskDefinition, seleniumTaskDefinition, ...itemsForConsumer } = testSession; return itemsForConsumer; }); @@ -171,12 +171,12 @@ internals.deploySlaves = async (dTOItems, { }; // Doc: context: https://docs.aws.amazon.com/lambda/latest/dg/nodejs-context.html -exports.provisionAppSlaves = async (event, context) => { +exports.provisionAppEmissaries = async (event, context) => { internals.s2ProvisioningTimeout = process.env.S2_PROVISIONING_TIMEOUT * 1000; const { provisionViaLambdaDto: { items } } = event; - const { deploySlaves, printEnv } = internals; + const { deployEmissaries, printEnv } = internals; printEnv(); - const result = await deploySlaves(items, context); + const result = await deployEmissaries(items, context); console.info(`The resulting items were: ${JSON.stringify(result.items)}`); diff --git a/cloud/app-slave-provisioner/package-lock.json b/cloud/app-emissary-provisioner/package-lock.json similarity index 99% rename from cloud/app-slave-provisioner/package-lock.json rename to cloud/app-emissary-provisioner/package-lock.json index 92043c4..f2875ac 100644 --- a/cloud/app-slave-provisioner/package-lock.json +++ b/cloud/app-emissary-provisioner/package-lock.json @@ -1,6 +1,6 @@ { - "name": "app-slave-provisioner", - "version": "0.0.0", + "name": "app-emissary-provisioner", + "version": "0.1.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -987,9 +987,9 @@ "dev": true }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "inquirer": { diff --git a/cloud/app-slave-provisioner/package.json b/cloud/app-emissary-provisioner/package.json similarity index 74% rename from cloud/app-slave-provisioner/package.json rename to cloud/app-emissary-provisioner/package.json index 6ab4ecc..a46ea90 100644 --- a/cloud/app-slave-provisioner/package.json +++ b/cloud/app-emissary-provisioner/package.json @@ -1,7 +1,7 @@ { - "name": "app-slave-provisioner", + "name": "app-emissary-provisioner", "version": "0.1.0-alpha.1", - "description": "purpleteam app-slave provisioner for cloud environment", + "description": "purpleteam app-emissary provisioner for cloud environment", "main": "index.js", "repository": "https://github.com/purpleteam-labs/purpleteam-lambda", "author": "Kim Carter", diff --git a/cloud/s2-deprovisioner/package-lock.json b/cloud/s2-deprovisioner/package-lock.json index 7e92977..58bbc2c 100644 --- a/cloud/s2-deprovisioner/package-lock.json +++ b/cloud/s2-deprovisioner/package-lock.json @@ -1,6 +1,6 @@ { "name": "s2-deprovisioner", - "version": "0.0.0", + "version": "0.1.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -987,9 +987,9 @@ "dev": true }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "inquirer": { diff --git a/local/app-slave-provisioner/index.js b/local/app-emissary-provisioner/index.js similarity index 77% rename from local/app-slave-provisioner/index.js rename to local/app-emissary-provisioner/index.js index 3a9e02c..15774e7 100644 --- a/local/app-slave-provisioner/index.js +++ b/local/app-emissary-provisioner/index.js @@ -66,36 +66,36 @@ internals.promiseAllTimeout = async (promises, timeout, resolvePartial = true) = })); -internals.deploySlaves = async (dTOItems) => { +internals.deployEmissaries = async (dTOItems) => { const { promiseAllTimeout, s2ProvisioningTimeout } = internals; - const numberOfRequestedSlaves = dTOItems.length; + const numberOfRequestedEmissaries = dTOItems.length; const result = { items: undefined, error: undefined }; - if (numberOfRequestedSlaves < 1 || numberOfRequestedSlaves > 12) throw new Error(`The number of app-slaves requested was: ${numberOfRequestedSlaves}. The supported number of Test Sessions is from 1-12 inclusive.`); + if (numberOfRequestedEmissaries < 1 || numberOfRequestedEmissaries > 12) throw new Error(`The number of app-emissaries requested was: ${numberOfRequestedEmissaries}. The supported number of Test Sessions is from 1-12 inclusive.`); // timeout in axios is for response times only, if the end-point is down, it will still take a long time. So we just wrap the actual request. const http = axios.create({ /* default is 0 (no timeout) */ baseURL: 'http://docker-compose-ui:5000/api/v1', headers: { 'Content-type': 'application/json' } }); - const promisedResponse = http.put('/services', { service: 'zap', project: 'app-slave', num: numberOfRequestedSlaves }); + const promisedResponse = http.put('/services', { service: 'zap', project: 'app-emissary', num: numberOfRequestedEmissaries }); const resolved = await promiseAllTimeout([promisedResponse], s2ProvisioningTimeout); - !resolved[0] && (result.error = 'Timeout exceeded: App Slave container(s) took too long to start. Although they timed out, they may have still started. Also check that docker-compose-ui is up.'); + !resolved[0] && (result.error = 'Timeout exceeded: App Emissary container(s) took too long to start. Although they timed out, they may have still started. Also check that docker-compose-ui is up.'); result.items = dTOItems.map((cV, i) => { const itemClone = { ...cV }; - itemClone.appSlaveContainerName = `appslave_zap_${i + 1}`; + itemClone.appEmissaryContainerName = `appemissary_zap_${i + 1}`; return itemClone; }); return result; }; -exports.provisionAppSlaves = async (event, context) => { // eslint-disable-line no-unused-vars +exports.provisionAppEmissaries = async (event, context) => { // eslint-disable-line no-unused-vars internals.s2ProvisioningTimeout = process.env.S2_PROVISIONING_TIMEOUT * 1000; const { provisionViaLambdaDto: { items } } = event; - const { deploySlaves, printEnv } = internals; + const { deployEmissaries, printEnv } = internals; printEnv(); - const result = await deploySlaves(items); + const result = await deployEmissaries(items); const response = { // 'statusCode': 200, diff --git a/local/app-slave-provisioner/package-lock.json b/local/app-emissary-provisioner/package-lock.json similarity index 99% rename from local/app-slave-provisioner/package-lock.json rename to local/app-emissary-provisioner/package-lock.json index 2723178..f95cec7 100644 --- a/local/app-slave-provisioner/package-lock.json +++ b/local/app-emissary-provisioner/package-lock.json @@ -1,6 +1,6 @@ { - "name": "app-slave-provisioner", - "version": "0.0.0", + "name": "app-emissary-provisioner", + "version": "0.1.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -260,9 +260,9 @@ "dev": true }, "axios": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.0.tgz", - "integrity": "sha512-fmkJBknJKoZwem3/IKSSLpkdNXZeBu5Q7GA/aRsr2btgrptmSCxi2oFjZHqGdK9DoTil9PIHlPIZw2EcRJXRvw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", "requires": { "follow-redirects": "^1.10.0" } @@ -756,9 +756,9 @@ } }, "follow-redirects": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", - "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==" + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", + "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==" }, "function-bind": { "version": "1.1.1", @@ -1006,10 +1006,9 @@ "dev": true }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "inquirer": { "version": "0.12.0", diff --git a/local/app-slave-provisioner/package.json b/local/app-emissary-provisioner/package.json similarity index 71% rename from local/app-slave-provisioner/package.json rename to local/app-emissary-provisioner/package.json index bed2669..ba7f60c 100644 --- a/local/app-slave-provisioner/package.json +++ b/local/app-emissary-provisioner/package.json @@ -1,13 +1,13 @@ { - "name": "app-slave-provisioner", + "name": "app-emissary-provisioner", "version": "0.1.0-alpha.1", - "description": "purpleteam app-slave provisioner for local environment", + "description": "purpleteam app-emissary provisioner for local environment", "main": "index.js", "repository": "https://github.com/purpleteam-labs/purpleteam-lambda", "author": "Kim Carter", "license": "AGPL-3.0-only", "dependencies": { - "axios": "^0.21.0" + "axios": "^0.21.1" }, "scripts": { "deps": "npm-check", diff --git a/local/env.json b/local/env.json index dbc9059..8d468d1 100644 --- a/local/env.json +++ b/local/env.json @@ -3,7 +3,7 @@ "NODE_ENV": "local", "S2_PROVISIONING_TIMEOUT": 4 }, - "provisionAppSlaves": { + "provisionAppEmissaries": { "NODE_ENV": "local", "S2_PROVISIONING_TIMEOUT": 4 }, diff --git a/local/s2-deprovisioner/package-lock.json b/local/s2-deprovisioner/package-lock.json index 2bb90cf..021fb24 100644 --- a/local/s2-deprovisioner/package-lock.json +++ b/local/s2-deprovisioner/package-lock.json @@ -1,6 +1,6 @@ { "name": "s2-deprovisioner", - "version": "0.0.0", + "version": "0.1.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -243,9 +243,9 @@ "dev": true }, "axios": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.0.tgz", - "integrity": "sha512-fmkJBknJKoZwem3/IKSSLpkdNXZeBu5Q7GA/aRsr2btgrptmSCxi2oFjZHqGdK9DoTil9PIHlPIZw2EcRJXRvw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", "requires": { "follow-redirects": "^1.10.0" } @@ -748,9 +748,9 @@ } }, "follow-redirects": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", - "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==" + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", + "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==" }, "function-bind": { "version": "1.1.1", @@ -998,10 +998,9 @@ "dev": true }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "inquirer": { "version": "0.12.0", diff --git a/local/s2-deprovisioner/package.json b/local/s2-deprovisioner/package.json index 003e815..0d75140 100644 --- a/local/s2-deprovisioner/package.json +++ b/local/s2-deprovisioner/package.json @@ -7,7 +7,7 @@ "author": "Kim Carter", "license": "AGPL-3.0-only", "dependencies": { - "axios": "^0.21.0" + "axios": "^0.21.1" }, "scripts": { "deps": "npm-check", diff --git a/local/selenium-standalone-provisioner/package-lock.json b/local/selenium-standalone-provisioner/package-lock.json index 3748549..3859d3f 100644 --- a/local/selenium-standalone-provisioner/package-lock.json +++ b/local/selenium-standalone-provisioner/package-lock.json @@ -1,6 +1,6 @@ { "name": "selenium-standalone-provisioner", - "version": "0.0.0", + "version": "0.1.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -243,9 +243,9 @@ "dev": true }, "axios": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.0.tgz", - "integrity": "sha512-fmkJBknJKoZwem3/IKSSLpkdNXZeBu5Q7GA/aRsr2btgrptmSCxi2oFjZHqGdK9DoTil9PIHlPIZw2EcRJXRvw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", "requires": { "follow-redirects": "^1.10.0" } @@ -748,9 +748,9 @@ } }, "follow-redirects": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", - "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==" + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", + "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==" }, "function-bind": { "version": "1.1.1", @@ -998,10 +998,9 @@ "dev": true }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "inquirer": { "version": "0.12.0", diff --git a/local/selenium-standalone-provisioner/package.json b/local/selenium-standalone-provisioner/package.json index 6dab479..4e9be88 100644 --- a/local/selenium-standalone-provisioner/package.json +++ b/local/selenium-standalone-provisioner/package.json @@ -7,7 +7,7 @@ "author": "Kim Carter", "license": "AGPL-3.0-only", "dependencies": { - "axios": "^0.21.0" + "axios": "^0.21.1" }, "scripts": { "deps": "npm-check", diff --git a/package-lock.json b/package-lock.json index 520ec61..7797e15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "purpleteam-lambda", - "version": "0.0.0", + "version": "0.1.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1771,7 +1771,8 @@ "ini": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true }, "is-arrayish": { "version": "0.2.1", diff --git a/package.json b/package.json index 14b239a..d736445 100644 --- a/package.json +++ b/package.json @@ -12,16 +12,16 @@ "deps": "npm-check", "update:deps": "npm-check -u", "//": " --- Cloud Build --- ", - "cloud:reinstall": "cd cloud/app-slave-provisioner/ && rm -rf node_modules/ && npm install", + "cloud:reinstall": "cd cloud/app-emissary-provisioner/ && rm -rf node_modules/ && npm install", "mkCloudDistDir": "mkdir -p cloudDist", "//": " --- Cloud Build - S2 Containers Up --- ", - "build:appSlaveProvisionerPackage": "npm run mkCloudDistDir && cd cloud/app-slave-provisioner/ && zip -r ../../cloudDist/app-slave-provisioner.zip . -x out.txt", - "build:serverSlaveProvisionerPackage": "npm run mkCloudDistDir ", - "build:tlsSlaveProvisionerPackage": "npm run mkCloudDistDir ", - "build:slaveProvisionerDeploymentPackages": "npm run build:appSlaveProvisionerPackage && npm run build:serverSlaveProvisionerPackage && npm run build:tlsSlaveProvisionerPackage", + "build:appEmissaryProvisionerPackage": "npm run mkCloudDistDir && cd cloud/app-emissary-provisioner/ && zip -r ../../cloudDist/app-emissary-provisioner.zip . -x out.txt", + "build:serverEmissaryProvisionerPackage": "npm run mkCloudDistDir ", + "build:tlsEmissaryProvisionerPackage": "npm run mkCloudDistDir ", + "build:emissaryProvisionerDeploymentPackages": "npm run build:appEmissaryProvisionerPackage && npm run build:serverEmissaryProvisionerPackage && npm run build:tlsEmissaryProvisionerPackage", "//": " --- Cloud Build - S2 Containers Down --- ", "build:s2DeprovisionerPackage": "npm run mkCloudDistDir && cd cloud/s2-deprovisioner/ && zip -r ../../cloudDist/s2-deprovisioner.zip . -x out.txt", - "build:slaveDeprovisionerDeploymentPackage": "npm run build:s2DeprovisionerPackage" + "build:emissaryDeprovisionerDeploymentPackage": "npm run build:s2DeprovisionerPackage" }, "pre-commit": [ "lint" diff --git a/template.yaml b/template.yaml index 223cba8..e109b31 100644 --- a/template.yaml +++ b/template.yaml @@ -1,6 +1,6 @@ AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 -Description: Starts the test slaves. +Description: Starts the test emissaries. # More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst Globals: @@ -13,11 +13,11 @@ Globals: Resources: - provisionAppSlaves: + provisionAppEmissaries: Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction Properties: - CodeUri: local/app-slave-provisioner - Handler: index.provisionAppSlaves + CodeUri: local/app-emissary-provisioner + Handler: index.provisionAppEmissaries Runtime: nodejs12.x provisionSeleniumStandalones: @@ -36,13 +36,13 @@ Resources: Outputs: - provisionAppSlaves: - Description: "Provision App Slaves Lambda Function ARN" - Value: !GetAtt provisionAppSlaves.Arn + provisionAppEmissaries: + Description: "Provision App Emissaries Lambda Function ARN" + Value: !GetAtt provisionAppEmissaries.Arn - provisionAppSlavesIamRole: - Description: "Implicit IAM Role created for Provision App Slaves function" - Value: !GetAtt provisionAppSlavesRole.Arn + provisionAppEmissariesIamRole: + Description: "Implicit IAM Role created for Provision App Emissaries function" + Value: !GetAtt provisionAppEmissariesRole.Arn provisionSeleniumStandalones: Description: "Provision Selenium Standalones Lambda Function ARN"