From 7833bbcedc722b4460b43b0e934a6b45e3961ad3 Mon Sep 17 00:00:00 2001 From: Mauri de Souza Meneguzzo Date: Thu, 6 Mar 2025 07:39:04 -0300 Subject: [PATCH 1/2] chore: update elastic-agent-libs to v0.18.8 (#6938) * chore: update elastic-agent-libs * soften the changelog * wording * better wording in changelog entry (cherry picked from commit f34071c29b3a948a849d37f6ad993a287184ea51) # Conflicts: # go.mod # go.sum --- NOTICE.txt | 4 +-- ...symlink-following-when-rotating-files.yaml | 34 +++++++++++++++++++ go.mod | 6 ++++ go.sum | 9 +++++ 4 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 changelog/fragments/1740772872-mitigate-symlink-following-when-rotating-files.yaml diff --git a/NOTICE.txt b/NOTICE.txt index 0172bca99b8..30fbaa9350d 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1296,11 +1296,11 @@ SOFTWARE -------------------------------------------------------------------------------- Dependency : github.com/elastic/elastic-agent-libs -Version: v0.18.2 +Version: v0.18.8 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-libs@v0.18.2/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-libs@v0.18.8/LICENSE: Apache License Version 2.0, January 2004 diff --git a/changelog/fragments/1740772872-mitigate-symlink-following-when-rotating-files.yaml b/changelog/fragments/1740772872-mitigate-symlink-following-when-rotating-files.yaml new file mode 100644 index 00000000000..60827bd41f1 --- /dev/null +++ b/changelog/fragments/1740772872-mitigate-symlink-following-when-rotating-files.yaml @@ -0,0 +1,34 @@ +# Kind can be one of: +# - breaking-change: a change to previously-documented behavior +# - deprecation: functionality that is being removed in a later release +# - bug-fix: fixes a problem in a previous version +# - enhancement: extends functionality but does not break or fix existing behavior +# - feature: new functionality +# - known-issue: problems that we are aware of in a given version +# - security: impacts on the security of a product or a user’s deployment. +# - upgrade: important information for someone upgrading from a prior version +# - other: does not fit into any of the other categories +kind: bug-fix + +# Change summary; a 80ish characters long description of the change. +summary: Rotate logger output file when writing to a symbolic link + +# Long description; in case the summary is not enough to describe the change +# this field accommodate a description without length limits. +# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment. +description: | + The agent logger rotates files when necessary. + Elastic Agent now forces a file rotation when unexpectedly writing to a file through a symbolic link. + +# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc. +component: elastic-agent + +# PR URL; optional; the PR number that added the changeset. +# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added. +# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number. +# Please provide it if you are adding a fragment for a different PR. +pr: https://github.com/elastic/elastic-agent/6938 + +# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of). +# If not present is automatically filled by the tooling with the issue linked to the PR number. +#issue: https://github.com/owner/repo/1234 diff --git a/go.mod b/go.mod index 9756086c19e..6c89d071ab1 100644 --- a/go.mod +++ b/go.mod @@ -14,9 +14,15 @@ require ( github.com/docker/go-units v0.5.0 github.com/dolmen-go/contextio v0.0.0-20200217195037-68fc5150bcd5 github.com/elastic/elastic-agent-autodiscover v0.9.0 +<<<<<<< HEAD github.com/elastic/elastic-agent-client/v7 v7.17.0 github.com/elastic/elastic-agent-libs v0.18.2 github.com/elastic/elastic-agent-system-metrics v0.11.7 +======= + github.com/elastic/elastic-agent-client/v7 v7.17.1 + github.com/elastic/elastic-agent-libs v0.18.8 + github.com/elastic/elastic-agent-system-metrics v0.11.8 +>>>>>>> f34071c29 (chore: update elastic-agent-libs to v0.18.8 (#6938)) github.com/elastic/elastic-transport-go/v8 v8.6.1 github.com/elastic/go-elasticsearch/v8 v8.17.1 github.com/elastic/go-licenser v0.4.2 diff --git a/go.sum b/go.sum index 5d58e316c52..36fb11af527 100644 --- a/go.sum +++ b/go.sum @@ -316,12 +316,21 @@ github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elastic/elastic-agent-autodiscover v0.9.0 h1:+iWIKh0u3e8I+CJa3FfWe9h0JojNasPgYIA47gpuuns= github.com/elastic/elastic-agent-autodiscover v0.9.0/go.mod h1:5iUxLHhVdaGSWYTveSwfJEY4RqPXTG13LPiFoxcpFd4= +<<<<<<< HEAD github.com/elastic/elastic-agent-client/v7 v7.17.0 h1:TPLrEHF4kJ3RkmQzZPffrniY4WeW4vriHZbOAzM1hFo= github.com/elastic/elastic-agent-client/v7 v7.17.0/go.mod h1:6h+f9QdIr3GO2ODC0Y8+aEXRwzbA5W4eV4dd/67z7nI= github.com/elastic/elastic-agent-libs v0.18.2 h1:jQrGytcG67YEhK9JzUhM1Yb6j9Ied68iYrWK8mlIV5M= github.com/elastic/elastic-agent-libs v0.18.2/go.mod h1:rWdyrrAFzZwgNNi41Tsqhlt2c2GdXWhCEwcsnqISJ2U= github.com/elastic/elastic-agent-system-metrics v0.11.7 h1:1xm2okCM0eQZ4jivZgUFSlt6HAn/nPgKB/Fj8eLG6mY= github.com/elastic/elastic-agent-system-metrics v0.11.7/go.mod h1:nzkrGajQA29YNcfP62gfzhxX9an3/xdQ3RmfQNw9YTI= +======= +github.com/elastic/elastic-agent-client/v7 v7.17.1 h1:ORCDXzFs1JyhI5neWbTAPWCwaFi+BtKojSLiCpaAbf0= +github.com/elastic/elastic-agent-client/v7 v7.17.1/go.mod h1:jzDEz8agLzinQEbEgLOuVM3wl6SoMybHnarQBTN1wYM= +github.com/elastic/elastic-agent-libs v0.18.8 h1:YCokiu33g0A5Glz+iizexgrv86ftItK7ono4RfNRdRw= +github.com/elastic/elastic-agent-libs v0.18.8/go.mod h1:Repx7BMzE1v/gTipPogNIQeEnSGwOWGBC63h7h9c5aM= +github.com/elastic/elastic-agent-system-metrics v0.11.8 h1:O12rj3Gojqa9UX8gA6Dj1XDIGeZXgXOAvxQbvC+XLbA= +github.com/elastic/elastic-agent-system-metrics v0.11.8/go.mod h1:FgtshyeVEAxNqRoFkdL0MpCW0rHxQGFNEKjIsxfcrag= +>>>>>>> f34071c29 (chore: update elastic-agent-libs to v0.18.8 (#6938)) github.com/elastic/elastic-transport-go/v8 v8.6.1 h1:h2jQRqH6eLGiBSN4eZbQnJLtL4bC5b4lfVFRjw2R4e4= github.com/elastic/elastic-transport-go/v8 v8.6.1/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= github.com/elastic/fsnotify v1.6.1-0.20240920222514-49f82bdbc9e3 h1:UyNbxdkQiSfyipwsOCWAlO+ju3xXC61Z4prx/HBTtFk= From 0cdbd27f12123e715f0b66ecb91f65d4fabad4b7 Mon Sep 17 00:00:00 2001 From: Mauri de Souza Meneguzzo Date: Thu, 6 Mar 2025 09:57:46 -0300 Subject: [PATCH 2/2] fix conflicts --- NOTICE.txt | 8 ++++---- go.mod | 6 ------ go.sum | 9 --------- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/NOTICE.txt b/NOTICE.txt index 30fbaa9350d..6d4f0f183e7 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1063,11 +1063,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-a -------------------------------------------------------------------------------- Dependency : github.com/elastic/elastic-agent-client/v7 -Version: v7.17.0 +Version: v7.17.1 Licence type (autodetected): Elastic -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-client/v7@v7.17.0/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-client/v7@v7.17.1/LICENSE.txt: ELASTIC LICENSE AGREEMENT @@ -1507,11 +1507,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-l -------------------------------------------------------------------------------- Dependency : github.com/elastic/elastic-agent-system-metrics -Version: v0.11.7 +Version: v0.11.8 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-system-metrics@v0.11.7/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-system-metrics@v0.11.8/LICENSE.txt: Apache License Version 2.0, January 2004 diff --git a/go.mod b/go.mod index 6c89d071ab1..77c405624f9 100644 --- a/go.mod +++ b/go.mod @@ -14,15 +14,9 @@ require ( github.com/docker/go-units v0.5.0 github.com/dolmen-go/contextio v0.0.0-20200217195037-68fc5150bcd5 github.com/elastic/elastic-agent-autodiscover v0.9.0 -<<<<<<< HEAD - github.com/elastic/elastic-agent-client/v7 v7.17.0 - github.com/elastic/elastic-agent-libs v0.18.2 - github.com/elastic/elastic-agent-system-metrics v0.11.7 -======= github.com/elastic/elastic-agent-client/v7 v7.17.1 github.com/elastic/elastic-agent-libs v0.18.8 github.com/elastic/elastic-agent-system-metrics v0.11.8 ->>>>>>> f34071c29 (chore: update elastic-agent-libs to v0.18.8 (#6938)) github.com/elastic/elastic-transport-go/v8 v8.6.1 github.com/elastic/go-elasticsearch/v8 v8.17.1 github.com/elastic/go-licenser v0.4.2 diff --git a/go.sum b/go.sum index 36fb11af527..f452edd552a 100644 --- a/go.sum +++ b/go.sum @@ -316,21 +316,12 @@ github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elastic/elastic-agent-autodiscover v0.9.0 h1:+iWIKh0u3e8I+CJa3FfWe9h0JojNasPgYIA47gpuuns= github.com/elastic/elastic-agent-autodiscover v0.9.0/go.mod h1:5iUxLHhVdaGSWYTveSwfJEY4RqPXTG13LPiFoxcpFd4= -<<<<<<< HEAD -github.com/elastic/elastic-agent-client/v7 v7.17.0 h1:TPLrEHF4kJ3RkmQzZPffrniY4WeW4vriHZbOAzM1hFo= -github.com/elastic/elastic-agent-client/v7 v7.17.0/go.mod h1:6h+f9QdIr3GO2ODC0Y8+aEXRwzbA5W4eV4dd/67z7nI= -github.com/elastic/elastic-agent-libs v0.18.2 h1:jQrGytcG67YEhK9JzUhM1Yb6j9Ied68iYrWK8mlIV5M= -github.com/elastic/elastic-agent-libs v0.18.2/go.mod h1:rWdyrrAFzZwgNNi41Tsqhlt2c2GdXWhCEwcsnqISJ2U= -github.com/elastic/elastic-agent-system-metrics v0.11.7 h1:1xm2okCM0eQZ4jivZgUFSlt6HAn/nPgKB/Fj8eLG6mY= -github.com/elastic/elastic-agent-system-metrics v0.11.7/go.mod h1:nzkrGajQA29YNcfP62gfzhxX9an3/xdQ3RmfQNw9YTI= -======= github.com/elastic/elastic-agent-client/v7 v7.17.1 h1:ORCDXzFs1JyhI5neWbTAPWCwaFi+BtKojSLiCpaAbf0= github.com/elastic/elastic-agent-client/v7 v7.17.1/go.mod h1:jzDEz8agLzinQEbEgLOuVM3wl6SoMybHnarQBTN1wYM= github.com/elastic/elastic-agent-libs v0.18.8 h1:YCokiu33g0A5Glz+iizexgrv86ftItK7ono4RfNRdRw= github.com/elastic/elastic-agent-libs v0.18.8/go.mod h1:Repx7BMzE1v/gTipPogNIQeEnSGwOWGBC63h7h9c5aM= github.com/elastic/elastic-agent-system-metrics v0.11.8 h1:O12rj3Gojqa9UX8gA6Dj1XDIGeZXgXOAvxQbvC+XLbA= github.com/elastic/elastic-agent-system-metrics v0.11.8/go.mod h1:FgtshyeVEAxNqRoFkdL0MpCW0rHxQGFNEKjIsxfcrag= ->>>>>>> f34071c29 (chore: update elastic-agent-libs to v0.18.8 (#6938)) github.com/elastic/elastic-transport-go/v8 v8.6.1 h1:h2jQRqH6eLGiBSN4eZbQnJLtL4bC5b4lfVFRjw2R4e4= github.com/elastic/elastic-transport-go/v8 v8.6.1/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= github.com/elastic/fsnotify v1.6.1-0.20240920222514-49f82bdbc9e3 h1:UyNbxdkQiSfyipwsOCWAlO+ju3xXC61Z4prx/HBTtFk=