The TigerGate CLI runs every code scanner (SAST, SCA, secrets, quality, IaC, and container image), uploads the results, evaluates your quality gate, and exits with a meaningful status code. It’s the same tool the CI snippets call.
The CLI is distributed as the Docker image tigergate/tigergate-cli, published multi-arch (linux/amd64, linux/arm64) to Docker Hub. The image ships with every scan engine pre-baked, so there’s nothing to provision on your runners. Its entrypoint is tigergate, so the command after the image name (scan, gate, …) is a subcommand.

Run it

docker run --rm \
  -e TIGERGATE_API_KEY \
  -v "$PWD:/workspace" -w /workspace \
  tigergate/tigergate-cli:latest \
  scan --type all --upload
Pin a version for deterministic builds. Each release publishes an exact :<version> tag plus a moving :latest — there is no floating major.minor tag:
# exact version pin (reproducible builds)
tigergate/tigergate-cli:1.0.0
# or track the newest release
tigergate/tigergate-cli:latest
When you use the image as a CI image: (GitLab, CircleCI) the binary on PATH is tigergate:
image: tigergate/tigergate-cli:latest
script:
  - tigergate scan --type all --upload

Authentication

Create a CI/CD key under Settings → Organization → API Keys → CI/CD Keys (prefix tgci_) — see API keys. Pass it as an env var (preferred — keeps it out of ps and shell history) or with --api-key:
export TIGERGATE_API_KEY=tgci_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Region

The CLI talks to one TigerGate region, and tgci_ keys are region-scoped — a key issued in one region is rejected by every other. --region is a persistent flag, so it works on every subcommand and on either side of it:
docker run --rm -e TIGERGATE_API_KEY \
  -v "$PWD:/workspace" -w /workspace \
  tigergate/tigergate-cli:latest \
  --region <code> scan --type all --upload
Equivalently, set TIGERGATE_REGION in the runner’s environment, or commit region: <code> to .tigergate.yml so the whole repo agrees. Run tigergate regions to list the codes. Resolution order is --api-url / TIGERGATE_API_URL, then --region, then TIGERGATE_REGION, then .tigergate.yml, then us1. An explicit URL always wins — that’s the self-hosted and staging path — and pairing it with a region just logs one line saying the region was ignored. An unknown region code fails the run instead of falling back.
Omit all of it and you get us1, silently. Nothing changes for pipelines that never mentioned a region.

Subcommands

CommandWhat it does
scanRun the scanners (SAST + SCA + secrets + quality + IaC, plus image when --image is set), upload, and evaluate the gate.
gateRe-check the quality-gate verdict for an existing scan run (--scan-id).
uploadUpload a third-party result file (SARIF, CycloneDX, Trivy, Grype, or JUnit).
code-reviewRun an AI review of the current PR/MR diff on your own LLM key and post inline comments. See AI Code Review.
complianceRun the SDLC posture scan and upload the supply-chain / repository-hardening scores.
initScaffold a .tigergate.yml config file with sensible defaults.

scan

The default --type all runs SAST + SCA + secrets + quality + IaC in one pass, and also runs the container-image scan whenever --image is set.
docker run --rm -e TIGERGATE_API_KEY -v "$PWD:/workspace" -w /workspace \
  tigergate/tigergate-cli:latest \
  scan --type all --upload

scan flags

SCOPE & TYPE
  --type            sast | sca | secrets | quality | iac | image | all   (default all)
                    "all" = SAST + SCA + secrets + quality + IaC, plus the
                    image scan when --image is set
  --scan-scope      diff (changed code) | full (whole repo) | auto         (default auto)
  --exclude         comma-separated paths to skip, e.g. "node_modules,dist,vendor"

MONOREPO COMPONENTS  (see Quality gates -> Monorepos)
  --component            component this build owns, e.g. "web"          [env TG_COMPONENT]
                         resolves that component's quality gate and posts its own
                         "TigerGate Security (web)" status check
  --component-path       comma-separated paths the component owns,      [env TG_COMPONENT_PATH]
                         e.g. "apps/web,libs/shared" - findings outside are dropped
  --skip-untouched       on a PR build, exit 0 without scanning when the PR changes
                         no file the component owns          (default true; =false to
                         always scan, for nightly / post-merge jobs)

QUALITY GATE  (exit non-zero to block the merge)
  --quality-gate    run the gate check                    (default true; =false to never block)
  --fail-on         severities that fail the build         (default critical,high)
  --max-critical    max new critical allowed   (-1 = use org default)
  --max-high        max new high allowed        (-1 = use org default)

