Skip to content

Command reference ​

Every command and option in DL Sentinel 0.1.0, with the config file keys, server settings, output formats and exit codes.

Global options ​

OptionWhat it does
--help, -hPrints help. sentinel <command> --help shows help for one command
--version, -VPrints the tool name and version

Progress lines go to stderr, and only when stderr is a terminal and --quiet is not set. Reports go to stdout, so --format json output can be piped to other tools.

Commands at a glance ​

CommandWhat it does
sentinel scan [path]Scans a folder (default .) and prints a report
sentinel baseline [path]Scans and writes a baseline of the current findings
sentinel graph [path]Builds the infrastructure graph
sentinel rulesLists every rule
sentinel pluginsLists what the given plugins would add, without scanning
sentinel report <file>Re-renders a saved JSON report in another format
sentinel versionPrints the tool name and version

sentinel scan ​

bash
sentinel scan [path] [options]
OptionWhat it does
--config <file>Uses this sentinel.yml instead of looking for one in the folder
--format <format>terminal (default), json, markdown or sarif
--output <file>Writes the report to a file instead of the screen
--scanners <ids>Runs only these scanners, comma-separated
--fail-on <severities>Severities that fail the scan this run, comma-separated
--baseline <file>Reports only findings not in this baseline; the exit code follows the new findings
--write-baseline <file>Writes a baseline of this scan after reporting
--plugin <spec>Loads a scanner plugin (file path or package name). Repeatable
--pathsAdds candidate attack paths to the report
--quietHides progress lines and the baseline summary line
--no-colorTurns off colour

Examples:

bash
sentinel scan .
sentinel scan ./project --config sentinel.yml
sentinel scan . --format json --output report.json
sentinel scan . --scanners secrets,dependencies
sentinel scan . --fail-on critical,high
sentinel scan . --baseline .sentinel-baseline.json
sentinel scan . --paths

Scanner ids: secrets, dependencies, source, infra, api, smart-contract, plus the ids of any plugins you load. Severities: critical, high, medium, low, info. An unknown id or severity is a usage error (exit 64).

sentinel baseline ​

bash
sentinel baseline [path] [options]
OptionWhat it does
--config <file>Uses this sentinel.yml
--scanners <ids>Runs only these scanners
--output <file>Baseline file to write. Default: .sentinel-baseline.json in the scanned folder
--plugin <spec>Loads a scanner plugin. Repeatable
--quietHides the summary line
--no-colorTurns off colour

Exit codes: 0 when the file is written (whatever was found), 2 on a write error, 64 on a usage error.

sentinel graph ​

bash
sentinel graph [path] [options]

Builds a model of your deployment from Compose files, Kubernetes manifests and Dockerfiles: services, images, volumes, ports, host mounts and privileged containers. It does not apply rules or read sentinel.yml.

OptionWhat it does
--format <format>json (default) or mermaid (a flowchart you can paste into Markdown that renders Mermaid)
--output <file>Writes the graph to a file
bash
sentinel graph . --format mermaid --output infra.mmd

If no infrastructure files are found, a note goes to stderr and an empty graph is still written. That is not an error. Exit codes: 0, 2 write error, 64 usage error.

sentinel rules ​

OptionWhat it does
--format <format>terminal (default) or json
--scanners <ids>Lists only these scanners' rules
--plugin <spec>Also lists a plugin's rules. Repeatable
--no-colorTurns off colour

sentinel plugins ​

OptionWhat it does
--plugin <spec>Plugin to load. Repeatable; at least one is required
--format <format>terminal (default) or json
--no-colorTurns off colour

Listing a plugin imports it, which runs its code. Only use it on plugins you trust. Exit codes: 0, 64 (no --plugin, a spec that cannot be found, or an invalid plugin).

sentinel report ​

bash
sentinel report <file> [options]
OptionWhat it does
--format <format>terminal (default), json, markdown or sarif
--output <file>Writes the result to a file
--no-colorTurns off colour

The input must be a JSON report saved by sentinel scan --format json.

sentinel version ​

OptionWhat it does
--format <format>terminal (default) or json

Output formats ​

FormatContents
terminalCounts per scanner and per severity. No individual findings
markdownA summary table, then every finding with file, line, evidence and recommendation
jsonThe complete report, including every finding field
sarifSARIF 2.1.0, for GitHub code scanning and other tools

In SARIF, critical and high become error, medium becomes warning, and low and info become note.

Exit codes ​

CodeMeaning
0Scan finished and the policy passed
1Findings at a failing severity were found
2Scan or internal error
64Usage error: unknown option, bad config, bad baseline file

sentinel.yml keys ​

KeyDefaultWhat it does
include['**/*']Glob patterns of files to scan
excludethe default listGlob patterns to skip. Replaces the default list when set
maxFileSizeBytes1048576Files larger than this are skipped
scanners.<id>.enabledtrueTurns a scanner on or off
scanners.secrets.allowlist[]Exact strings or rule ids to ignore
scanners.secrets.ignorePaths[]Extra paths for the secrets scanner to skip
scanners.dependencies.dataSourcenonenone, file or osv
scanners.dependencies.advisoryDbPathnullLocal advisory file, for dataSource: file
policy.failOn[critical, high]Severities that make a scan exit 1
suppress[]Suppression entries with rule, scanner, path, id, reason, expires

A plugins key is ignored with a warning: plugins load only with --plugin. See Configure scans for examples and the default exclude list.

Server environment variables ​

VariableDefaultWhat it does
SENTINEL_API_TOKENgenerated and printedThe root admin token
PORT8752Port to listen on
SENTINEL_SCAN_ROOTthe current folderOnly paths inside this folder can be scanned
SENTINEL_DATA_DIR.dl-sentinel/Where reports, schedules, users and the audit log are kept
SENTINEL_SCAN_CONCURRENCY2Scans that run at the same time
SENTINEL_SCHEDULER_INTERVAL_MS15000How often the scheduler checks for due scans
SENTINEL_PLUGINSunsetComma-separated plugin specs. A plugin that fails to load stops the server from starting
SENTINEL_RATE_LIMIT_MAX60Requests allowed per window, per token
SENTINEL_RATE_LIMIT_WINDOW_MS60000Rate-limit window length
SENTINEL_MAX_BODY_BYTES1048576Largest request body accepted

Files ​

FileWhat it is
sentinel.yml or sentinel.yamlScan settings, in the scanned folder
.sentinel-baseline.jsonThe default baseline file
.dl-sentinel/The server's data folder by default. Skipped by scans

Next steps ​