cloudsploit icon indicating copy to clipboard operation
cloudsploit copied to clipboard

./index.js execution issue

Open PuneethRaya opened this issue 5 years ago • 5 comments

Hi Team,

Build Cloudsploit in Ubuntu Server and trying to execute the scan for our AWS account.

I have copied the config file and hardcoded my secret key and access key in config.js file as follows, but looks like my credentails is not recognizing by cloudsploit.

Please let me know if i misconfigured anything here or need any additional configurations.

CloudSploit config file

module.exports = { credentials: { aws: { // OPTION 1: If using a credential JSON file, enter the path below // credential_file: '/path/to/file.json', // OPTION 2: If using hard-coded credentials, enter them below access_key: process.env.AWS_ACCESS_KEY_ID || '***********', secret_access_key: process.env.AWS_SECRET_ACCESS_KEY || '', // session_token: process.env.AWS_SESSION_TOKEN || '', // plugins_remediate: ['bucketEncryptionInTransit']

image

PuneethRaya avatar Jan 27 '21 10:01 PuneethRaya

Is there any error message you have?

abernalsec avatar Feb 07 '21 00:02 abernalsec

Facing the same issue, I am trying to use this with GCP creds either from an env var or from key.json file but always with the same result as above when running via the ./index.js

TheMacStack avatar Feb 17 '21 20:02 TheMacStack

Did you do a "npm install" before running index.js?

abernalsec avatar Feb 18 '21 15:02 abernalsec

same issue as OP.

Chris-Pr avatar Nov 23 '21 01:11 Chris-Pr

Full path is required for the config.js switch option.

eg ./index.js --ignore-ok --config /home/user/cloudsploit/config.js

also the cred file linked via the config.js requires the .json extension or also will not load. Youll recieve error " The credential file could not be loaded."

Chris-Pr avatar Nov 23 '21 01:11 Chris-Pr