baude / image-scanner

[Deprecated] Vulnerability scanner for containers and images
GNU Lesser General Public License v2.1
14 stars 8 forks source link

Use positional CLI args #72

Open aweiteka opened 9 years ago

aweiteka commented 9 years ago

I think the CLI could be cleaned up a bit by having a positional argument, images|containers then using the option --all to scan all containers or images. Proposed usage:

usage: image-scanner-remote [-h] [--all] [-s SCAN] [-n NUMBER] [--port PORT]
                            [--host HOST] [-r REMOTE_THREADS]
                            [-p PROFILE | --allprofiles]
                            {images,containers} ...

Scan Utility for Containers

positional arguments:
  {images,containers}
    images              search images
    containers          search containers

optional arguments:
  -h, --help            show this help message and exit
  --all                 search all images or containers
  -s SCAN, --scan SCAN  ID to search
  -n NUMBER, --number NUMBER
                        number of processors to use
  --port PORT           Port for the image-scanner-d
  --host HOST           Host name or IP of the image-scanner-d
  -r REMOTE_THREADS, --remote_threads REMOTE_THREADS
                        The number of remote hosts to scan simultaneously
  -p PROFILE, --profile PROFILE
                        Profile or profiles from the configuration file
  --allprofiles         Run the scanner on all profiles
aweiteka commented 9 years ago

Here's a start at this: https://github.com/aweiteka/image-scanner/commit/218594f848cd5eb8296d49469844a62a298b9801d