projectdiscovery / cloudlist

Cloudlist is a tool for listing Assets from multiple Cloud Providers.

Home Page:https://projectdiscovery.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warn user for malformed config

olearycrew opened this issue · comments

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

CleanShot 2024-02-08 at 10 40 40

Ideally we'd verify the config file and provider config file in a way that gives a meaningful error to the user.

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

@dogancanbakir that's great thanks!