diff --git a/artifactory_test.go b/artifactory_test.go index 5095606aa..de6e2e4a9 100644 --- a/artifactory_test.go +++ b/artifactory_test.go @@ -258,12 +258,12 @@ func TestArtifactorySimpleUploadSpecUsingConfig(t *testing.T) { } func TestReleaseBundleImportOnPrem(t *testing.T) { + initArtifactoryTest(t, "") // Cleanup defer func() { deleteReceivedReleaseBundle(t, deleteReleaseBundleV1ApiUrl, "cli-tests", "2") cleanArtifactoryTest() }() - initArtifactoryTest(t, "") initLifecycleCli() // Sets the public key in Artifactory to accept the signed release bundle. sendArtifactoryTrustedPublicKey(t, artHttpDetails) diff --git a/buildtools/cli.go b/buildtools/cli.go index 8fa7284eb..60058bc2d 100644 --- a/buildtools/cli.go +++ b/buildtools/cli.go @@ -32,8 +32,8 @@ import ( huggingfaceCommands "github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/huggingface" "github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/mvn" "github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/npm" - "github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/pnpm" containerutils "github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/ocicontainer" + "github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/pnpm" "github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/terraform" "github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/yarn" commandsUtils "github.com/jfrog/jfrog-cli-core/v2/artifactory/commands/utils" @@ -68,13 +68,13 @@ import ( "github.com/jfrog/jfrog-cli/docs/buildtools/mvnconfig" "github.com/jfrog/jfrog-cli/docs/buildtools/npmcommand" "github.com/jfrog/jfrog-cli/docs/buildtools/npmconfig" - "github.com/jfrog/jfrog-cli/docs/buildtools/pnpmcommand" nugetdocs "github.com/jfrog/jfrog-cli/docs/buildtools/nuget" "github.com/jfrog/jfrog-cli/docs/buildtools/nugetconfig" "github.com/jfrog/jfrog-cli/docs/buildtools/pipconfig" "github.com/jfrog/jfrog-cli/docs/buildtools/pipenvconfig" "github.com/jfrog/jfrog-cli/docs/buildtools/pipenvinstall" "github.com/jfrog/jfrog-cli/docs/buildtools/pipinstall" + "github.com/jfrog/jfrog-cli/docs/buildtools/pnpmcommand" "github.com/jfrog/jfrog-cli/docs/buildtools/pnpmconfig" "github.com/jfrog/jfrog-cli/docs/buildtools/poetry" "github.com/jfrog/jfrog-cli/docs/buildtools/poetryconfig" diff --git a/docker_test.go b/docker_test.go index e777dd121..722b03c09 100644 --- a/docker_test.go +++ b/docker_test.go @@ -14,8 +14,8 @@ import ( "testing" "time" - urfavecli "github.com/urfave/cli" "github.com/jfrog/jfrog-client-go/utils/log" + urfavecli "github.com/urfave/cli" tests2 "github.com/jfrog/jfrog-cli-artifactory/utils/tests" diff --git a/general/summary/cli.go b/general/summary/cli.go index d9137edd9..deac5f2c1 100644 --- a/general/summary/cli.go +++ b/general/summary/cli.go @@ -131,7 +131,7 @@ func saveFile(content, filePath string) (err error) { if content == "" { return nil } -// #nosec G703 -- filePath is constructed from SummaryOutputDirPathEnv set by CLI, not arbitrary user input and filePath is already cleaned. + // #nosec G703 -- filePath is constructed from SummaryOutputDirPathEnv set by CLI, not arbitrary user input and filePath is already cleaned. file, err := os.Create(filepath.Clean(filePath)) if err != nil { return err @@ -151,7 +151,7 @@ func getSectionMarkdownContent(section MarkdownSection) (string, error) { if _, err := os.Stat(sectionFilepath); os.IsNotExist(err) { return "", nil } -// #nosec G703 -- sectionFilepath is constructed from SummaryOutputDirPathEnv set by CLI, not arbitrary user input + // #nosec G703 -- sectionFilepath is constructed from SummaryOutputDirPathEnv set by CLI, not arbitrary user input contentBytes, err := os.ReadFile(sectionFilepath) if err != nil { return "", fmt.Errorf("error reading markdown file for section %s: %w", section, err) diff --git a/utils/cliutils/utils.go b/utils/cliutils/utils.go index 9ce02eecd..513e4a4df 100644 --- a/utils/cliutils/utils.go +++ b/utils/cliutils/utils.go @@ -576,7 +576,6 @@ func CleanupResult(result *commandUtils.Result, err *error) { } } -// Checks if the requested plugin exists in registry and does not exist locally. func CheckNewCliVersionAvailable(currentVersion string) (warningMessage string, err error) { shouldCheck, err := shouldCheckLatestCliVersion() if err != nil || !shouldCheck { diff --git a/utils/cliutils/utils_test.go b/utils/cliutils/utils_test.go index f1a17a560..335bc27e0 100644 --- a/utils/cliutils/utils_test.go +++ b/utils/cliutils/utils_test.go @@ -368,7 +368,7 @@ type redirectingTransport struct { func (t *redirectingTransport) RoundTrip(req *http.Request) (*http.Response, error) { if req.URL.String() == t.targetURL { // Create a new request to the redirect URL - // #nosec G704 -- redirectURL is a controlled test value, not user input + // #nosec G704 -- redirectURL is a controlled test value, not user input redirectReq, err := http.NewRequest(req.Method, t.redirectURL, req.Body) //nolint:gosec // G704 - URL is a test-controlled constant if err != nil { return nil, err