Skip to content

bug: help documentation for severity is confusing #327

@bcdady

Description

@bcdady

Describe the bug
In the help output, the severity is shown as:

  -s, --severity strings                  severities of security issues to be displayed (UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL) (default [UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL])

Note: these values are comma delimited

To Reproduce
Steps to reproduce the behavior:

  1. Run trivy aws -h
  2. Copy the default value shown for the severity flag
  3. Paste default severity value and modify it to exclude the "UNKNOWN,LOW,MEDIUM" string
    Example:
trivy aws -s [HIGH,CRITICAL] --account sandbox
  1. See error:
FATAL	Fatal error	flag error: report flag error: unable to parse flag: invalid argument "[[HIGH CRITICAL]]" for "--severity" flag: must be one of ["UNKNOWN" "LOW" "MEDIUM" "HIGH" "CRITICAL"]

Note: these values are space delimited

Expected behavior
The example shown in the help document should be helpful for a new trivy aws user. Copy-and-paste is a helpful way for a new trivy aws user to get started with using, customizing parameters for how the tool will run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions