cloudsploit icon indicating copy to clipboard operation
cloudsploit copied to clipboard

Error loading config file

Open danilocasabona opened this issue 4 years ago • 11 comments

INFO: Using CloudSploit config file: config.js ERROR: Config file could not be loaded. Please ensure you have copied the config_example.js file to config.js

Does someone knows why I am unable to load the config.js file? I did all the steps listed in the instructions.

danilocasabona avatar Jan 15 '21 19:01 danilocasabona

It seems that it requires an absolute path to the config file, probably depends on system and setup and providing an absolute path to the config.js works 100% of times

michael-malenkov avatar Jan 25 '21 18:01 michael-malenkov

It seems that it requires an absolute path to the config file, probably depends on system and setup and providing an absolute path to the config.js works 100% of times

I have set absolute path running Node on Windows and it will not load the config file. Not sure what the issue is there...

righteousgambit avatar Jan 25 '21 19:01 righteousgambit

Hm, I just ran on both Mac and Windows and both worked. Make sure you specifying an absolute path in command-line/terminal. On Mac/Linux it's $./ingex.js --config /absolute/path/to/config.js On Windows: node ingex.js --config /absolute/path/to/config.js

2021-01-25 (3)

michael-malenkov avatar Jan 26 '21 03:01 michael-malenkov

I did set the absolute path to config file, but still not working... Captura de Tela 2021-01-26 às 13 03 16

danilocasabona avatar Jan 26 '21 16:01 danilocasabona

i'm getting the same error as well

hxhBrofessor avatar Feb 17 '21 02:02 hxhBrofessor

// CloudSploit config file

module.exports = { credentials: { aws: { // OPTION 1: If using a credential JSON file, enter the path below credential_file: '~/.aws/cSploit.js' // 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'] }
} };

hxhBrofessor avatar Feb 17 '21 02:02 hxhBrofessor

Getting the same error, on arch linux. pointing the credential_file to a json as specified by the README, and still getting error.

Result? I can't use the tool

bestrocker221 avatar Mar 02 '21 09:03 bestrocker221

Same

ghost avatar Mar 13 '21 01:03 ghost

Hm, I just ran on both Mac and Windows and both worked. Make sure you specifying an absolute path in command-line/terminal. On Mac/Linux it's $./ingex.js --config /absolute/path/to/config.js On Windows: node ingex.js --config /absolute/path/to/config.js

2021-01-25 (3)

This works for me, thanks.

from $ ./index.js --config=config.js to $ ./index.js --config=$(pwd)/config.js

artschu23 avatar Apr 20 '21 08:04 artschu23