From 70224ad674038f4eb0c08cc71f9eb9f6199e2921 Mon Sep 17 00:00:00 2001 From: Michael Sverdlov Date: Mon, 4 Sep 2023 12:48:55 +0300 Subject: [PATCH 1/3] Update core dependency (#2181) --- go.mod | 4 ++-- go.sum | 8 ++++---- pip_test.go | 2 +- scan/cli.go | 8 ++++---- xray_test.go | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index ec2780edd..6e56d863c 100644 --- a/go.mod +++ b/go.mod @@ -125,10 +125,10 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230831153853-3ddf531482e7 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230904093105-ce71e69b2f07 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 -replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20230831152946-6ed2ae1aa57f +replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20230904070427-f3f2a103d9e2 replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230831151231-e5e7bd035ddc diff --git a/go.sum b/go.sum index 4f38367f0..e24e596de 100644 --- a/go.sum +++ b/go.sum @@ -239,10 +239,10 @@ github.com/jfrog/build-info-go v1.8.9-0.20230831151231-e5e7bd035ddc h1:pqu82clhP github.com/jfrog/build-info-go v1.8.9-0.20230831151231-e5e7bd035ddc/go.mod h1:QEskae5fQpjeY2PBzsjWtUQVskYSNDF2sSmw/Gx44dQ= github.com/jfrog/gofrog v1.3.0 h1:o4zgsBZE4QyDbz2M7D4K6fXPTBJht+8lE87mS9bw7Gk= github.com/jfrog/gofrog v1.3.0/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0= -github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230831153853-3ddf531482e7 h1:G60mVnOYqtVJ0UQpkYS2kmbqYZ59q1g8XivZt9W0tUg= -github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230831153853-3ddf531482e7/go.mod h1:eQJU+jDTcPVqOeHNheURqkMEMXDVNQFKKjcyVEa0058= -github.com/jfrog/jfrog-client-go v1.28.1-0.20230831152946-6ed2ae1aa57f h1:S6l0o2sKFLRJ+QYVB5U/PJhrnwFSmKFFY7eHpRPRH8A= -github.com/jfrog/jfrog-client-go v1.28.1-0.20230831152946-6ed2ae1aa57f/go.mod h1:uUnMrqHX7Xi+OCaZEE4b3BtsmGeOSCB7XqaEWVXEH/E= +github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230904093105-ce71e69b2f07 h1:8bqiTnKxyZkqZNXYf+9cFxL7P15qZ5VtP50McAMBKEw= +github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230904093105-ce71e69b2f07/go.mod h1:eQJU+jDTcPVqOeHNheURqkMEMXDVNQFKKjcyVEa0058= +github.com/jfrog/jfrog-client-go v1.28.1-0.20230904070427-f3f2a103d9e2 h1:uPDFvUv+3kAUyTR6gAhROAgsjnPe2jsxzqJSkjbIHmE= +github.com/jfrog/jfrog-client-go v1.28.1-0.20230904070427-f3f2a103d9e2/go.mod h1:uUnMrqHX7Xi+OCaZEE4b3BtsmGeOSCB7XqaEWVXEH/E= 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/jszwec/csvutil v1.8.0 h1:G7vS2LGdpZZDH1HmHeNbxOaJ/ZnJlpwGFvOkTkJzzNk= diff --git a/pip_test.go b/pip_test.go index f7bcc9a96..baba851d5 100644 --- a/pip_test.go +++ b/pip_test.go @@ -4,7 +4,7 @@ import ( biutils "github.com/jfrog/build-info-go/utils" "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" coretests "github.com/jfrog/jfrog-cli-core/v2/utils/tests" - "github.com/jfrog/jfrog-cli-core/v2/xray/audit/python" + "github.com/jfrog/jfrog-cli-core/v2/xray/commands/audit/sca/python" clientTestUtils "github.com/jfrog/jfrog-client-go/utils/tests" "os" "path/filepath" diff --git a/scan/cli.go b/scan/cli.go index a99b94e1d..5093214ab 100644 --- a/scan/cli.go +++ b/scan/cli.go @@ -16,7 +16,7 @@ import ( corecommondocs "github.com/jfrog/jfrog-cli-core/v2/docs/common" coreconfig "github.com/jfrog/jfrog-cli-core/v2/utils/config" "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" - audit "github.com/jfrog/jfrog-cli-core/v2/xray/commands/audit/generic" + "github.com/jfrog/jfrog-cli-core/v2/xray/commands/audit" "github.com/jfrog/jfrog-cli-core/v2/xray/commands/scan" "github.com/jfrog/jfrog-cli/docs/common" auditdocs "github.com/jfrog/jfrog-cli/docs/scan/audit" @@ -172,7 +172,7 @@ func GetCommands() []cli.Command { } func AuditCmd(c *cli.Context) error { - auditCmd, err := createGenericAuditCmd(c) + auditCmd, err := createAuditCmd(c) if err != nil { return err } @@ -198,7 +198,7 @@ func AuditCmd(c *cli.Context) error { func AuditSpecificCmd(c *cli.Context, technology coreutils.Technology) error { cliutils.LogNonGenericAuditCommandDeprecation(c.Command.Name) - auditCmd, err := createGenericAuditCmd(c) + auditCmd, err := createAuditCmd(c) if err != nil { return err } @@ -234,7 +234,7 @@ func CurationCmd(c *cli.Context) error { return progressbar.ExecWithProgress(curationAuditCommand) } -func createGenericAuditCmd(c *cli.Context) (*audit.GenericAuditCommand, error) { +func createAuditCmd(c *cli.Context) (*audit.AuditCommand, error) { auditCmd := audit.NewGenericAuditCommand() err := validateXrayContext(c) if err != nil { diff --git a/xray_test.go b/xray_test.go index fd3ff3150..3698bb151 100644 --- a/xray_test.go +++ b/xray_test.go @@ -703,9 +703,9 @@ func verifySimpleJsonJasResults(t *testing.T, content string, minIacViolations, assert.GreaterOrEqual(t, len(results.Iacs), minIacViolations, "Found less IaC then expected") var applicableResults, notApplicableResults int for _, vuln := range results.Vulnerabilities { - if vuln.Applicable == utils.NotApplicableStringValue { + if vuln.Applicable == string(utils.NotApplicable) { notApplicableResults++ - } else if vuln.Applicable == utils.ApplicableStringValue { + } else if vuln.Applicable == string(utils.Applicable) { applicableResults++ } } From f2ef83f64cf4a7030381059b52c670a7689e3268 Mon Sep 17 00:00:00 2001 From: Michael Sverdlov Date: Mon, 4 Sep 2023 20:38:58 +0300 Subject: [PATCH 2/3] Update Cli-Core (#2182) --- .github/workflows/frogbot-scan-repository.yml | 1 + go.mod | 2 +- go.sum | 4 +-- scan/cli.go | 3 +- xray_test.go | 36 +++++++++---------- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/frogbot-scan-repository.yml b/.github/workflows/frogbot-scan-repository.yml index 01b568f67..23f4e003f 100644 --- a/.github/workflows/frogbot-scan-repository.yml +++ b/.github/workflows/frogbot-scan-repository.yml @@ -10,6 +10,7 @@ permissions: security-events: write jobs: scan-repository: + name: Scan Repository (${{ matrix.branch }}) runs-on: ubuntu-latest strategy: matrix: diff --git a/go.mod b/go.mod index 6e56d863c..370930136 100644 --- a/go.mod +++ b/go.mod @@ -125,7 +125,7 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230904093105-ce71e69b2f07 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230904170814-03a7938bae94 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 diff --git a/go.sum b/go.sum index e24e596de..c7b107794 100644 --- a/go.sum +++ b/go.sum @@ -239,8 +239,8 @@ github.com/jfrog/build-info-go v1.8.9-0.20230831151231-e5e7bd035ddc h1:pqu82clhP github.com/jfrog/build-info-go v1.8.9-0.20230831151231-e5e7bd035ddc/go.mod h1:QEskae5fQpjeY2PBzsjWtUQVskYSNDF2sSmw/Gx44dQ= github.com/jfrog/gofrog v1.3.0 h1:o4zgsBZE4QyDbz2M7D4K6fXPTBJht+8lE87mS9bw7Gk= github.com/jfrog/gofrog v1.3.0/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0= -github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230904093105-ce71e69b2f07 h1:8bqiTnKxyZkqZNXYf+9cFxL7P15qZ5VtP50McAMBKEw= -github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230904093105-ce71e69b2f07/go.mod h1:eQJU+jDTcPVqOeHNheURqkMEMXDVNQFKKjcyVEa0058= +github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230904170814-03a7938bae94 h1:rAV/hUZNruzYOfGUqE5ubPY55NMtS59llfTcWGwofSg= +github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230904170814-03a7938bae94/go.mod h1:eQJU+jDTcPVqOeHNheURqkMEMXDVNQFKKjcyVEa0058= github.com/jfrog/jfrog-client-go v1.28.1-0.20230904070427-f3f2a103d9e2 h1:uPDFvUv+3kAUyTR6gAhROAgsjnPe2jsxzqJSkjbIHmE= github.com/jfrog/jfrog-client-go v1.28.1-0.20230904070427-f3f2a103d9e2/go.mod h1:uUnMrqHX7Xi+OCaZEE4b3BtsmGeOSCB7XqaEWVXEH/E= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= diff --git a/scan/cli.go b/scan/cli.go index 5093214ab..0cb030a7c 100644 --- a/scan/cli.go +++ b/scan/cli.go @@ -2,7 +2,6 @@ package scan import ( "github.com/jfrog/jfrog-cli-core/v2/xray/commands/curation" - xrCmdUtils "github.com/jfrog/jfrog-cli-core/v2/xray/commands/utils" xrutils "github.com/jfrog/jfrog-cli-core/v2/xray/utils" curationdocs "github.com/jfrog/jfrog-cli/docs/scan/curation" "os" @@ -208,7 +207,7 @@ func AuditSpecificCmd(c *cli.Context, technology coreutils.Technology) error { } func CurationCmd(c *cli.Context) error { - threads, err := xrCmdUtils.DetectNumOfThreads(c.Int("threads")) + threads, err := curation.DetectNumOfThreads(c.Int("threads")) if err != nil { return err } diff --git a/xray_test.go b/xray_test.go index 3698bb151..6825ec193 100644 --- a/xray_test.go +++ b/xray_test.go @@ -6,6 +6,7 @@ import ( "flag" "fmt" biutils "github.com/jfrog/build-info-go/utils" + "github.com/jfrog/jfrog-cli-core/v2/xray/scangraph" "net/http" "net/http/httptest" "os" @@ -24,13 +25,12 @@ import ( artUtils "github.com/jfrog/jfrog-cli-core/v2/artifactory/utils" "github.com/jfrog/jfrog-cli-core/v2/artifactory/utils/container" coreCmd "github.com/jfrog/jfrog-cli-core/v2/common/commands" - tests2 "github.com/jfrog/jfrog-cli-core/v2/common/tests" + commontests "github.com/jfrog/jfrog-cli-core/v2/common/tests" "github.com/jfrog/jfrog-cli-core/v2/utils/config" "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" coretests "github.com/jfrog/jfrog-cli-core/v2/utils/tests" coreCuration "github.com/jfrog/jfrog-cli-core/v2/xray/commands/curation" "github.com/jfrog/jfrog-cli-core/v2/xray/commands/scan" - commands "github.com/jfrog/jfrog-cli-core/v2/xray/commands/utils" "github.com/jfrog/jfrog-cli-core/v2/xray/formats" "github.com/jfrog/jfrog-cli-core/v2/xray/utils" "github.com/jfrog/jfrog-cli/inttestutils" @@ -114,13 +114,13 @@ func TestXrayBinaryScanSimpleJsonWithProgress(t *testing.T) { } func testXrayBinaryScan(t *testing.T, format string) string { - initXrayTest(t, commands.GraphScanMinXrayVersion) + initXrayTest(t, scangraph.GraphScanMinXrayVersion) binariesPath := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), "xray", "binaries", "*") return xrayCli.RunCliCmdWithOutput(t, "scan", binariesPath, "--licenses", "--format="+format) } func TestXrayBinaryScanWithBypassArchiveLimits(t *testing.T) { - initXrayTest(t, commands.BypassArchiveLimitsMinXrayVersion) + initXrayTest(t, scan.BypassArchiveLimitsMinXrayVersion) unsetEnv := clientTestUtils.SetEnvWithCallbackAndAssert(t, "JF_INDEXER_COMPRESS_MAXENTITIES", "10") defer unsetEnv() binariesPath := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), "xray", "binaries", "*") @@ -148,7 +148,7 @@ func TestXrayAuditNpmSimpleJson(t *testing.T) { } func testXrayAuditNpm(t *testing.T, format string) string { - initXrayTest(t, commands.GraphScanMinXrayVersion) + initXrayTest(t, scangraph.GraphScanMinXrayVersion) tempDirPath, createTempDirCallback := coretests.CreateTempDirWithCallbackAndAssert(t) defer createTempDirCallback() npmProjectPath := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), "xray", "npm") @@ -191,7 +191,7 @@ func TestXrayAuditYarnV1SimpleJson(t *testing.T) { } func testXrayAuditYarn(t *testing.T, projectDirName string, yarnCmd func()) { - initXrayTest(t, commands.GraphScanMinXrayVersion) + initXrayTest(t, scangraph.GraphScanMinXrayVersion) tempDirPath, createTempDirCallback := coretests.CreateTempDirWithCallbackAndAssert(t) defer createTempDirCallback() yarnProjectPath := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), "xray", projectDirName) @@ -228,7 +228,7 @@ func TestXrayAuditNugetMultiProject(t *testing.T) { } func testXrayAuditNuget(t *testing.T, projectName, format string) string { - initXrayTest(t, commands.GraphScanMinXrayVersion) + initXrayTest(t, scangraph.GraphScanMinXrayVersion) tempDirPath, createTempDirCallback := coretests.CreateTempDirWithCallbackAndAssert(t) defer createTempDirCallback() projectPath := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), "xray", "nuget", projectName) @@ -254,7 +254,7 @@ func TestXrayAuditGradleSimpleJson(t *testing.T) { } func testXrayAuditGradle(t *testing.T, format string) string { - initXrayTest(t, commands.GraphScanMinXrayVersion) + initXrayTest(t, scangraph.GraphScanMinXrayVersion) tempDirPath, createTempDirCallback := coretests.CreateTempDirWithCallbackAndAssert(t) defer createTempDirCallback() gradleProjectPath := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), "xray", "gradle") @@ -278,7 +278,7 @@ func TestXrayAuditMavenSimpleJson(t *testing.T) { } func testXrayAuditMaven(t *testing.T, format string) string { - initXrayTest(t, commands.GraphScanMinXrayVersion) + initXrayTest(t, scangraph.GraphScanMinXrayVersion) tempDirPath, createTempDirCallback := coretests.CreateTempDirWithCallbackAndAssert(t) defer createTempDirCallback() mvnProjectPath := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), "xray", "maven") @@ -292,7 +292,7 @@ func testXrayAuditMaven(t *testing.T, format string) string { } func TestXrayAuditNoTech(t *testing.T) { - initXrayTest(t, commands.GraphScanMinXrayVersion) + initXrayTest(t, scangraph.GraphScanMinXrayVersion) tempDirPath, createTempDirCallback := coretests.CreateTempDirWithCallbackAndAssert(t) defer createTempDirCallback() prevWd := changeWD(t, tempDirPath) @@ -303,7 +303,7 @@ func TestXrayAuditNoTech(t *testing.T) { } func TestXrayAuditDetectTech(t *testing.T) { - initXrayTest(t, commands.GraphScanMinXrayVersion) + initXrayTest(t, scangraph.GraphScanMinXrayVersion) tempDirPath, createTempDirCallback := coretests.CreateTempDirWithCallbackAndAssert(t) defer createTempDirCallback() mvnProjectPath := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), "xray", "maven") @@ -321,7 +321,7 @@ func TestXrayAuditDetectTech(t *testing.T) { } func TestXrayAuditMultiProjects(t *testing.T) { - initXrayTest(t, commands.GraphScanMinXrayVersion) + initXrayTest(t, scangraph.GraphScanMinXrayVersion) tempDirPath, createTempDirCallback := coretests.CreateTempDirWithCallbackAndAssert(t) defer createTempDirCallback() multiProject := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), "xray") @@ -359,7 +359,7 @@ func TestXrayAuditPipSimpleJsonWithRequirementsFile(t *testing.T) { } func testXrayAuditPip(t *testing.T, format, requirementsFile string) string { - initXrayTest(t, commands.GraphScanMinXrayVersion) + initXrayTest(t, scangraph.GraphScanMinXrayVersion) tempDirPath, createTempDirCallback := coretests.CreateTempDirWithCallbackAndAssert(t) defer createTempDirCallback() pipProjectPath := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), "xray", "python", "pip") @@ -388,7 +388,7 @@ func TestXrayAuditPipenvSimpleJson(t *testing.T) { } func testXrayAuditPipenv(t *testing.T, format string) string { - initXrayTest(t, commands.GraphScanMinXrayVersion) + initXrayTest(t, scangraph.GraphScanMinXrayVersion) tempDirPath, createTempDirCallback := coretests.CreateTempDirWithCallbackAndAssert(t) defer createTempDirCallback() pipenvProjectPath := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), "xray", "python", "pipenv") @@ -450,7 +450,7 @@ func TestXrayAuditPoetrySimpleJson(t *testing.T) { } func testXrayAuditPoetry(t *testing.T, format string) string { - initXrayTest(t, commands.GraphScanMinXrayVersion) + initXrayTest(t, scangraph.GraphScanMinXrayVersion) tempDirPath, createTempDirCallback := coretests.CreateTempDirWithCallbackAndAssert(t) defer createTempDirCallback() poetryProjectPath := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), "xray", "python", "poetry") @@ -615,7 +615,7 @@ func runDockerScan(t *testing.T, imageName, watchName string, minViolations, min func createTestWatch(t *testing.T) (string, func()) { trueValue := true - xrayManager, err := commands.CreateXrayServiceManager(xrayDetails) + xrayManager, err := utils.CreateXrayServiceManager(xrayDetails) assert.NoError(t, err) // Create new default policy. policyParams := xrayUtils.PolicyParams{ @@ -679,7 +679,7 @@ func TestXrayAuditJasNoViolationsSimpleJson(t *testing.T) { } func testXrayAuditJas(t *testing.T, format string, project string) string { - initXrayTest(t, commands.GraphScanMinXrayVersion) + initXrayTest(t, scangraph.GraphScanMinXrayVersion) tempDirPath, createTempDirCallback := coretests.CreateTempDirWithCallbackAndAssert(t) defer createTempDirCallback() projectDir := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), filepath.Join("xray", project)) @@ -803,7 +803,7 @@ func getCurationExpectedResponse(config *config.ServerDetails) []coreCuration.Pa func curationServer(t *testing.T, expectedRequest map[string]bool, requestToFail map[string]bool) (*httptest.Server, *config.ServerDetails) { mapLockReadWrite := sync.Mutex{} - serverMock, config, _ := tests2.CreateRtRestsMockServer(t, func(w http.ResponseWriter, r *http.Request) { + serverMock, config, _ := commontests.CreateRtRestsMockServer(t, func(w http.ResponseWriter, r *http.Request) { if r.Method == http.MethodHead { mapLockReadWrite.Lock() if _, exist := expectedRequest[r.RequestURI]; exist { From 6beb362969d0812a5dc443c9cdc28a49de746773 Mon Sep 17 00:00:00 2001 From: Michael Sverdlov Date: Mon, 4 Sep 2023 21:25:54 +0300 Subject: [PATCH 3/3] Improve actions cache (#2183) --- .github/workflows/analysis.yml | 2 +- .github/workflows/frogbot-scan-repository.yml | 2 +- .github/workflows/mavenTests.yml | 2 +- .github/workflows/nugetTests.yml | 2 +- .github/workflows/xrayTests.yml | 6 ++++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index e78785890..1d9be52f3 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -31,7 +31,7 @@ jobs: with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-go + restore-keys: ${{ runner.os }}-go- - name: Run Go vet run: go vet -v ./... diff --git a/.github/workflows/frogbot-scan-repository.yml b/.github/workflows/frogbot-scan-repository.yml index 23f4e003f..b80238da9 100644 --- a/.github/workflows/frogbot-scan-repository.yml +++ b/.github/workflows/frogbot-scan-repository.yml @@ -10,7 +10,7 @@ permissions: security-events: write jobs: scan-repository: - name: Scan Repository (${{ matrix.branch }}) + name: Scan Repository (${{ matrix.branch }} branch) runs-on: ubuntu-latest strategy: matrix: diff --git a/.github/workflows/mavenTests.yml b/.github/workflows/mavenTests.yml index 25d0f1f10..a7f55587c 100644 --- a/.github/workflows/mavenTests.yml +++ b/.github/workflows/mavenTests.yml @@ -35,7 +35,7 @@ jobs: with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-go + restore-keys: ${{ runner.os }}-go- - name: Setup Maven v3.8.8 for macOS uses: stCarolas/setup-maven@v4.5 with: diff --git a/.github/workflows/nugetTests.yml b/.github/workflows/nugetTests.yml index c17fadd48..262dabb50 100644 --- a/.github/workflows/nugetTests.yml +++ b/.github/workflows/nugetTests.yml @@ -43,7 +43,7 @@ jobs: with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-go + restore-keys: ${{ runner.os }}-go- - name: Setup Artifactory run: | go install github.com/jfrog/jfrog-testing-infra/local-rt-setup@latest diff --git a/.github/workflows/xrayTests.yml b/.github/workflows/xrayTests.yml index 83d8a6f64..afb659a97 100644 --- a/.github/workflows/xrayTests.yml +++ b/.github/workflows/xrayTests.yml @@ -61,9 +61,11 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} - - name: Run Xray tests + + - name: Run Xray tests (without Docker Scan) run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.xray --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --jfrog.user=${{ secrets.PLATFORM_USER }} --test.containerRegistry=${{ secrets.CONTAINER_REGISTRY }} if: ${{ matrix.os != 'ubuntu' }} - - name: Run Docker scan and Xray tests + + - name: Run Xray tests (with Docker Scan, only on Ubuntu) run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.xray --test.dockerScan --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --test.containerRegistry=${{ secrets.CONTAINER_REGISTRY }} if: ${{ matrix.os == 'ubuntu' }}