Blacktide
Docs Start free

Blacktide/Docs

Blacktide docs

Start with your own projects on the free plan, or install Enterprise to cover every repository in your GitLab.

Free: your personal projects

Blacktide Free runs on your own machine as one container. It watches the projects in your personal GitLab namespace and scans every push and merge request for secrets (Gitleaks) and code flaws (Semgrep). Group and company projects are covered by Enterprise.

Get a key

Ask for a free licence key with your email, your GitLab address and your GitLab username. The key works for a year with that username only; renewing is free.

Run it

You need Docker and a personal access token of the GitLab user the key is for (GitLab: Preferences → Access tokens). It must not be an administrator's token.

ScopeWhat Blacktide can do
read_api, read_repositoryScan. Needed.
apiAlso comment on commits and merge requests, and open GitLab issues. Without it they show as a preview in Blacktide.
docker run -d --name blacktide --restart unless-stopped \
  -p 8090:8090 -v blacktide:/data \
  -e BLACKTIDE_LICENSE='<your key>' \
  -e BLACKTIDE_GITLAB_TOKEN='<your GitLab token>' \
  ghcr.io/the-reap-er/blacktide:latest

Blacktide checks the key and that the token is yours, then starts watching. Everything, including its database, is in the blacktide volume. For your own GitLab server, the address comes from the key.

Sign in

Run docker logs blacktide: Blacktide prints a private sign-in link for http://localhost:8090. Open it and you're in. The link changes every time the container starts. Running Blacktide on a server for others to reach? Set BLACKTIDE_PUBLIC_URL to its address, or set up Sign in with GitLab.

What gets scanned

ChangeScanResult
First look at a projectGitleaks and Semgrep on its default and protected branchesFindings in Blacktide, a page for each
Push to any branchGitleaks and Semgrep, on the lines the push changedA comment on the commit, and the findings in Blacktide
Merge request opened or updatedThe change, against the target branchOne comment on the merge request with the gate's verdict, edited on every push

When the key expires, scanning pauses and Blacktide says so. Get a new key, set it in BLACKTIDE_LICENSE and restart the container.

Enterprise: install

Blacktide Enterprise runs on one Linux host with Docker, next to GitLab (CE or EE). It keeps its state in Postgres and can run DefectDojo alongside it.

Run it

# creates .env with random secrets
./scripts/gen-env.sh
# set BLACKTIDE_GITLAB_URL in .env, then
docker compose up -d --build
ServiceAddress
Blacktide consolehttp://localhost:8090
DefectDojohttp://localhost:8080
Operator APIhttp://localhost:8090/api/v1

Sign-in with GitLab

In GitLab, go to Admin area → Applications → Add new application:

  • Name: Blacktide. Redirect URI: <BLACKTIDE_PUBLIC_URL>/auth/callback
  • Trusted and confidential, scope read_user only
  • Put the application ID and secret in BLACKTIDE_GITLAB_OAUTH_CLIENT_ID and BLACKTIDE_GITLAB_OAUTH_CLIENT_SECRET, then run docker compose up -d blacktide

Connect GitLab and DefectDojo

Sign in and connect a GitLab token: an instance admin token covers every project, a personal token covers what that person can see. For DefectDojo, create a superuser such as blacktide-sync and put its API key in DEFECTDOJO_API_KEY. Blacktide then mirrors every project into DefectDojo and keeps it in sync.

Scan policy and images

The console walks you through the scan policy (what opens issues and what blocks a merge, per scanner) and the scanner configuration, then builds the two scanner images on your Docker host. A configuration change rebuilds only a thin layer, in seconds; the base images are rebuilt every night with fresh rules and databases.

GitLab CI for every repository

In the console, Settings → GitLab CI → Set everything up (needs an admin token with api) creates the CI token as a masked instance variable, creates the security/devsecops repository with the template, starts a runner tagged blacktide, and adds the include to every repository, as commits or as merge requests:

# .gitlab-ci.yml
include:
  - project: 'security/devsecops'
    file: 'blacktide.gitlab-ci.yml'

The first full scan of a protected branch sets its baseline. From then on, merge request pipelines fail when the gate blocks, pushes without a merge request get advice only, and GitLab's "Pipelines must succeed" is turned on in every covered repository.

Settings

VariableDefaultWhat it does
BLACKTIDE_GITLAB_URL—Your GitLab, as browsers see it
BLACKTIDE_PUBLIC_URL—Blacktide's own address, for sign-in and links
BLACKTIDE_SCAN_WORKERS2Scans that run at once
BLACKTIDE_SCAN_TIMEOUT30mLongest a scan may run
BLACKTIDE_REFRESH_AT03:00When the scanner images are rebuilt
BLACKTIDE_RESCAN_EVERY168hHow often protected branches are rescanned
BLACKTIDE_SECURITY_USERS—GitLab usernames allowed in the dashboard
BLACKTIDE_ENCRYPTION_KEYgeneratedEncrypts tokens at rest. Back it up.

Triage a finding

Every finding has its own page, linked from the comments Blacktide posts. Anyone with the link can read it; to decide, sign in with GitLab.

DecisionWhoMeans
False positiveDeveloperThe scanner is wrong; it isn't a real problem
Out of scopeDeveloperReal, but in test data, examples or code that never ships
Accept the riskMaintainerReal, and not being fixed now, with a reason

Operator API

Enterprise only. Send Authorization: Bearer $BLACKTIDE_API_KEY.

# projects you can scan, and a project's branches and open merge requests
curl -s localhost:8090/api/v1/scans/targets -H "$AUTH"
curl -s localhost:8090/api/v1/scans/projects/42/refs -H "$AUTH"
# scan a branch and a merge request, then read the result
curl -s -X POST localhost:8090/api/v1/scans -H "$AUTH" \
  -d '{"targets":[{"project_id":42,"branch":"main"},{"project_id":42,"mr_iid":7}]}'
curl -s localhost:8090/api/v1/scans/<job_id> -H "$AUTH"

Something missing? Tell us.