Skip to content

Commit 62e989c

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into always_relative_path
2 parents 71694d8 + 015f1b4 commit 62e989c

38 files changed

+329
-172
lines changed

.github/actions/install-and-setup/action.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ runs:
1212
steps:
1313
# Install dependencies
1414
- name: Setup Go
15-
uses: actions/setup-go@v5
15+
uses: actions/setup-go@v6
1616
with:
1717
go-version: 1.24.x
1818
# - name: Setup Go with cache
@@ -27,21 +27,21 @@ runs:
2727
run: gem install cocoapods
2828

2929
- name: Install npm
30-
uses: actions/setup-node@v4
30+
uses: actions/setup-node@v6
3131
with:
3232
node-version: "16"
3333
- name: Setup Pnpm
34-
uses: pnpm/action-setup@v3
34+
uses: pnpm/action-setup@v4
3535
with:
3636
version: 8
3737

3838
- name: Install Java
39-
uses: actions/setup-java@v4
39+
uses: actions/setup-java@v5
4040
with:
4141
java-version: "11"
4242
distribution: "adopt"
4343
- name: Setup Gradle
44-
uses: gradle/gradle-build-action@v2
44+
uses: gradle/actions/setup-gradle@v3
4545
with:
4646
gradle-version: 7.6
4747

@@ -50,7 +50,7 @@ runs:
5050
with:
5151
nuget-version: 6.11.0
5252
- name: Install dotnet
53-
uses: actions/setup-dotnet@v4
53+
uses: actions/setup-dotnet@v5
5454
with:
5555
dotnet-version: '6.x'
5656

@@ -72,7 +72,7 @@ runs:
7272
shell: 'bash'
7373

7474
- name: Setup Python3
75-
uses: actions/setup-python@v5
75+
uses: actions/setup-python@v6
7676
with:
7777
python-version: "3.x"
7878
- name: Setup Pipenv
@@ -87,21 +87,16 @@ runs:
8787
conan profile detect
8888
shell: ${{ runner.os == 'Windows' && 'powershell' || 'bash' }}
8989

90-
- name: Install Swift on Linux
91-
uses: swift-actions/setup-swift@v2
92-
if: ${{ inputs.install-swift == 'true' && runner.os == 'Linux'}}
93-
94-
- name: Install Swift on MacOS
95-
run: brew install swift
96-
shell: ${{ runner.os == 'macOS' && 'sh' || 'bash' || 'pwsh' }}
97-
if: ${{ inputs.install-swift == 'true' && runner.os == 'macOS'}}
90+
- name: Install Swift on Linux and macOS
91+
uses: SwiftyLab/setup-swift@latest
92+
if: ${{ inputs.install-swift == 'true' && (runner.os == 'Linux' || runner.os == 'macOS') }}
9893

9994
- name: Install Swift on Windows
10095
uses: compnerd/[email protected]
10196
with:
10297
branch: swift-6.1-release
10398
tag: 6.1-RELEASE
104-
if: ${{ inputs.install-swift == 'true' && runner.os == 'Windows'}}
99+
if: ${{ inputs.install-swift == 'true' && runner.os == 'Windows' }}
105100

106101
# Ensure Java 11 remains active after all installations (Swift setup might override it)
107102
- name: Force Java 11 on Windows

.github/workflows/analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ${{ matrix.os }}-latest
2020
steps:
2121
- name: Checkout code
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v5
2323
with:
2424
ref: ${{ github.event.pull_request.head.sha }}
2525

@@ -33,7 +33,7 @@ jobs:
3333
runs-on: ubuntu-latest
3434
steps:
3535
- name: Checkout Source
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@v5
3737

3838
- name: Setup Go with cache
3939
uses: jfrog/.github/actions/install-go-with-cache@main
@@ -48,7 +48,7 @@ jobs:
4848
runs-on: ubuntu-latest
4949
steps:
5050
- name: Checkout Source
51-
uses: actions/checkout@v4
51+
uses: actions/checkout@v5
5252

