Skip to main content

Identity Security is available only with Teleport Enterprise. Start your free trial.

Start your free trial

Investigate Detections from the CLI

Report an Issue

tctl detections lists and inspects the security detections and anomalies that Teleport Identity Security raises across your infrastructure — the same detections shown in the Web UI under Alerts.

Prerequisites​

See Identity Security from the Command Line for the shared prerequisites and how the CLI authenticates to Access Graph. This command requires Access Graph v1.28.0 or later, and Identity Activity Center.

List detections​

By default tctl detections ls shows open (in_progress, triaged) detections from the last 30 days:

tctl detections ls

Filter by status, severity, and source, and widen the window:

tctl detections ls --severity=high --severity=critical --status=in_progress --from=7d

Add --detailed for extra columns, or emit JSON/YAML for automation:

tctl detections ls --detailed
tctl detections ls --format=json --limit=25
FlagDescription
--statusFilter by status: in_progress, triaged, resolved, closed. Repeatable. Default: in_progress, triaged.
--severityFilter by severity: low, medium, high, critical. Repeatable.
--sourceFilter by detection source. Repeatable.
--typeFilter by detection type. Repeatable.
--from, --toTime window. Accepts RFC3339, YYYY-MM-DD, or durations like 24h, 7d. Default: 30d to now.
--detailedInclude extra columns in text output.
--limitMaximum detections to return. Default: 100.
--formatOutput format: text, json, yaml.

Inspect a detection​

Once ls surfaces a detection worth investigating, copy its ID from the ID column and pass it to get to see the full detail — description, mitigation steps, related log entries, and status-change history:

tctl detections get 6f6cf1ce-6d1e-4f9e-8f1a-2f7c9b0f1e23

Follow the related log entries into tctl investigate to trace the surrounding activity.

Update a detection's status​

Once you have decided what should happen to a detection, record the outcome without leaving the terminal:

tctl detections triage 6f6cf1ce-6d1e-4f9e-8f1a-2f7c9b0f1e23 --reason="Investigating, looks like an extended backup window."
CommandSets the status toUse when
tctl detections triagetriagedYou are working on a detection and have not finished.
tctl detections resolveresolvedThe issue was real and has been dealt with.
tctl detections closeclosedNo action is needed: false positive or accepted risk.
tctl detections reopenin_progressThe detection needs to go back to the default state.

Each command takes a detection ID and records a free-text reason. There is no separate resolution category, so the reason carries that context for whoever reads the detection later.

Supply the reason with --reason, or omit the flag to have tctl open your editor on a template. Whole-line # comments are stripped, and an empty reason aborts the change. To record a status change without a reason, pass --allow-empty.

Since tctl detections ls shows only in_progress and triaged detections by default, a detection drops out of the default list once you resolve or close it. Pass --status to see it again:

tctl detections ls --status=resolved --status=closed

Use tctl detections with an AI agent​

To let an AI agent drive detection triage with these commands, install the Teleport Detection Triage Agent Skill:

npx skills add https://github.com/gravitational/teleport/tree/master/skills/teleport-detection-triage

Next steps​

Troubleshooting​

invalid detection id​

tctl detections get expects a detection UUID, as shown in the ID column of tctl detections ls. Copy the ID from the list output.

No detections found​

Widen --from/--to, relax --status (open detections only by default), or remove severity and source filters. An empty result means nothing matched the filter in the window, not that detections are unavailable.