Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error loading config file #498

Open
danilocasabona opened this issue Jan 15, 2021 · 11 comments
Open

Error loading config file #498

danilocasabona opened this issue Jan 15, 2021 · 11 comments

Comments

@danilocasabona
Copy link

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.

@michael-malenkov
Copy link
Contributor

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

@righteousgambit
Copy link

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

@michael-malenkov
Copy link
Contributor

michael-malenkov commented Jan 26, 2021

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)

@danilocasabona
Copy link
Author

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

@hxhBrofessor
Copy link

i'm getting the same error as well

@hxhBrofessor
Copy link

// 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']
}
}
};

@bestrocker221
Copy link

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

@ghost
Copy link

ghost commented Mar 13, 2021

Same

@artschu23
Copy link

artschu23 commented Apr 20, 2021

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

@RahulRaval28
Copy link

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)

Can You Elaborate Why We have to Specify The Absolute Path ??

@blackbrownco
Copy link

i have specified a hardcoded alibaba AK and ASK but got this error:
ERROR: Config file does not contain any valid credential configs.

Also, i tried to point where config.json of alibaba cloud account stored also got this error:
`INFO: Using CloudSploit config file: /home/altodia/Tools/cloudsploit/config.js
INFO: Skipping AWS pagination mode
INFO: Determining API calls to make...
INFO: Found 37 API calls to make for alibaba plugins
INFO: Collecting metadata. This may take several minutes...
/home/altodia/Tools/cloudsploit/node_modules/ali-oss/lib/common/client/initOptions.js:24
throw new Error('require accessKeyId, accessKeySecret');
^

Error: require accessKeyId, accessKeySecret
at module.exports (/home/altodia/Tools/cloudsploit/node_modules/ali-oss/lib/common/client/initOptions.js:24:11)
at Function.initOptions (/home/altodia/Tools/cloudsploit/node_modules/ali-oss/lib/client.js:60:10)
at new Client (/home/altodia/Tools/cloudsploit/node_modules/ali-oss/lib/client.js:33:27)
at module.exports [as listBuckets] (/home/altodia/Tools/cloudsploit/collectors/alibaba/oss/listBuckets.js:6:19)
at /home/altodia/Tools/cloudsploit/collectors/alibaba/collector.js:372:54
at /home/altodia/Tools/cloudsploit/node_modules/async/dist/async.js:3113:16
at replenish (/home/altodia/Tools/cloudsploit/node_modules/async/dist/async.js:1014:17)
at /home/altodia/Tools/cloudsploit/node_modules/async/dist/async.js:1019:9
at Object.eachLimit$1 (/home/altodia/Tools/cloudsploit/node_modules/async/dist/async.js:3199:24)
at /home/altodia/Tools/cloudsploit/collectors/alibaba/collector.js:363:19

Node.js v20.17.0
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants