Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion artifactory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6815,7 +6815,7 @@ func setupTestFilesForSearchPatterns(t *testing.T) {
tmpFile, err := os.CreateTemp("", "test-file-*.txt")
assert.NoError(t, err)
defer func(name string) {
_ = os.Remove(name)
_ = os.Remove(name) // #nosec G703 -- name is from CreateTemp, not user input
}(tmpFile.Name())
_, err = tmpFile.WriteString("test content")
if err != nil {
Expand Down
94 changes: 94 additions & 0 deletions buildtools/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/golang"
"github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/gradle"
helmcmd "github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/helm"
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"
containerutils "github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/ocicontainer"
Expand Down Expand Up @@ -58,6 +59,7 @@ import (
"github.com/jfrog/jfrog-cli/docs/buildtools/gopublish"
gradledoc "github.com/jfrog/jfrog-cli/docs/buildtools/gradle"
"github.com/jfrog/jfrog-cli/docs/buildtools/gradleconfig"
"github.com/jfrog/jfrog-cli/docs/buildtools/huggingface"
mvndoc "github.com/jfrog/jfrog-cli/docs/buildtools/mvn"
"github.com/jfrog/jfrog-cli/docs/buildtools/mvnconfig"
"github.com/jfrog/jfrog-cli/docs/buildtools/npmcommand"
Expand Down Expand Up @@ -475,6 +477,17 @@ func GetCommands() []cli.Command {
Category: buildToolsCategory,
Action: twineCmd,
},
{
Name: "hugging-face",
Aliases: []string{"hf"},
Flags: cliutils.GetCommandFlags(cliutils.HuggingFace),
HelpName: corecommon.CreateUsage("hugging-face", huggingface.GetDescription(), huggingface.Usage),
Description: huggingface.GetDescription(),
UsageText: huggingface.GetArguments(),
Hidden: true,
Action: huggingFaceCmd,
Category: buildToolsCategory,
},
})
return decorateWithFlagCapture(cmds)
}
Expand Down Expand Up @@ -1115,6 +1128,87 @@ func loginCmd(c *cli.Context) error {
return nil
}

func huggingFaceCmd(c *cli.Context) error {
if show, err := cliutils.ShowCmdHelpIfNeeded(c, c.Args()); show || err != nil {
return err
}
if c.NArg() < 1 {
return cliutils.WrongNumberOfArgumentsHandler(c)
}
serverDetails, err := coreConfig.GetDefaultServerConf()
if err != nil {
return err
}
args := cliutils.ExtractCommand(c)
cmdName, hfArgs := getCommandName(args)
hfArgs, buildConfiguration, err := build.ExtractBuildDetailsFromArgs(hfArgs)
if err != nil {
return err
}
switch cmdName {
case "u", "upload":
return huggingFaceUploadCmd(c, hfArgs, serverDetails, buildConfiguration)
case "d", "download":
return huggingFaceDownloadCmd(c, hfArgs, serverDetails, buildConfiguration)
default:
return errors.New("Wrong command: " + cmdName)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As much as I understood, artifactory does not support commands other than upload or download, then for default case:

  1. either we should let it be passthrough and let artifactory through error. In this way we will not miss out much incase server any fine day releases other commands support for hugging face.
  2. or, we should improve error message.

}
}

func huggingFaceUploadCmd(c *cli.Context, hfArgs []string, serverDetails *coreConfig.ServerDetails, buildConfiguration *build.BuildConfiguration) error {
// Upload requires folderPath and repoID
if len(hfArgs) < 2 {
return cliutils.PrintHelpAndReturnError("Folder path and repository ID are required.", c)
}
folderPath := hfArgs[0]
if folderPath == "" {
return cliutils.PrintHelpAndReturnError("Folder path cannot be empty.", c)
}
repoID := hfArgs[1]
if repoID == "" {
return cliutils.PrintHelpAndReturnError("Repository ID cannot be empty.", c)
}
Comment on lines +1160 to +1170
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess last two cases are redundant

revision := ""
if c.String("revision") != "" {
revision = c.String("revision")
}
repoType := c.String("repo-type")
if repoType == "" {
repoType = "model"
}
huggingFaceUploadCmd := huggingfaceCommands.NewHuggingFaceUpload().SetFolderPath(folderPath).SetRepoId(repoID).SetRepoType(repoType).SetRevision(revision).SetServerDetails(serverDetails).SetBuildConfiguration(buildConfiguration)
return commands.Exec(huggingFaceUploadCmd)
}

