Warn user for malformed config
olearycrew opened this issue · comments
Brendan O'Leary commented
When you have a malformed config file (for example a typo in a provider) there isn't any feedback to the user that mentions that. For example I couldn't figure out why my Cloudflare provider wasn't being recognized, and then noticed the typo
Ideally we'd verify the config file and provider config file in a way that gives a meaningful error to the user.
Dogan Can Bakir commented
We warn users if we don't find the given provider in our registry during initialization. Is this something that you're looking for? A thought, we can change the log level 💭
$ cat ~/.config/cloudlist/provider-config.yaml
# #Provider configuration file for cloudlist enumeration agent
- # provider is the name of the provider
provider: od
# # id is the name of the provider id
id: xxxx
# # digitalocean_token is the API key for digitalocean cloud platform
digitalocean_token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
$ go run . -v
_______ _____ __
/ ___/ /__ __ _____/ / (_)__ / /_
/ /__/ / _ \/ // / _ / / (_-</ __/
\___/_/\___/\_,_/\_,_/_/_/___/\__/
projectdiscovery.io
[INF] Current cloudlist version 1.0.7 (latest)
[WRN] Could not initialize provider od xxxx: invalid provider name found: od
Brendan O'Leary commented
@dogancanbakir that's great thanks!