New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(kubernetes): Add report flag for summary #2112
Conversation
6675ab1
to
3cda6f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful! 🎉
pkg/commands/app.go
Outdated
reportFlag = cli.StringFlag{ | ||
Name: "report", | ||
Value: "json", | ||
Usage: "specify a report format for the output. (json,summary default: json)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, --report
is different from --format
. --report
is how we aggregate/summarize the result and --format
is the format like table
and json
. So, --report nsa --format table
and --report nsa --format json
both should be available. Looks like they are mixing now.
If it is confusing, we can consider a better name than --report
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value of --format
is table
and --report
is summary
. There are two available combinations for now.
Default:
--report summary --format table
Also:
--report all --format json
We should display an error in the following case at the moment. We will support it in the future.
--report summary --format json
--report all --format table
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
7df33d6
to
4343662
Compare
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
* feat(k8s): Add report flag for summary * chore: add headings to the severity columns * chore: make the default output of k8s summary table Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
Description
Add support for using
--report summary
with thekubernetes
commandChecklist