func huggingFaceDownloadCmd(c *cli.Context, hfArgs []string, serverDetails *coreConfig.ServerDetails, buildConfiguration *build.BuildConfiguration) error {
// Download requires repoID
if len(hfArgs) < 1 {
return cliutils.PrintHelpAndReturnError("Model/Dataset name is required.", c)
}
repoID := hfArgs[0]
if repoID == "" {
return cliutils.PrintHelpAndReturnError("Model/Dataset name cannot be empty.", c)
}
revision := ""
if c.String("revision") != "" {
revision = c.String("revision")
}
etagTimeout := 86400
if c.String("etag-timeout") != "" {
var err error
etagTimeout, err = strconv.Atoi(c.String("etag-timeout"))
if err != nil {
return errorutils.CheckErrorf("invalid etag-timeout value: %s", c.String("etag-timeout"))
}
}
repoType := c.String("repo-type")
if repoType == "" {
repoType = "model"
}
huggingFaceDownloadCmd := huggingfaceCommands.NewHuggingFaceDownload().SetRepoId(repoID).SetRepoType(repoType).SetRevision(revision).SetEtagTimeout(etagTimeout).SetServerDetails(serverDetails).SetBuildConfiguration(buildConfiguration)
return commands.Exec(huggingFaceDownloadCmd)
}

func dockerScanCmd(c *cli.Context, imageTag string) error {
if show, err := cliutils.ShowGenericCmdHelpIfNeeded(c, c.Args(), securityCLI.DockerScanCmdHiddenName); show || err != nil {
return err
Expand Down
22 changes: 11 additions & 11 deletions docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func setupInsecureBuildxBuilder(t *testing.T, builderName string) func() {
http = true
insecure = true
`, registryHost)
require.NoError(t, os.WriteFile(configPath, []byte(configContent), 0644))
require.NoError(t, os.WriteFile(configPath, []byte(configContent), 0644)) /* #nosec G703 -- configPath is constructed from test temp directory, not user input */

// Remove builder if it exists (stop first, then remove)
_ = exec.Command("docker", "buildx", "stop", builderName).Run()
Expand Down Expand Up @@ -427,7 +427,7 @@ RUN echo "Built for nested path test"
CMD ["echo", "Hello from nested path"]`, baseImage)

dockerfilePath := filepath.Join(workspace, "Dockerfile")
assert.NoError(t, os.WriteFile(dockerfilePath, []byte(dockerfileContent), 0644))
assert.NoError(t, os.WriteFile(dockerfilePath, []byte(dockerfileContent), 0644)) /* #nosec G703 -- dockerfilePath is constructed from test workspace, not user input */

// Cleanup old build
inttestutils.DeleteBuild(serverDetails.ArtifactoryUrl, buildName, artHttpDetails)
Expand Down Expand Up @@ -515,7 +515,7 @@ RUN echo "This is the nested base image"
CMD ["echo", "base"]`, alpineBase)

baseDockerfilePath := filepath.Join(workspace, "Dockerfile.base")
assert.NoError(t, os.WriteFile(baseDockerfilePath, []byte(baseDockerfile), 0644))
assert.NoError(t, os.WriteFile(baseDockerfilePath, []byte(baseDockerfile), 0644)) /* #nosec G703 -- baseDockerfilePath is constructed from test workspace, not user input */

// Push base image to nested path
inttestutils.DeleteBuild(serverDetails.ArtifactoryUrl, baseImageBuildName, artHttpDetails)
Expand All @@ -538,7 +538,7 @@ RUN echo "This is the child image using nested base"
CMD ["echo", "child"]`, baseImageTag)

childDockerfilePath := filepath.Join(workspace, "Dockerfile.child")
assert.NoError(t, os.WriteFile(childDockerfilePath, []byte(childDockerfile), 0644))
assert.NoError(t, os.WriteFile(childDockerfilePath, []byte(childDockerfile), 0644)) /* #nosec G703 -- childDockerfilePath is constructed from test workspace, not user input */

// Build child image
inttestutils.DeleteBuild(serverDetails.ArtifactoryUrl, childBuildName, artHttpDetails)
Expand Down Expand Up @@ -1092,7 +1092,7 @@ RUN echo "Hello from test"
CMD ["sh"]`, baseImage)

dockerfilePath := filepath.Join(workspace, "Dockerfile")
assert.NoError(t, os.WriteFile(dockerfilePath, []byte(dockerfileContent), 0644))
assert.NoError(t, os.WriteFile(dockerfilePath, []byte(dockerfileContent), 0644)) /* #nosec G703 -- dockerfilePath is constructed from test workspace, not user input */

// clean build before test
runJfrogCli(t, "rt", "bc", buildName, buildNumber)
Expand Down Expand Up @@ -1141,11 +1141,11 @@ RUN echo "Hello from test"
CMD ["sh"]`, baseImage)

