Skip to content
sentrasec

CLI reference

Commands, flags and exit codes for the sentrasec binary.

The full reference, every flag, every output format, lives at cli.sentrasec.ai. This page covers the commands you will use most.

Installation

curl -fsSL https://cli.sentrasec.ai/install.sh | bash

Windows, in PowerShell:

irm https://cli.sentrasec.ai/install.ps1 | iex

Commands

CommandPurpose
sentrasec loginAuthenticate against a workspace
sentrasec initCreate sentrasec.yaml in the current directory
sentrasec scanScan a path with applicable scanners
sentrasec dastActive scan against a running URL
sentrasec k8sAudit a Kubernetes cluster
sentrasec triageReview and act on findings from the terminal
sentrasec explainExplain a finding, rule, CVE or CWE
sentrasec autofixGenerate fix proposals
sentrasec complianceProduce control evidence
sentrasec certIssue or verify a pentest certificate
sentrasec mcpStart the MCP server

Every command supports --help.

sentrasec login

sentrasec login
sentrasec login --token $SENTRASEC_TOKEN

Interactive login opens a browser. In CI, set SENTRASEC_TOKEN instead.

sentrasec scan

sentrasec scan .
sentrasec scan ./services/api --scanners sast,sca
sentrasec scan . --severity high --format sarif > results.sarif
sentrasec scan . --since origin/main
FlagEffect
--scannersComma-separated scanner list
--severityMinimum severity to report
--formattext, json or sarif
--sinceRestrict to files changed since a git ref
--appAssociate results with a workspace app

sentrasec dast

sentrasec dast https://staging.example.com
sentrasec dast https://staging.example.com --auth-header "Authorization: Bearer $TOKEN"

Only scan systems you are authorised to test.

sentrasec explain

sentrasec explain CVE-2024-1234
sentrasec explain CWE-89
sentrasec explain --finding fnd_01h8x9

Answers come from the knowledge graph with the traversal that produced them, so an explanation can be checked rather than taken on trust.

sentrasec triage

sentrasec triage
sentrasec triage --severity critical

An interactive review of open findings. Decisions recorded here, including downgrades and accepted risk, carry their reasoning into the workspace audit trail.

Exit codes

CodeMeaning
0Completed, nothing above threshold
1Findings above threshold
2Error