5353
- name: Setup Go with cache
5454
uses: jfrog/.github/actions/install-go-with-cache@main
@@ -60,7 +60,7 @@ jobs:
6060
name: Spell Check
6161
runs-on: ubuntu-latest
6262
steps:
63-
- uses: actions/checkout@v4
63+
- uses: actions/checkout@v5
6464

6565
- name: Check spelling
6666
uses: crate-ci/typos@master

.github/workflows/cla.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: "CLA Assistant"
2020
if: ${{ steps.sign-or-recheck.outputs.match != '' || github.event_name == 'pull_request_target' }}
2121
# Alpha Release
22-
uses: cla-assistant/[email protected].0
22+
uses: cla-assistant/[email protected].1
2323
env:
2424
# Generated and maintained by GitHub
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/embedded-jar-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
env:
1616
GOPROXY: direct
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919

2020
- name: Download JARs
2121
run: buildscripts/download-jars.sh

.github/workflows/test.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: JFrog CLI Security Tests
33
permissions:
44
actions: read
55
contents: read
6+
pull-requests: write
67

78
on:
89
push:
@@ -33,17 +34,17 @@ jobs:
3334
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push'
3435
runs-on: ubuntu-latest
3536
steps:
37+
- name: Checkout code
38+
uses: actions/checkout@v5
39+
with:
40+
ref: ${{ github.event.pull_request.head.sha }}
41+
3642
- name: Remove 'safe to test' label
3743
uses: actions-ecosystem/action-remove-labels@v1
3844
if: ${{ github.event_name != 'push' }}
3945
with:
4046
labels: "safe to test"
4147

42-
- name: Checkout code
43-
uses: actions/checkout@v4
44-
with:
45-
ref: ${{ github.event.pull_request.head.sha }}
46-
4748
- name: Start FastCI Optimization
4849
uses: jfrog-fastci/fastci@main
4950
with:
@@ -69,7 +70,7 @@ jobs:
6970
steps:
7071
# Prepare the environment
7172
- name: Checkout code
72-
uses: actions/checkout@v4
73+
uses: actions/checkout@v5
7374
with:
7475
ref: ${{ github.event.pull_request.head.sha }}
7576

@@ -122,7 +123,7 @@ jobs:
122123
steps:
123124
# Prepare the environment
124125
- name: Checkout code
125-
uses: actions/checkout@v4
126+
uses: actions/checkout@v5
126127
with:
127128
ref: ${{ github.event.pull_request.head.sha }}
128129

@@ -153,7 +154,7 @@ jobs:
153154
steps:
154155
# Prepare the environment
155156
- name: Checkout code
156-
uses: actions/checkout@v4
157+
uses: actions/checkout@v5
157158
with:
158159
ref: ${{ github.event.pull_request.head.sha }}
159160

@@ -182,7 +183,7 @@ jobs:
182183
steps:
183184
# Prepare the environment
184185
- name: Checkout code
185-
uses: actions/checkout@v4
186+
uses: actions/checkout@v5
186187
with:
187188
ref: ${{ github.event.pull_request.head.sha }}
188189
- name: Start FastCI Optimization
@@ -209,7 +210,7 @@ jobs:
209210
steps:
210211
# Prepare the environment
211212
- name: Checkout code
212-
uses: actions/checkout@v4
213+
uses: actions/checkout@v5
213214
with:
214215
ref: ${{ github.event.pull_request.head.sha }}
215216
- name: Start FastCI Optimization
@@ -236,7 +237,7 @@ jobs:
236237
steps:
237238
# Prepare the environment
238239
- name: Checkout code
239-
uses: actions/checkout@v4
240+
uses: actions/checkout@v5
240241
with:
241242
ref: ${{ github.event.pull_request.head.sha }}
242243

