diff --git a/cmd/tidelift-sbom-vulnerability-reporter/main.go b/cmd/tidelift-sbom-vulnerability-reporter/main.go index e37d950..c6268dd 100644 --- a/cmd/tidelift-sbom-vulnerability-reporter/main.go +++ b/cmd/tidelift-sbom-vulnerability-reporter/main.go @@ -119,6 +119,7 @@ func writeVulnerabilitiesReport(outputFile string, purls []packageurl.PackageURL ContentType("application/json"). // TODO: could use the full auth setup that we do in the tidelift cli Header("Authorization", "Bearer "+os.Getenv("TIDELIFT_API_KEY")). + Header("User-Agent", "tidelift-sbom-info/0.1"). Fetch(context.Background()); err != nil { log.Warn(fmt.Sprintf("problem fetching vulnerability info %s ", err)) continue diff --git a/internal/utils/utils.go b/internal/utils/utils.go index ca4fbd6..ce60f58 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -43,6 +43,7 @@ func GetPackageInfo(purls []packageurl.PackageURL) ([]api.PackageDetail, []api.P ContentType("application/json"). // TODO: could use the full auth setup that we do in the tidelift cli Header("Authorization", "Bearer "+os.Getenv("TIDELIFT_API_KEY")). + Header("User-Agent", "tidelift-sbom-info/0.1"). Fetch(context.Background()); err != nil { log.Warn(fmt.Sprintf("problem fetching package info %s ", err)) } @@ -65,6 +66,7 @@ func GetReleaseInfo(purls []packageurl.PackageURL) ([]api.ReleaseDetail, []Packa ContentType("application/json"). // TODO: could use the full auth setup that we do in the tidelift cli Header("Authorization", "Bearer "+os.Getenv("TIDELIFT_API_KEY")). + Header("User-Agent", "tidelift-sbom-info/0.1"). Fetch(context.Background()); err != nil { log.Warn(fmt.Sprintf("problem fetching package info %s ", err)) }