From 6789b27e195adda72834aaf8a6c6ea0981c7b32b Mon Sep 17 00:00:00 2001 From: Assaf Attias <49212512+attiasas@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:14:36 +0300 Subject: [PATCH] Update security commands categories (#116) --- cli/cli.go | 2 ++ cli/scancommands.go | 11 +++++------ go.mod | 10 +++++----- go.sum | 19 ++++++++++--------- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/cli/cli.go b/cli/cli.go index 81cf4453..8bab83c0 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -5,6 +5,8 @@ import ( "github.com/jfrog/jfrog-cli-core/v2/plugins/components" ) +const securityCategory = "Security" + func GetJfrogCliSecurityApp() components.App { app := components.CreateEmbeddedApp( "security", diff --git a/cli/scancommands.go b/cli/scancommands.go index 8b573de1..f0568469 100644 --- a/cli/scancommands.go +++ b/cli/scancommands.go @@ -38,8 +38,6 @@ import ( "github.com/jfrog/jfrog-cli-security/utils/xsc" ) -const auditScanCategory = "Audit & Scan" - const dockerScanCmdHiddenName = "dockerscan" func getAuditAndScansCommands() []components.Command { @@ -50,7 +48,7 @@ func getAuditAndScansCommands() []components.Command { Flags: flags.GetCommandFlags(flags.XrScan), Description: scanDocs.GetDescription(), Arguments: scanDocs.GetArguments(), - Category: auditScanCategory, + Category: securityCategory, Action: ScanCmd, }, { @@ -59,6 +57,7 @@ func getAuditAndScansCommands() []components.Command { Flags: flags.GetCommandFlags(flags.Enrich), Description: enrichDocs.GetDescription(), Arguments: enrichDocs.GetArguments(), + Category: securityCategory, Action: EnrichCmd, }, { @@ -67,7 +66,7 @@ func getAuditAndScansCommands() []components.Command { Flags: flags.GetCommandFlags(flags.BuildScan), Description: buildScanDocs.GetDescription(), Arguments: buildScanDocs.GetArguments(), - Category: auditScanCategory, + Category: securityCategory, Action: BuildScan, }, { @@ -88,7 +87,7 @@ func getAuditAndScansCommands() []components.Command { Aliases: []string{"aud"}, Flags: flags.GetCommandFlags(flags.Audit), Description: auditDocs.GetDescription(), - Category: auditScanCategory, + Category: securityCategory, Action: AuditCmd, }, { @@ -96,7 +95,7 @@ func getAuditAndScansCommands() []components.Command { Aliases: []string{"ca"}, Flags: flags.GetCommandFlags(flags.CurationAudit), Description: curationDocs.GetDescription(), - Category: auditScanCategory, + Category: securityCategory, Action: CurationCmd, }, diff --git a/go.mod b/go.mod index 25d5060c..36a9a9ba 100644 --- a/go.mod +++ b/go.mod @@ -6,12 +6,12 @@ require ( github.com/beevik/etree v1.4.0 github.com/google/go-github/v56 v56.0.0 github.com/gookit/color v1.5.4 - github.com/jfrog/build-info-go v1.9.29 + github.com/jfrog/build-info-go v1.9.30 github.com/jfrog/froggit-go v1.16.1 github.com/jfrog/gofrog v1.7.4 github.com/jfrog/jfrog-apps-config v1.0.1 - github.com/jfrog/jfrog-cli-core/v2 v2.53.3 - github.com/jfrog/jfrog-client-go v1.42.0 + github.com/jfrog/jfrog-cli-core/v2 v2.53.4 + github.com/jfrog/jfrog-client-go v1.43.0 github.com/magiconair/properties v1.8.7 github.com/owenrumney/go-sarif/v2 v2.3.0 github.com/stretchr/testify v1.9.0 @@ -23,8 +23,8 @@ require ( require ( dario.cat/mergo v1.0.0 // indirect - github.com/BurntSushi/toml v1.3.2 // indirect - github.com/CycloneDX/cyclonedx-go v0.8.0 // indirect + github.com/BurntSushi/toml v1.4.0 // indirect + github.com/CycloneDX/cyclonedx-go v0.9.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect github.com/VividCortex/ewma v1.2.0 // indirect diff --git a/go.sum b/go.sum index f440ab42..ff2ffb9a 100644 --- a/go.sum +++ b/go.sum @@ -600,11 +600,12 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7 gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CycloneDX/cyclonedx-go v0.8.0 h1:FyWVj6x6hoJrui5uRQdYZcSievw3Z32Z88uYzG/0D6M= -github.com/CycloneDX/cyclonedx-go v0.8.0/go.mod h1:K2bA+324+Og0X84fA8HhN2X066K7Bxz4rpMQ4ZhjtSk= +github.com/CycloneDX/cyclonedx-go v0.9.0 h1:inaif7qD8bivyxp7XLgxUYtOXWtDez7+j72qKTMQTb8= +github.com/CycloneDX/cyclonedx-go v0.9.0/go.mod h1:NE/EWvzELOFlG6+ljX/QeMlVt9VKcTwu8u0ccsACEsw= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= @@ -889,18 +890,18 @@ github.com/jedib0t/go-pretty/v6 v6.5.9 h1:ACteMBRrrmm1gMsXe9PSTOClQ63IXDUt03H5U+ github.com/jedib0t/go-pretty/v6 v6.5.9/go.mod h1:zbn98qrYlh95FIhwwsbIip0LYpwSG8SUOScs+v9/t0E= github.com/jfrog/archiver/v3 v3.6.1 h1:LOxnkw9pOn45DzCbZNFV6K0+6dCsQ0L8mR3ZcujO5eI= github.com/jfrog/archiver/v3 v3.6.1/go.mod h1:VgR+3WZS4N+i9FaDwLZbq+jeU4B4zctXL+gL4EMzfLw= -github.com/jfrog/build-info-go v1.9.29 h1:3vJ+kbk9PpU6wjisXi9c4qISNpYkISh/NmB5mq1ZlSY= -github.com/jfrog/build-info-go v1.9.29/go.mod h1:AzFJlN/yKfKuKcSBaGy5nNmKN1xzx6+XcRWAswCTLTA= +github.com/jfrog/build-info-go v1.9.30 h1:RmK3NuDGUoyCjCNJJBlHaCm4vWzO8BLjkuAkMzj6PGE= +github.com/jfrog/build-info-go v1.9.30/go.mod h1:fxSfpp+kQ8qln/0y7pgV3tg2exWe5OM1np5FF2LlSDg= github.com/jfrog/froggit-go v1.16.1 h1:FBIM1qevX/ag9unfmpGzfmZ36D8ulOJ+DPTSFUk3l5U= github.com/jfrog/froggit-go v1.16.1/go.mod h1:TEJSzgiV+3D/GVGE8Y6j46ut1jrBLD1FL6WdMdKwwCE= github.com/jfrog/gofrog v1.7.4 h1:on4AeWef5LJUhGCigSjTS4Ez3n9l8+NiZlXH6UYp05c= github.com/jfrog/gofrog v1.7.4/go.mod h1:jyGiCgiqSSR7k86hcUSu67XVvmvkkgWTmPsH25wI298= github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYLipdsOFMY= github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w= -github.com/jfrog/jfrog-cli-core/v2 v2.53.3 h1:b5B+6epeSFE8lvQh/8xPcEl43JZUsiN8ybWBuKbW65k= -github.com/jfrog/jfrog-cli-core/v2 v2.53.3/go.mod h1:PiBf1/9I1BeyGA2jxwOaQEOtxebIIMhAJSN94JeT5e4= -github.com/jfrog/jfrog-client-go v1.42.0 h1:Wk9I8pewpHwoHsE9gebT8kL4M/XXTyPaf6eZhKvVoJA= -github.com/jfrog/jfrog-client-go v1.42.0/go.mod h1:Rc/g21FUWUzIp7YFUjo9n93jvELhwTNoT2fsiW5KQ1o= +github.com/jfrog/jfrog-cli-core/v2 v2.53.4 h1:A9lAYJMkqH9lZyu6ahJ2puzlYGXg9upopretVVfDqzc= +github.com/jfrog/jfrog-cli-core/v2 v2.53.4/go.mod h1:thaQcvQDTHV2jOumb+m2OBfqRSW4JYtLez5Qsi1dovk= +github.com/jfrog/jfrog-client-go v1.43.0 h1:0A4zT8ZIpAwtEUICNhKPx1bwM1LocJN9C38IGycS7UY= +github.com/jfrog/jfrog-client-go v1.43.0/go.mod h1:1RklAq1rNS3HmIsJ+BM3tEn9XHZuTAs37JtVUpefUk4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=