mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 15:16:33 -08:00
feat: k8s resource scanning (#2118)
This commit is contained in:
@@ -219,7 +219,7 @@ var (
|
||||
|
||||
reportFlag = cli.StringFlag{
|
||||
Name: "report",
|
||||
Value: "summary",
|
||||
Value: "all",
|
||||
Usage: "specify a report format for the output. (all,summary default: all)",
|
||||
}
|
||||
|
||||
@@ -804,10 +804,21 @@ func NewK8sCommand() *cli.Command {
|
||||
Name: "kubernetes",
|
||||
Aliases: []string{"k8s"},
|
||||
Usage: "scan kubernetes vulnerabilities and misconfigurations",
|
||||
Action: k8s.Run,
|
||||
CustomHelpTemplate: cli.CommandHelpTemplate + `EXAMPLES:
|
||||
- cluster scanning:
|
||||
$ trivy k8s --report summary
|
||||
|
||||
- namespace scanning:
|
||||
$ trivy k8s -n kube-system --report summary
|
||||
|
||||
- resource scanning:
|
||||
$ trivy k8s deployment/orion
|
||||
`,
|
||||
Action: k8s.Run,
|
||||
Flags: []cli.Flag{
|
||||
&namespaceFlag,
|
||||
&reportFlag,
|
||||
&formatFlag,
|
||||
&outputFlag,
|
||||
&severityFlag,
|
||||
&exitCodeFlag,
|
||||
|
||||
Reference in New Issue
Block a user