sl finding severity
The finding severity command lets you view a finding's CVSS and adjusted severity, set a manual adjusted-severity override, or restore the system-calculated value.
For background on how Qwiet AI by Harness calculates and displays severity, see Understand a finding's severity.
Usage
To get the current severity of a finding: sl finding severity <findingID> [command options]
To set a manual adjusted-severity override: sl finding severity <findingID>=<severity> -c <comment> [command options]
To remove a manual override and restore the system-calculated severity: sl finding severity restore <findingID> [command options]
Command options
| Option | Arguments | Description |
|---|---|---|
<findingID> | Numeric ID | The ID of the finding (required) |
<severity> | none|low|medium|high|critical | Adjusted severity to apply. Values are case-insensitive |
--app, -a | <appName> | Application or compound name. Can also be set via SHIFTLEFT_APP environment variable or auto-detected |
--comment, -c | <comment> | Required reason for the severity change (only applicable when setting severity) |
--project, -p | <projectID> | Specific project ID. Required when the app is a compound with multiple projects and no interactive selection is desired |
Valid severity values
none- No severitylow- Low severitymedium- Medium severityhigh- High severitycritical- Critical severity
Setting severity updates the finding's adjusted severity only. The CVSS (base) severity is unchanged.
A comment is required when setting severity. The override persists across future scans until you restore it.
Example usage
When working with a compound app with multiple projects, you can interactively select a project or use the --project flag:
$ sl finding severity 1 --app shiftleft-ruby-demo
sl version 0.9.3957 (e04f0d674f9a2a1e0e7f8c8f1fde221511c82d86)
The app 'shiftleft-ruby-demo' is a compound with multiple projects:
# Project ID
1 shiftleft-ruby-demo
2 shiftleft-ruby-demo_element_SECRETS
Please select a project (1-2) or specify project using --project <project-id>: 1
Selected project: shiftleft-ruby-demo
Finding Title CVSS Severity Adjusted Severity
1 Directory Traversal: HTTP Data as Fil... high medium
Set adjusted severity with interactive project selection:
$ sl finding severity 1=critical -c "Exposed on the public internet" --app shiftleft-ruby-demo
sl version 0.9.3957 (e04f0d674f9a2a1e0e7f8c8f1fde221511c82d86)
The app 'shiftleft-ruby-demo' is a compound with multiple projects:
# Project ID
1 shiftleft-ruby-demo
2 shiftleft-ruby-demo_element_SECRETS
Please select a project (1-2) or specify project using --project <project-id>: 1
Selected project: shiftleft-ruby-demo
Finding #1 adjusted severity set to 'critical'
Comment: Exposed on the public internet
Set adjusted severity using the --project flag:
$ sl finding severity 2=high --project shiftleft-ruby-demo -c "Business impact"
sl version 0.9.3957 (e04f0d674f9a2a1e0e7f8c8f1fde221511c82d86)
Finding #2 adjusted severity set to 'high'
Comment: Business impact
Restore system-calculated severity using the --project flag:
$ sl finding severity restore 2 --project shiftleft-python-demo
sl version 0.9.3957 (e04f0d674f9a2a1e0e7f8c8f1fde221511c82d86)
Finding #2 severity override removed; restored to system-calculated value
Get finding severity using the SHIFTLEFT_APP environment variable:
$ export SHIFTLEFT_APP=Benchmark
$ sl finding severity 1
sl version 0.9.3957 (e04f0d674f9a2a1e0e7f8c8f1fde221511c82d86)
Finding Title CVSS Severity Adjusted Severity
1 Remote Code Execution: Command Inject... high high
Set finding severity using the SHIFTLEFT_APP environment variable:
$ export SHIFTLEFT_APP=Benchmark
$ sl finding severity 1=critical -c "Justification"
sl version 0.9.3957 (e04f0d674f9a2a1e0e7f8c8f1fde221511c82d86)
Finding #1 adjusted severity set to 'critical'
Comment: Justification