Update crypto pkg version to fix sec alert #930
Closed
+12
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
This PR fixes vulnerability alert for the
cryptopkg.Build the binary:
➜ nginx-prometheus-exporter git:(main) ✗ make CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X github.com/prometheus/common/version.Version=1.1.0" -o nginx-prometheus-exporter go: downloading github.com/go-kit/log v0.2.1 go: downloading github.com/alecthomas/kingpin/v2 v2.4.0 go: downloading github.com/nginxinc/nginx-plus-go-client v1.2.0 go: downloading github.com/prometheus/client_golang v1.19.1 go: downloading github.com/prometheus/common v0.54.0 go: downloading github.com/prometheus/exporter-toolkit v0.11.0 go: downloading github.com/go-logfmt/logfmt v0.5.1 go: downloading github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 go: downloading github.com/xhit/go-str2duration/v2 v2.1.0 go: downloading github.com/prometheus/procfs v0.12.0 go: downloading github.com/cespare/xxhash/v2 v2.2.0 go: downloading google.golang.org/protobuf v1.34.0 go: downloading golang.org/x/crypto v0.22.0 go: downloading golang.org/x/sync v0.5.0 go: downloading github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f go: downloading golang.org/x/net v0.24.0 go: downloading golang.org/x/oauth2 v0.19.0 go: downloading golang.org/x/sys v0.19.0 go: downloading github.com/jpillora/backoff v1.0.0 go: downloading golang.org/x/text v0.14.0Run
govulncheckAfter the pkg update:
➜ nginx-prometheus-exporter git:(chore/vuln-fix) ✗ make CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X github.com/prometheus/common/version.Version=1.1.0" -o nginx-prometheus-exporter➜ nginx-prometheus-exporter git:(chore/vuln-fix) ✗ govulncheck -mode binary -show verbose nginx-prometheus-exporter Scanning your binary for known vulnerabilities... Fetching vulnerabilities from the database... Checking the binary against the vulnerabilities... No vulnerabilities found.Checklist
Before creating a PR, run through this checklist and mark each as complete.