Sign inSign up

checkpoint/spectral-gitlab-scanner

By checkpoint

Updated about 3 years ago

Run the Spectral GitLab scanner in a container

Image
0

4.3K

checkpoint/spectral-gitlab-scanner repository overview

Spectral GitLab Scanner

Spectral helps you monitor, classify and protect your code, assets and infrastructure for exposed API keys, tokens, credentials and high-risk security misconfigurations in a simple way, without noise. This image helps you run the Spectral Gitlab scanner in a container. Before you run this image you should follow the instructions in SpectralOps -> Sources -> Spectral Gitlab Bot to create the appropriate webhooks for your projects.

Usage

To run the image you'll need to supply it with some environment variables. Here's an example .env file:

SPECTRAL_DSN=https://spu-12345@SPECTRAL_OPS_DOMAIN # Your Spectral DSN, grab it from SpectralOps->Settings->Organization->DSN
GITLAB_WEBHOOK_SECRET=123 # The webhook secret you set in the Gitlab Webhook
GITLAB_TOKEN=glpat-123456 # The api token you created in Gitlab (needs to have the "api" scope)
STRICT_MODE=false # If set to `true`, check status is based on all issues found in the modified files (even if the issues are old)
SELF_HOSTED_GITLAB_DOMAIN=https://my-gitlab-domain.com # if you're running a self-hosted Gitlab provide the domain here. eg. https://my-gitlab-domain.com

We recommend using teller to inject the environment variables from you variables source (vault).

After you have your .env file set - you can run the container: docker run -p 8080:8080 --env-file .env checkpoint/spectral-gitlab-scanner

The endpoint that you should put in the Gitlab webhook URL is https://my-container-domain/gitlab/webhook

Tag summary

Content type

Image

Digest

sha256:c5947ea95

Size

123 MB

Last updated

about 3 years ago

docker pull checkpoint/spectral-gitlab-scanner