dockerfilePath := filepath.Join(workspace, "Dockerfile")
assert.NoError(t, os.WriteFile(dockerfilePath, []byte(dockerfileContent), 0644))
assert.NoError(t, os.WriteFile(dockerfilePath, []byte(dockerfileContent), 0644)) /* #nosec G703 -- dockerfilePath is constructed from test workspace, not user input */

// Create test file
testFilePath := filepath.Join(workspace, "test.txt")
assert.NoError(t, os.WriteFile(testFilePath, []byte("Hello from Docker build test"), 0644))
assert.NoError(t, os.WriteFile(testFilePath, []byte("Hello from Docker build test"), 0644)) /* #nosec G703 -- testFilePath is constructed from test workspace, not user input */

// clean build before test
runJfrogCli(t, "rt", "bc", buildName, buildNumber)
Expand Down Expand Up @@ -1199,7 +1199,7 @@ FROM %s
CMD ["hello"]`, golangImage, alpineImage)

dockerfilePath := filepath.Join(workspace, "Dockerfile")
assert.NoError(t, os.WriteFile(dockerfilePath, []byte(dockerfileContent), 0644))
assert.NoError(t, os.WriteFile(dockerfilePath, []byte(dockerfileContent), 0644)) /* #nosec G703 -- dockerfilePath is constructed from test workspace, not user input */

// clean build before test
runJfrogCli(t, "rt", "bc", buildName, buildNumber)
Expand Down Expand Up @@ -1251,7 +1251,7 @@ RUN echo "Built with buildx"
CMD ["echo", "Hello from buildx"]`, baseImage)

dockerfilePath := filepath.Join(workspace, "Dockerfile")
assert.NoError(t, os.WriteFile(dockerfilePath, []byte(dockerfileContent), 0644))
assert.NoError(t, os.WriteFile(dockerfilePath, []byte(dockerfileContent), 0644)) /* #nosec G703 -- dockerfilePath is constructed from test workspace, not user input */

// Check if buildx is available
cmd := exec.Command("docker", "buildx", "version")
Expand Down Expand Up @@ -1310,7 +1310,7 @@ RUN echo "Testing virtual repo"
CMD ["sh"]`, baseImage)

dockerfilePath := filepath.Join(workspace, "Dockerfile")
assert.NoError(t, os.WriteFile(dockerfilePath, []byte(dockerfileContent), 0644))
assert.NoError(t, os.WriteFile(dockerfilePath, []byte(dockerfileContent), 0644)) /* #nosec G703 -- dockerfilePath is constructed from test workspace, not user input */

// clean build before test
runJfrogCli(t, "rt", "bc", buildName, buildNumber)
Expand Down Expand Up @@ -1455,7 +1455,7 @@ func TestDockerBuildPublishWithCIVcsProps(t *testing.T) {
CMD ["echo", "Hello from CI VCS test"]`, baseImage)

dockerfilePath := filepath.Join(workspace, "Dockerfile")
assert.NoError(t, os.WriteFile(dockerfilePath, []byte(dockerfileContent), 0644))
assert.NoError(t, os.WriteFile(dockerfilePath, []byte(dockerfileContent), 0644)) /* #nosec G703 -- dockerfilePath is constructed from test workspace, not user input */

// Clean build before test
runJfrogCli(t, "rt", "bc", buildName, buildNumber)
Expand Down
22 changes: 22 additions & 0 deletions docs/buildtools/huggingface/help.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package huggingface

var Usage = []string{
"hugging-face upload <folder-path> <repo-id> [command options]",
"hugging-face download <repo-id> [command options]",
}

func GetDescription() string {
return "Run Hugging Face commands with Artifactory integration."
}

