Skip to content

Commit

Permalink
Fix CVEs
Browse files Browse the repository at this point in the history
  • Loading branch information
ptodev committed Jul 18, 2024
1 parent bb5889f commit aa54203
Show file tree
Hide file tree
Showing 16 changed files with 155 additions and 131 deletions.
116 changes: 58 additions & 58 deletions .drone/drone.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .github/workflows/check-linux-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
push: false
tags: grafana/agent-build-image:latest
build-args: |
GO_RUNTIME=golang:1.22.1-bullseye
GO_RUNTIME=golang:1.22.5-bullseye
- name: Create test Linux build image for boring crypto
uses: docker/build-push-action@v5
Expand All @@ -34,4 +34,4 @@ jobs:
push: false
tags: grafana/agent-build-image:latest
build-args: |
GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22.1-bullseye
GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22.5-bullseye
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ internal API changes are not present.
Main (unreleased)
-----------------

### Security fixes

- Fixes following vulnerabilities (@ptodev)
* [GHSA-87m9-rv8p-rgmg](https://github.com/open-telemetry/opentelemetry-collector/security/advisories/GHSA-c74f-6mfw-mm4v)
* [CVE-2024-35255](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-35255)
* [CVE-2024-6104](https://discuss.hashicorp.com/t/hcsec-2024-12-go-retryablehttp-can-leak-basic-auth-credentials-to-log-files/68027)
* [GHSA-mh55-gqvf-xfwm](https://github.com/advisories/GHSA-mh55-gqvf-xfwm)
* [CVE-2024-24790](https://avd.aquasec.com/nvd/2024/cve-2024-24790/)
* [CVE-2023-45288](https://avd.aquasec.com/nvd/cve-2023-45288)
* [CVE-2024-24788](https://avd.aquasec.com/nvd/cve-2024-24788)
* [CVE-2024-24789](https://avd.aquasec.com/nvd/cve-2024-24789)
* [CVE-2024-24791](https://avd.aquasec.com/nvd/cve-2024-24791)

### Features

- A new `otelcol.exporter.debug` component for printing OTel telemetry from
Expand All @@ -23,6 +36,10 @@ Main (unreleased)
- Fix a bug in Static mode and Flow which prevented config reloads to work if a Loki `metrics` stage is in the pipeline.
This resulted in a "failed to unregister all metrics from previous promtail" message. (@ptodev)

### Enhancements

- Update to Go 1.22.5. (@ptodev)

v0.41.1 (2024-06-07)
--------------------

Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agent-operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
# in environment variables.

FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.40.2 as build
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.41.1 as build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
# in environment variables.

FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.40.2 as build
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.41.1 as build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
Expand Down
4 changes: 2 additions & 2 deletions cmd/grafana-agent/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM grafana/agent-build-image:0.40.2-windows as builder
FROM grafana/agent-build-image:0.41.1-windows as builder
ARG VERSION
ARG RELEASE_BUILD=1

Expand All @@ -14,7 +14,7 @@ RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERS
RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERSION=${VERSION} GO_TAGS='builtinassets' make agent""
# In this case, we're separating the clean command from make agent to avoid an issue where access to some mod cache
# files is denied immediately after make agent, for example:
# "go: remove C:\go\pkg\mod\golang.org\[email protected].1.windows-amd64\bin\go.exe: Access is denied."
# "go: remove C:\go\pkg\mod\golang.org\[email protected].5.windows-amd64\bin\go.exe: Access is denied."
RUN ""C:\Program Files\git\bin\bash.exe" -c "go clean -cache -modcache""

# Use the smallest container possible for the final image
Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agentctl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
# in environment variables.

FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.40.2 as build
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.41.1 as build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
Expand Down
4 changes: 2 additions & 2 deletions cmd/grafana-agentctl/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM grafana/agent-build-image:0.40.2-windows as builder
FROM grafana/agent-build-image:0.41.1-windows as builder
ARG VERSION
ARG RELEASE_BUILD=1

Expand All @@ -10,7 +10,7 @@ SHELL ["cmd", "/S", "/C"]
RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERSION=${VERSION} make agentctl""
# We're separating the clean command from make agent to avoid an issue where access to some mod cache
# files is denied immediately after make agentctl, for example:
# "go: remove C:\go\pkg\mod\golang.org\[email protected].1.windows-amd64\bin\go.exe: Access is denied."
# "go: remove C:\go\pkg\mod\golang.org\[email protected].5.windows-amd64\bin\go.exe: Access is denied."
RUN ""C:\Program Files\git\bin\bash.exe" -c "go clean -cache -modcache""

# Use the smallest container possible for the final image
Expand Down
6 changes: 3 additions & 3 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ include docs.mk
docs: check-cloudwatch-integration

check-cloudwatch-integration:
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.1-bullseye go run static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/static/configuration/integrations/cloudwatch-exporter-config.md
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.1-bullseye go run static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/flow/reference/components/prometheus.exporter.cloudwatch.md
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.5-bullseye go run static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/static/configuration/integrations/cloudwatch-exporter-config.md
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.5-bullseye go run static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/flow/reference/components/prometheus.exporter.cloudwatch.md

generate-cloudwatch-integration:
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.1-bullseye go run static/integrations/cloudwatch_exporter/docs/doc.go generate
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.5-bullseye go run static/integrations/cloudwatch_exporter/docs/doc.go generate

sources/assets/hierarchy.svg: sources/operator/hierarchy.dot
cat $< | $(PODMAN) run --rm -i nshine/dot dot -Tsvg > $@
36 changes: 18 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/grafana/agent

go 1.22.1
go 1.22.5

retract (
v1.3.191 // Published accidentally
Expand All @@ -9,7 +9,7 @@ retract (
)

require (
cloud.google.com/go/pubsub v1.34.0
cloud.google.com/go/pubsub v1.36.1
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0
github.com/Azure/go-autorest/autorest v0.11.29
Expand Down Expand Up @@ -44,7 +44,7 @@ require (
github.com/go-sourcemap/sourcemap v2.1.3+incompatible
github.com/go-sql-driver/mysql v1.7.1
github.com/gogo/protobuf v1.3.2
github.com/golang/protobuf v1.5.3
github.com/golang/protobuf v1.5.4
github.com/golang/snappy v0.0.4
github.com/google/cadvisor v0.47.0
github.com/google/dnsmasq_exporter v0.2.1-0.20230620100026-44b14480804a
Expand Down Expand Up @@ -88,7 +88,7 @@ require (
github.com/jaegertracing/jaeger v1.54.0
github.com/jmespath/go-jmespath v0.4.0
github.com/json-iterator/go v1.1.12
github.com/klauspost/compress v1.17.7
github.com/klauspost/compress v1.17.8
github.com/lib/pq v1.10.9
github.com/mackerelio/go-osstat v0.2.3
github.com/miekg/dns v1.1.56
Expand Down Expand Up @@ -157,7 +157,7 @@ require (
github.com/prometheus/snmp_exporter v0.26.0
github.com/prometheus/statsd_exporter v0.22.8
github.com/richardartoul/molecule v1.0.1-0.20221107223329-32cfee06a052
github.com/rs/cors v1.10.1
github.com/rs/cors v1.11.0
github.com/shirou/gopsutil/v3 v3.24.1
github.com/sijms/go-ora/v2 v2.7.6
github.com/sirupsen/logrus v1.9.3
Expand Down Expand Up @@ -222,9 +222,9 @@ require (
golang.org/x/sys v0.21.0
golang.org/x/text v0.16.0
golang.org/x/time v0.5.0
google.golang.org/api v0.155.0
google.golang.org/grpc v1.62.1
google.golang.org/protobuf v1.33.0
google.golang.org/api v0.169.0
google.golang.org/grpc v1.64.0
google.golang.org/protobuf v1.34.1
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
gotest.tools v2.2.0+incompatible
Expand All @@ -239,10 +239,10 @@ require (
)

require (
cloud.google.com/go v0.112.0 // indirect
cloud.google.com/go/compute v1.23.3 // indirect
cloud.google.com/go v0.112.1 // indirect
cloud.google.com/go/compute v1.25.1 // indirect
cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect
cloud.google.com/go/iam v1.1.5 // indirect
cloud.google.com/go/iam v1.1.6 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.2 // indirect
github.com/AlekSi/pointer v1.1.0 // indirect
Expand Down Expand Up @@ -309,7 +309,7 @@ require (
github.com/cespare/xxhash v1.1.0 // indirect
github.com/checkpoint-restore/go-criu/v5 v5.3.0 // indirect
github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58 // indirect
github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa // indirect
github.com/cncf/xds/go v0.0.0-20240318125728-8a4994d93e50 // indirect
github.com/containerd/ttrpc v1.2.2 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/cpuguy83/dockercfg v0.3.1 // indirect
Expand Down Expand Up @@ -383,7 +383,7 @@ require (
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/googleapis/gax-go/v2 v2.12.2 // indirect
github.com/gophercloud/gophercloud v1.7.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/gosnmp/gosnmp v1.37.0 // indirect
Expand Down Expand Up @@ -476,7 +476,7 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/montanaflynn/stats v0.7.0 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/mostynb/go-grpc-compression v1.2.2 // indirect
github.com/mostynb/go-grpc-compression v1.2.3 // indirect
github.com/mrunalp/fileutils v0.5.1 // indirect
github.com/mtibben/percent v0.2.1 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
Expand Down Expand Up @@ -568,7 +568,7 @@ require (
go.mongodb.org/mongo-driver v1.12.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/collector/config/internal v0.96.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel/bridge/opencensus v1.24.0 // indirect
go4.org/netipx v0.0.0-20230125063823-8449b0a6169f // indirect
Expand All @@ -580,9 +580,9 @@ require (
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
gonum.org/v1/gonum v0.14.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78 // indirect
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand Down
Loading

0 comments on commit aa54203

Please sign in to comment.