sl finding status
The finding status command allows you to get or set the status of a finding.
Usage
To get the current status of a finding: sl finding status <findingID> [command options]
To set/update the status of a finding: sl finding status <findingID>=<status> [command options]
Command options
| Option | Arguments | Description |
|---|---|---|
<findingID> | Numeric ID | The ID of the finding (required) |
<status> | fixed|ignore|3rdparty|unset | Status value to set. Use fixed for resolved findings, ignore for findings to be ignored, 3rdparty for issues in third-party code, or unset to clear the status |
--app, -a | <appName> | Application or compound name. Can also be set via SHIFTLEFT_APP environment variable or auto-detected |
--comment, -c | <comment> | Optional reason or comment for the status change (only applicable when setting status) |
--project, -p | <projectID> | Specific project ID. Required when the app is a compound with multiple projects and no interactive selection is desired |
Valid status values
fixed- Finding has been fixedignore- Finding should be ignored3rdparty- Finding is in third-party codeunset- Clear the status
Example usage
When working with a compound app with multiple projects, you can interactively select a project or use the --project flag:
$ sl finding status 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 Status Updated
1 Directory Traversal: HTTP Data as Fil...
Set finding status with interactive project selection:
$ sl finding status 1=fixed -c "Fixed in PR #123" --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 status updated to 'fixed'
Comment: Fixed in PR #123
Set finding status to fixed using --project flag:
$ sl finding status 2=fixed -c "Fixed in PR #123" --project shiftleft-ruby-demo
sl version 0.9.3957 (e04f0d674f9a2a1e0e7f8c8f1fde221511c82d86)
Finding #2 status updated to 'fixed'
Comment: Fixed in PR #123
Set finding status to ignore using --project flag:
$ sl finding status 3=ignore -c "False positive - input is sanitized" --project shiftleft-python-demo
sl version 0.9.3957 (e04f0d674f9a2a1e0e7f8c8f1fde221511c82d86)
Finding #3 status updated to 'ignore'
Comment: False positive - input is sanitized
Set finding status as 3rdparty using --project flag:
$ sl finding status 4=3rdparty -c "Issue in external library" --project shiftleft-python-demo
sl version 0.9.3957 (e04f0d674f9a2a1e0e7f8c8f1fde221511c82d86)
Finding #4 status updated to '3rdparty'
Comment: Issue in external library
Unset finding status using --project flag:
$ sl finding status 2=unset --project shiftleft-python-demo
sl version 0.9.3957 (e04f0d674f9a2a1e0e7f8c8f1fde221511c82d86)
Finding #2 status updated to 'unset'
Get finding status using SHIFTLEFT_APP environment variable:
$ export SHIFTLEFT_APP=Benchmark
$ sl finding status 1
sl version 0.9.3957 (e04f0d674f9a2a1e0e7f8c8f1fde221511c82d86)
Finding Title Status Updated
1 Remote Code Execution: Command Inject...
Set finding status using SHIFTLEFT_APP environment variable:
$ export SHIFTLEFT_APP=Benchmark
$ sl finding status 1=fixed -c "Fixed"
sl version 0.9.3957 (e04f0d674f9a2a1e0e7f8c8f1fde221511c82d86)
Finding #1 status updated to 'fixed'
Comment: Fixed