@@ -265,7 +266,7 @@ jobs:
265266
steps:
266267
# Prepare the environment
267268
- name: Checkout code
268-
uses: actions/checkout@v4
269+
uses: actions/checkout@v5
269270
with:
270271
ref: ${{ github.event.pull_request.head.sha }}
271272

@@ -294,7 +295,7 @@ jobs:
294295
steps:
295296
# Prepare the environment
296297
- name: Checkout code
297-
uses: actions/checkout@v4
298+
uses: actions/checkout@v5
298299
with:
299300
ref: ${{ github.event.pull_request.head.sha }}
300301

@@ -323,7 +324,7 @@ jobs:
323324
steps:
324325
# Prepare the environment
325326
- name: Checkout code
326-
uses: actions/checkout@v4
327+
uses: actions/checkout@v5
327328
with:
328329
ref: ${{ github.event.pull_request.head.sha }}
329330

artifactory_test.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323
"github.com/jfrog/jfrog-cli-security/jas"
2424
securityTests "github.com/jfrog/jfrog-cli-security/tests"
2525
securityTestUtils "github.com/jfrog/jfrog-cli-security/tests/utils"
26-
"github.com/jfrog/jfrog-cli-security/tests/utils/integration"
2726
securityIntegrationTestUtils "github.com/jfrog/jfrog-cli-security/tests/utils/integration"
2827
"github.com/jfrog/jfrog-cli-security/utils"
2928
"github.com/jfrog/jfrog-cli-security/utils/artifactory"
@@ -49,6 +48,7 @@ func TestDependencyResolutionFromArtifactory(t *testing.T) {
4948
resolveRepoName string
5049
cacheRepoName string
5150
projectType project.ProjectType
51+
skipMsg string
5252
}{
5353
{
5454
testProjectPath: []string{"npm", "npm-no-lock"},
@@ -61,6 +61,7 @@ func TestDependencyResolutionFromArtifactory(t *testing.T) {
6161
resolveRepoName: securityTests.NugetRemoteRepo,
6262
cacheRepoName: securityTests.NugetRemoteRepo,
6363
projectType: project.Dotnet,
64+
skipMsg: "Dotnet restore fails, pending fix XRAY-128186",
6465
},
6566
{
6667
testProjectPath: []string{"yarn", "yarn-v2"},
@@ -85,6 +86,7 @@ func TestDependencyResolutionFromArtifactory(t *testing.T) {
8586
resolveRepoName: securityTests.MvnVirtualRepo,
8687
cacheRepoName: securityTests.MvnRemoteRepo,
8788
projectType: project.Maven,
89+
skipMsg: "Snapshot repository is blocked by JPD, pending fix XRAY-124910",
8890
},
8991
{
9092
testProjectPath: []string{"go", "simple-project"},
@@ -116,6 +118,9 @@ func TestDependencyResolutionFromArtifactory(t *testing.T) {
116118

117119
for _, testCase := range testCases {
118120
t.Run(testCase.projectType.String(), func(t *testing.T) {
121+
if testCase.skipMsg != "" {
122+
securityTestUtils.SkipTestIfDurationNotPassed(t, "22-10-2025", 30, testCase.skipMsg)
123+
}
119124
testSingleTechDependencyResolution(t, testCase.testProjectPath, testCase.resolveRepoName, testCase.cacheRepoName, testCase.projectType)
120125
})
121126
}
@@ -289,7 +294,7 @@ func TestUploadCdxCmdCommand(t *testing.T) {
289294
}
290295
defer securityIntegrationTestUtils.ExecDeleteRepo(repoPath)
291296
// Run the upload command
292-
assert.NoError(t, integration.GetArtifactoryCli(cli.GetJfrogCliSecurityApp()).Exec("upload-cdx", "--rt-repo-path", repoPath, cdxFileToUpload))
297+
assert.NoError(t, securityIntegrationTestUtils.GetArtifactoryCli(cli.GetJfrogCliSecurityApp()).Exec("upload-cdx", "--rt-repo-path", repoPath, cdxFileToUpload))
293298

294299
// Validate the file was uploaded successfully
295300
searchResults, err := artifactory.SearchArtifactsInRepo(securityTests.RtDetails, filepath.Base(cdxFileToUpload), repoPath)

buildscripts/download-jars.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# https://github.com/jfrog/maven-dep-tree
88

99
# Once you have updated the versions mentioned below, please execute this script from the root directory of the jfrog-cli-core to ensure the JAR files are updated.
10-
GRADLE_DEP_TREE_VERSION="3.0.4"
10+
GRADLE_DEP_TREE_VERSION="3.1.0"
1111
# Changing this version also requires a change in mavenDepTreeVersion within utils/java/mvn.go.
1212
MAVEN_DEP_TREE_VERSION="1.1.5"
1313

cli/docs/flags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ var commandFlags = map[string][]string{
163163
url, user, password, accessToken, ServerId, scanProjectKey, BuildVuln, OutputFormat, Fail, ExtendedTable, Rescan, InsecureTls,
164164
},
165165
DockerScan: {
166-
ServerId, scanProjectKey, Watches, RepoPath, Licenses, Sbom, OutputFormat, Fail, ExtendedTable, BypassArchiveLimits, MinSeverity, FixableOnly, ScanVuln, SecretValidation, InsecureTls,
166+
url, xrayUrl, user, password, accessToken, ServerId, scanProjectKey, Watches, RepoPath, Licenses, Sbom, OutputFormat, Fail, ExtendedTable, BypassArchiveLimits, MinSeverity, FixableOnly, ScanVuln, SecretValidation, InsecureTls,
167167
},
168168
Audit: {
169169
url, xrayUrl, user, password, accessToken, ServerId, InsecureTls, scanProjectKey, Watches, RepoPath, Sbom, Licenses, OutputFormat, ExcludeTestDeps,

cli/gitcommands.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func GitAuditCmd(c *components.Context) error {
8787
sbomGenerator, scaScanStrategy := getScanDynamicLogic(c)
8888
gitAuditCmd.SetSbomGenerator(sbomGenerator).SetScaScanStrategy(scaScanStrategy)
8989
// Run the command with progress bar if needed, Reporting error if Xsc service is enabled
90-
return reportErrorIfExists(xrayVersion, xscVersion, serverDetails, progressbar.ExecWithProgress(gitAuditCmd))
90+
return reportErrorIfExists(xrayVersion, xscVersion, serverDetails, gitAuditCmd.GetProjectKey(), progressbar.ExecWithProgress(gitAuditCmd))
9191
}
9292

9393
func GetCountContributorsParams(c *components.Context) (*contributors.CountContributorsParams, error) {

cli/scancommands.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ func AuditCmd(c *components.Context) error {
413413
}
414414
auditCmd.SetThreads(threads)
415415
// Reporting error if Xsc service is enabled
416-
return reportErrorIfExists(xrayVersion, xscVersion, serverDetails, progressbar.ExecWithProgress(auditCmd))
416+
return reportErrorIfExists(xrayVersion, xscVersion, serverDetails, auditCmd.GetProjectKey(), progressbar.ExecWithProgress(auditCmd))
417417
}
418418

419419
func CreateAuditCmd(c *components.Context) (string, string, *coreConfig.ServerDetails, *audit.AuditCommand, error) {
@@ -507,7 +507,7 @@ func AuditSpecificCmd(c *components.Context, technology techutils.Technology) er
507507
technologies := []string{string(technology)}
508508
auditCmd.SetTechnologies(technologies)
509509
// Reporting error if Xsc service is enabled
510-
return reportErrorIfExists(xrayVersion, xscVersion, serverDetails, progressbar.ExecWithProgress(auditCmd))
510+
return reportErrorIfExists(xrayVersion, xscVersion, serverDetails, auditCmd.GetProjectKey(), progressbar.ExecWithProgress(auditCmd))
511511
}
512512

513513
func CurationCmd(c *components.Context) error {

0 commit comments

Comments
 (0)