chore(deps): update all dependencies (#1333)

* chore(deps): update all dependencies

* Fix all lint warnings after upgrading golangci-lint action

Change-Id: I7b4162307ae0d6a1c9ec00b7127469c64ed93f64
Signed-off-by: Cosmin Cojocar <ccojocar@google.com>

* Remove the backup file

Signed-off-by: Cosmin Cojocar <ccojocar@google.com>

---------

Signed-off-by: Cosmin Cojocar <ccojocar@google.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cosmin Cojocar <ccojocar@google.com>
This commit is contained in:
renovate[bot]
2025-04-07 13:12:14 +02:00
committed by GitHub
parent 1d458c50e1
commit d514c42671
11 changed files with 95 additions and 81 deletions

View File

@@ -61,7 +61,7 @@ USAGE:
`
// Environment variable for AI API key.
aiApiKeyEnv = "GOSEC_AI_API_KEY" // #nosec G101
aiAPIKeyEnv = "GOSEC_AI_API_KEY" // #nosec G101
)
type arrayFlags []string
@@ -154,10 +154,10 @@ var (
flagTerse = flag.Bool("terse", false, "Shows only the results and summary")
// AI platform provider to generate solutions to issues
flagAiApiProvider = flag.String("ai-api-provider", "", "AI API provider to generate auto fixes to issues.\nValid options are: gemini")
flagAiAPIProvider = flag.String("ai-api-provider", "", "AI API provider to generate auto fixes to issues.\nValid options are: gemini")
// key to implementing AI provider services
flagAiApiKey = flag.String("ai-api-key", "", "Key to access the AI API")
flagAiAPIKey = flag.String("ai-api-key", "", "Key to access the AI API")
// endpoint to the AI provider
flagAiEndpoint = flag.String("ai-endpoint", "", "Endpoint AI API.\nThis is optional, the default API endpoint will be used when not provided.")
@@ -504,12 +504,12 @@ func main() {
reportInfo := gosec.NewReportInfo(issues, metrics, errors).WithVersion(Version)
// Call AI request to solve the issues
aiApiKey := os.Getenv(aiApiKeyEnv)
if aiApiKeyEnv == "" {
aiApiKey = *flagAiApiKey
aiAPIKey := os.Getenv(aiAPIKeyEnv)
if aiAPIKeyEnv == "" {
aiAPIKey = *flagAiAPIKey
}
if *flagAiApiProvider != "" && aiApiKey != "" {
err := autofix.GenerateSolution(*flagAiApiProvider, aiApiKey, *flagAiEndpoint, issues)
if *flagAiAPIProvider != "" && aiAPIKey != "" {
err := autofix.GenerateSolution(*flagAiAPIProvider, aiAPIKey, *flagAiEndpoint, issues)
if err != nil {
logger.Print(err)
}

View File

@@ -108,7 +108,7 @@ func getGoCipherConfig(name string, sstls ServerSideTLSJson) (goCipherConfigurat
cipherConf.MinVersion = fmt.Sprintf("0x%04x", versions[0])
cipherConf.MaxVersion = fmt.Sprintf("0x%04x", versions[len(versions)-1])
} else {
return cipherConf, fmt.Errorf("No TLS versions found for configuration '%s'", name)
return cipherConf, fmt.Errorf("no TLS versions found for configuration '%s'", name)
}
return cipherConf, nil
}