Skip to content

Latest commit

 

History

History
 
 

README.md

Scan Queue

This directory contains the Python source and Docker file for Tracker's scan queue, a Flask app that runs on a Gunicorn server and is deployed as a Knative service.

The scan queue receives scan requests, typically from the auto-scan service, and enqueues them in one of three Redis queues depending on the scan type. Workers then asynchronously dispatch requests to the appropriate scanners. The docker-entrypoint.sh script is responsible for starting the Redis server and RQ workers prior to launching the Flask app and its Gunicorn server, as they must be running in the background for the queue to function.

The manifest defining the Knative service can be found here.

Installing Dependencies

To install dependencies, you can use pip or pipenv. Pipenv is recommended for development.

To install with pip:

pip3 install -r requirements.txt

With pipenv:

pipenv install

Pipenv will pick up requirements.txt automatically so long as it doesn't find a pipfile.

Environment

The queue expects to find the following environment variables:

HTTPS_URL=https_scanner_url
SSL_URL=ssl_scanner_url
DNS_URL=dns_scanner_url