SCA / SAST
  --sca-ignore-unfixed   skip vulnerabilities with no fix available
  --sast-rules           override the SAST rule packs (empty = dashboard config)

COVERAGE & QUALITY
  --coverage-report      lcov | cobertura | jacoco | go-cover report path
  --coverage-html        HTML coverage report (uploaded as a downloadable artifact)

SDLC COMPLIANCE  (supply-chain / repo hygiene)
  --compliance           run the SDLC posture scan + upload scores
  --compliance-local     filesystem-only SDLC scan (no GitHub API/token)

CONTAINER / CODE → CLOUD
  --image                image to scan (also runs inside --type all when set)
  --image-digest         sha256 digest of the built image (code → cloud join key;
                         auto-resolved from --image when omitted)   [env TG_IMAGE_DIGEST]
  --deploy-target        cluster / service / region being deployed   [env TG_DEPLOY_TARGET]
  --environment          production | staging | dev                  [env TG_ENVIRONMENT]

PLUMBING
  --upload               send results to TigerGate          (default true)
  --no-auto-install      do not auto-install scanner tools (expect them on PATH)
  --api-key              defaults to $TIGERGATE_API_KEY
  --region               TigerGate region owning your org       [env TIGERGATE_REGION]
                         persistent flag; omit for us1
  --api-url              explicit platform API base — overrides --region;
                         self-hosted / staging only             [env TIGERGATE_API_URL]
See Code → cloud tracking for the build/deploy metadata flags and how findings link to the running cloud asset.

gate

Re-evaluate the quality gate for a scan you already uploaded — useful as a separate pipeline stage after a report-only scan:
docker run --rm -e TIGERGATE_API_KEY \
  tigergate/tigergate-cli:latest \
  gate --scan-id <scan-run-id>

upload

Bring results from a third-party scanner into TigerGate:
docker run --rm -e TIGERGATE_API_KEY -v "$PWD:/workspace" -w /workspace \
  tigergate/tigergate-cli:latest \
  upload --file results.sarif --format sarif
--format accepts sarif, cyclonedx, trivy, grype, junit, or auto (detect from file content).

Monorepo components

--component selects which quality gate applies and names the PR status check (TigerGate Security (web)). --component-path decides which findings count and whether the component cares about the PR at all. Paths resolve from the first source that supplies them:
  1. --component-path (or TG_COMPONENT_PATH)
  2. component_paths in .tigergate.yml
  3. Component paths stored on that component’s quality gate in the dashboard
  4. the --component value itself, when it names an existing directory
--component on its own does not scope findings and does not enable the untouched-component skip — both require resolved paths. Always supply paths too.
With --skip-untouched (on by default), a PR that changes no file the component owns ends the run early: exit 0, no scan run created, nothing uploaded, and a passing status posted for that component so a required check never hangs. Detection fails open — when the base-branch diff can’t be computed the component is scanned rather than skipped. Full behaviour: Monorepos.

Exit codes

CodeMeaning
0Scan completed and the gate passed (or --quality-gate=false), or the component was skipped as untouched
non-zeroGate failed (a finding matched --fail-on) or the scan errored

GitHub Actions outputs

When GITHUB_OUTPUT is set the scan command writes these outputs for later steps:
OutputNotes
scan-idScan run ID. Empty when a component was skipped as untouched (no run is created)
statuspassed, failed, error, or skipped for an untouched component
findings-urlDashboard link for the run. Empty on a skip
total-findings · critical-count · high-countSeverity tallies. All 0 on a skip

Environment variables

VariablePurpose
TIGERGATE_API_KEYAPI key (preferred over --api-key)
TIGERGATE_API_URLOverride the platform API base URL
TIGERGATE_SCAN_SCOPESets the scan scope (diff / full / auto) when --scan-scope is left at its default
TG_COMPONENTMonorepo component this build owns (same as --component)
TG_COMPONENT_PATHComma-separated paths the component owns (same as --component-path)
TG_IMAGE_DIGEST / DOCKER_IMAGE_DIGESTsha256 digest of the built image (code → cloud)
TG_DEPLOY_TARGETDeployment target for code → cloud linking
TG_ENVIRONMENT / ENVIRONMENTDeployment environment
TG_LLM_TOKEN / TG_LLM_MODEL / TG_LLM_PROVIDER / TG_LLM_URLBYO-model credential for code-review
GITHUB_TOKEN / GH_TOKEN / SCORECARD_GITHUB_TOKENGitHub token for compliance (SDLC posture scan)
GITHUB_* / CI_* / BITBUCKET_* / BUILD_*Auto-read for branch / PR / commit context