Categorygithub.com/adevinta/vulcan-scan-engine

# README

vulcan-scan-engine

Component that allows to run, monitor and query the status of a scan.

The the component exposes endpoints:

  1. [POST] /v1/scans

    Creates a new scan. See swagger spec.

  2. [GET] /v1/scans/{scan_id}

    Gets the status of a scan. See swagger spec.

  3. [GET] /v1/scans?external_id={id}&offset={offset}&limit={limit}

    Gets the list of scans ordered by descending creation time. External ID param is optional, if set lists only the scans for that external ID. Offset and limit parameters are optional, if not set, all results are returned. See swagger spec.

  4. [GET] /v1/scans/{scan_id}/checks

    Gets the checks for a scan. See swagger spec.

  5. [GET] /v1/scans/{scan_id}/stats

    Gets the check stats for a scan. See swagger spec.

  6. [POST] /v1/scans/{scan_id}/abort

    Aborts a scan. See swagger spec.

  7. [GET] /v1/checks/{check_id}

    Gets a check by its ID. See swagger spec.

For running the component locally, clone and run at the root of the repo the following:

go install ./...
source db/postgres-start.sh
vulcan-scan-engine -c ../_resources/config/local.toml

Docker execute

Those are the variables you have to use:

VariableDescriptionSample
PORT8081
LOG_LEVELerror
PG_HOSTlocalhost
PG_NAMEscan-enginedb
PG_USERvulcan
PG_PASSWORDvulcan
PG_PORT5432
PG_SSLMODEOne of these (disable,allow,prefer,require,verify-ca,verify-full)disable
PG_CA_B64A base64 encoded ca certificate
PERSISTENCE_HOSTpersistence.vulcan.com
PERSISTENCE_CACHECache persistence request for seconds120
CHECKS_SQS_ARNARN for the checks creation queuearn:aws:sqs:xxx:123456789012:yyy
AWS_SQS_ENDPOINTEndpoint for SQS creation queue (optional)http://custom-aws-endpoint
CHECKS_SQS_PROCESSORSNumber of workers processing check updates8
CHECKS_SQS_INTERVAL10
CHECKS_SQS_WAIT20
CHECKS_SQS_TIMEOUT30
SCANS_SNS_ARNARN for the scans notification topicarn:aws:sns:xxx:123456789012:yyy
CHECKS_SNS_ARNARN for the checks status notification topicarn:aws:sns:xxx:123456789012:yyy
AWS_SNS_ENDPOINTEndpoint for SNS topic (optional)http://custom-aws-endpoint
CHECKS_CREATOR_WORKERSNumber of workers to run for checks creation
CHECKS_CREATOR_PERIODPeriod (seconds) for which workers should look for checks pending to be created
CHECKS_CREATOR_CHECKPOINTNumber of checks created before saving the state in the scan100
QUEUES_DEFAULT_ARNDefault checks queue ARNarn:aws:sqs:xxx:123456789012:yyy
QUEUES_NESSUS_ARNNessus checks ARN TO BE DEPRECATEDarn:aws:sqs:xxx:123456789012:yyy
QUEUES_NESSUS_CHECKTYPESList of checks to create in nessus queue TO BE DEPRECATED["vulcan-nessus"]
QUEUES_1_ARNchecks ARNarn:aws:sqs:xxx:123456789012:yyy
QUEUES_1_CHECKTYPESList of checks to create in this queue["vulcan-checktype1"]
QUEUES_2_ARNNessus checks ARNarn:aws:sqs:xxx:123456789012:yyy
QUEUES_2_CHECKTYPESList of checks to create in this queue["vulcan-checktype2","vulcan-checktype3"]
docker build . -t vse

# Use the default config.toml customized with env variables.
docker run --env-file ./local.env vse

# Use custom config.toml
docker run -v `pwd`/custom.toml:/app/config.toml vse

# Packages

No description provided by the author
No description provided by the author