-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Laurentiu Niculae <[email protected]>
- Loading branch information
1 parent
ed90e3b
commit 5fb6c6f
Showing
38 changed files
with
2,318 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package cmdflags | ||
|
||
const ( | ||
URLFlag = "url" | ||
ConfigFlag = "config" | ||
UserFlag = "user" | ||
OutputFormatFlag = "output" | ||
FixedFlag = "fixed" | ||
VerboseFlag = "verbose" | ||
VersionFlag = "version" | ||
DebugFlag = "debug" | ||
SearchedCVEID = "id" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//go:build search | ||
// +build search | ||
|
||
package cli | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
|
||
"zotregistry.io/zot/pkg/cli/cmdflags" | ||
) | ||
|
||
func NewCVESCommand(searchService SearchService) *cobra.Command { | ||
cvesCmd := &cobra.Command{ | ||
Use: "cves [command]", | ||
Short: "Lookup CVEs in images hosted on the zot registry", | ||
Long: `List CVEs (Common Vulnerabilities and Exposures) of images hosted on the zot registry`, | ||
} | ||
|
||
cvesCmd.SetUsageTemplate(cvesCmd.UsageTemplate() + usageFooter) | ||
|
||
cvesCmd.PersistentFlags().StringP(cmdflags.OutputFormatFlag, "o", "", "Specify output format [text/json/yaml]") | ||
cvesCmd.PersistentFlags().Bool(cmdflags.VerboseFlag, false, "Show verbose output") | ||
cvesCmd.PersistentFlags().Bool(cmdflags.DebugFlag, false, "Show debug output") | ||
|
||
cvesCmd.AddCommand(NewCveForImageCommand(searchService)) | ||
cvesCmd.AddCommand(NewImagesByCVEIDCommand(searchService)) | ||
cvesCmd.AddCommand(NewFixedTagsCommand(searchService)) | ||
|
||
return cvesCmd | ||
} |
Oops, something went wrong.