func GetArguments() string {
return ` hugging-face sub-command
upload <folder-path> <repo-id>
Upload a folder to Hugging Face repository.
download <repo-id>
Download from Hugging Face repository.

Examples:
- jf hugging-face upload ./models my-org/my-model
- jf hf download my-org/my-model --revision=main`
}
1 change: 1 addition & 0 deletions general/ai/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ func sendRestAPI(apiType ApiType, content interface{}) (response string, err err
req.Header.Set(askRateLimitHeader, "true")
}
log.Debug(fmt.Sprintf("Sending HTTP %s request to: %s", req.Method, req.URL))
// #nosec G704 -- URL is a constant CLI-AI endpoint, not user-controlled input
resp, err := client.GetClient().Do(req)
if err != nil {
err = errorutils.CheckErrorf("CLI-AI server is not available. Please check your network or try again later.")
Expand Down
4 changes: 4 additions & 0 deletions general/summary/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +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
file, err := os.Create(filePath)
if err != nil {
return err
Expand All @@ -146,10 +147,12 @@ func saveFile(content, filePath string) (err error) {

func getSectionMarkdownContent(section MarkdownSection) (string, error) {
sectionFilepath := filepath.Join(os.Getenv(coreutils.SummaryOutputDirPathEnv), commandsummary.OutputDirName, string(section), markdownFileName)
// #nosec G703 -- sectionFilepath is constructed from SummaryOutputDirPathEnv set by CLI, not arbitrary user input
if _, err := os.Stat(sectionFilepath); os.IsNotExist(err) {
return "", nil
}

// #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)
Expand Down Expand Up @@ -280,6 +283,7 @@ func processScan(index commandsummary.Index, filePath string, scannedName string
// shouldGenerateUploadSummary checks if upload summary should be generated.
func shouldGenerateUploadSummary() (bool, error) {
buildInfoPath := filepath.Join(os.Getenv(coreutils.SummaryOutputDirPathEnv), commandsummary.OutputDirName, string(BuildInfo))
// #nosec G703 -- buildInfoPath is constructed from SummaryOutputDirPathEnv set by CLI, not arbitrary user input
if _, err := os.Stat(buildInfoPath); os.IsNotExist(err) {
return true, nil
}
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
github.com/jfrog/build-info-go v1.13.1-0.20260130140656-2d0d5593fccf
github.com/jfrog/gofrog v1.7.6
github.com/jfrog/jfrog-cli-application v1.0.2-0.20260202095705-3657239cde88
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260206111107-7a05b41040dd
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260210060138-bbe22834d469
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260202114755-cec5fd702f50
github.com/jfrog/jfrog-cli-evidence v0.8.3-0.20260202100913-d9ee9476845a
github.com/jfrog/jfrog-cli-platform-services v1.10.1-0.20251205121610-171eb9b0000e
Expand Down Expand Up @@ -259,7 +259,7 @@ replace github.com/ktrysmt/go-bitbucket => github.com/ktrysmt/go-bitbucket v0.9.

//replace github.com/jfrog/jfrog-cli-core/v2 => ../jfrog-cli-core

// replace github.com/jfrog/jfrog-cli-artifactory => github.com/fluxxBot/jfrog-cli-artifactory v0.0.0-20260130044429-464a5025d08a
replace github.com/jfrog/jfrog-cli-artifactory => github.com/naveenku-jfrog/jfrog-cli-artifactory v0.0.0-20260215172827-d3632dac1688

//replace github.com/jfrog/build-info-go => github.com/fluxxBot/build-info-go v1.10.10-0.20260105070825-d3f36f619ba5

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,6 @@ github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYL
github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w=
github.com/jfrog/jfrog-cli-application v1.0.2-0.20260202095705-3657239cde88 h1:KP6SmrduuGMMsMfHhBATv5I3W1iTtjBojtqEkPHBWk4=
github.com/jfrog/jfrog-cli-application v1.0.2-0.20260202095705-3657239cde88/go.mod h1:xum2HquWO5uExa/A7MQs3TgJJVEeoqTR+6Z4mfBr1Xw=
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260206111107-7a05b41040dd h1:ZKRwlPEkSmul7fBKat7qBVU3tSxd6xg2GbxQixK4COg=
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260206111107-7a05b41040dd/go.mod h1:1GKFtQs/5/3HRp1JyMHMQVT9lxzXR+YecO6dWdRThNs=
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260202114755-cec5fd702f50 h1:u3NvevCPC5ygeOMv39XSlpIOCt7PhLtFWR2XZ0QkKaU=
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260202114755-cec5fd702f50/go.mod h1:+Hnaikp/xCSPD/q7txxRy4Zc0wzjW/usrCSf+6uONSQ=
github.com/jfrog/jfrog-cli-evidence v0.8.3-0.20260202100913-d9ee9476845a h1:lTOAhUjKcOmM/0Kbj4V+I/VHPlW7YNAhIEVpGnCM5mI=
Expand Down Expand Up @@ -522,6 +520,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/natefinch/atomic v1.0.1 h1:ZPYKxkqQOx3KZ+RsbnP/YsgvxWQPGxjC0oBt2AhwV0A=
github.com/natefinch/atomic v1.0.1/go.mod h1:N/D/ELrljoqDyT3rZrsUmtsuzvHkeB/wWjHV22AZRbM=
github.com/naveenku-jfrog/jfrog-cli-artifactory v0.0.0-20260215172827-d3632dac1688 h1:nox/yTP9frtbUmD43cFgSIgQYH36NjbLMFlXqZmFgtM=
github.com/naveenku-jfrog/jfrog-cli-artifactory v0.0.0-20260215172827-d3632dac1688/go.mod h1:1GKFtQs/5/3HRp1JyMHMQVT9lxzXR+YecO6dWdRThNs=
github.com/nwaples/rardecode/v2 v2.2.2 h1:/5oL8dzYivRM/tqX9VcTSWfbpwcbwKG1QtSJr3b3KcU=
github.com/nwaples/rardecode/v2 v2.2.2/go.mod h1:7uz379lSxPe6j9nvzxUZ+n7mnJNgjsRNb6IbvGVHRmw=
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
Expand Down
2 changes: 1 addition & 1 deletion lifecycle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1713,5 +1713,5 @@ type KeyPairPayload struct {
Alias string `json:"alias,omitempty"`
Passphrase string `json:"passphrase,omitempty"`
PublicKey string `json:"publicKey,omitempty"`
PrivateKey string `json:"privateKey,omitempty"`
PrivateKey string `json:"privateKey,omitempty"` // #nosec G117 -- field name is for JSON serialization, not a hardcoded secret
}
1 change: 1 addition & 0 deletions nuget_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ func runInitNewConfig(t *testing.T, testSuite testInitNewConfigDescriptor, baseR
return
}

// #nosec G703 -- configFile path is created by test setup, not user input
content, err := os.ReadFile(configFile.Name())
if err != nil {
assert.NoError(t, err)
Expand Down
21 changes: 21 additions & 0 deletions utils/cliutils/commandsflags.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const (
Helm = "helm"
RubyConfig = "ruby-config"
Conan = "conan"
HuggingFace = "hugging-face"
Ping = "ping"
RtCurl = "rt-curl"
TemplateConsumer = "template-consumer"
Expand Down Expand Up @@ -593,6 +594,11 @@ const (
setupRepo = repo
PromotionType = "promotion-type"
Draft = "draft"

// Unique HuggingFace flags
hfRevision = "revision"
hfRepoType = "repo-type"
hfEtagTimeout = "etag-timeout"
)

var flagsMap = map[string]cli.Flag{
Expand Down Expand Up @@ -1749,6 +1755,18 @@ var flagsMap = map[string]cli.Flag{
Name: validateSha,
Usage: "[Default: false] Set to true to enable SHA validation during Docker push.` `",
},
hfRevision: cli.StringFlag{
Name: hfRevision,
Usage: "[Optional] HuggingFace revision/branch name.` `",
},
hfRepoType: cli.StringFlag{
Name: hfRepoType,
Usage: "[Default: model] HuggingFace repository type. Possible values: model, dataset, space.` `",
},
hfEtagTimeout: cli.StringFlag{
Name: hfEtagTimeout,
Usage: "[Default: 86400] ETag timeout in seconds for caching.` `",
},
}

var commandFlags = map[string][]string{
Expand Down Expand Up @@ -1987,6 +2005,9 @@ var commandFlags = map[string][]string{
Conan: {
BuildName, BuildNumber, module, Project,
},
HuggingFace: {
BuildName, BuildNumber, module, Project, hfRevision, hfRepoType, hfEtagTimeout,
},
Stats: {
xrOutput, accessToken, serverId,
},
Expand Down
1 change: 1 addition & 0 deletions utils/cliutils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,7 @@ func getLatestCliVersionFromGithubAPI() (githubVersionInfo githubResponse, err e
func doHttpRequest(client *http.Client, req *http.Request) (resp *http.Response, body []byte, err error) {
const maxResponseSize = 10 * 1024 * 1024 // 10MB limit
req.Close = true
// #nosec G704 -- URL is validated and constructed from CLI configuration, not arbitrary user input
resp, err = client.Do(req)
if errorutils.CheckError(err) != nil {
return
Expand Down
Loading
Loading