aquasecurity / cloudsploit

Cloud Security Posture Management (CSPM)
https://cloud.aquasec.com/signup
GNU General Public License v3.0
3.35k stars 673 forks source link

./index.js execution issue #516

Open PuneethRaya opened 3 years ago

PuneethRaya commented 3 years ago

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

abernalsec commented 3 years ago

Is there any error message you have?

TheMacStack commented 3 years ago

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

abernalsec commented 3 years ago

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

Chris-Pr commented 2 years ago

same issue as OP.

Chris-Pr commented 2 years ago

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."