Skip to content
This repository was archived by the owner on Nov 11, 2025. It is now read-only.

Conversation

@turbaszek
Copy link
Member

@turbaszek turbaszek commented Dec 13, 2020

Users can run scanners via scan command:

➜ kibble scan --help
Usage: kibble scan [OPTIONS]

Options:
  -t, --type TEXT     Specific type of scanner to run (default is run all
                      scanners)

  -e, --exclude TEXT  Specific type of scanner(s) to exclude
  -o, --org TEXT      The organisation to gather stats for. If left out, all
                      organisations will be scanned.

  -a, --age TEXT      Minimum age in hours before performing a new scan on an
                      already processed source. --age 12 will not process any
                      source that was processed less than 12 hours ago, but
                      will process new sources.

  -s, --source TEXT   Specific source (wildcard) to run scans on.
  -v, --view TEXT     Specific source view to scan (default is scan all
                      sources)

  --help              Show this message and exit.
➜ docker-compose -f docker-compose-dev.yaml run setup kibble scan
Creating kibble_setup_run ... done
Kibble Scanner starting
Using direct ElasticSearch broker model
Connecting to ElasticSearch database at http://elasticsearch:9200
Connected!
This is a type-less DB, expanding database names instead.
We're using ES >= 7.x, NO DOC_TYPE!
All done scanning for now, found 0 organisations and 0 sources to process.

@github-actions github-actions bot added area:cli CLI related issues area:scanners Scanners related issues labels Dec 13, 2020
@turbaszek turbaszek force-pushed the make-scanners-a-command branch 2 times, most recently from 5d43ca1 to 66c703a Compare December 13, 2020 11:55
@turbaszek turbaszek force-pushed the make-scanners-a-command branch from 66c703a to bfacd1c Compare December 13, 2020 12:04
print("Initialized thread %i" % i)

def run(self):
from kibble.scanners import scanners
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this here to delay import or causes an import cycle?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To delay import, the __init__ in scanners has top level logic which gets executed when importing the module. This is something that can be addressed later

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
@turbaszek turbaszek merged commit f3a4b27 into apache:main Dec 13, 2020
@turbaszek turbaszek deleted the make-scanners-a-command branch December 13, 2020 12:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area:cli CLI related issues area:scanners Scanners related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants