Repository navigation
[9.4](backport #53507) Drop ebpfevents as a dependency, move auditbeat FIM to quark - #54420
mergify[bot] wants to merge 2 commits into
Conversation
This replaces the file hooks in ebpfevents (which depends on elastic/ebpf) with the file hooks in quark's eBPF backend and allows us to drop the ebpfevents dependency from beats. Co-authored-by: Visha Angelova <91186315+vishaangelova@users.noreply.github.com> (cherry picked from commit de78e8d) # Conflicts: # NOTICE.txt # auditbeat/module/file_integrity/_meta/docs.md # docs/reference/auditbeat/auditbeat-module-file_integrity.md # docs/reference/auditbeat/running-on-docker.md # go.sum
|
Cherry-pick of de78e8d has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
🤖 GitHub commentsJust comment with:
|
|
Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform) |
Elastic Docs Style Checker (Vale)Summary: 6 errors found ❌ Errors (6): Must fix before merge.
The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
|
Don't merge yet, I need to update the documentation to refer to a specific 9.4 version that the changes in this PR apply to. |
Dependency Update AnalysisSummary: This PR removes Dependency 1:
|
| Check | Result |
|---|---|
| Breaking changes | go.sum) |
Changelog highlights (v0.12.0 → removed)
Removed from direct requirements in go.mod (git diff hunk in require block). No upstream release-note comparison is applicable for a pure removal.
Usage in this repository
The implementation in auditbeat/module/file_integrity/eventreader_ebpf.go now uses github.com/elastic/go-quark (eventreader_ebpf.go:29, :53, :55, :135). No remaining direct ebpfevents imports were found in *.go files.
Compatibility assessment
Functionally, the migration to quark is explicit in code paths under auditbeat/module/file_integrity. However, dependency-file consistency is currently broken, which is a hard compatibility blocker for build/test tooling.
Dependency 2: github.com/elastic/elastic-agent-client/v7 v7.18.1 → v7.19.0 (attempted in go.sum conflict block)
Ecosystem: Go
| Check | Result |
|---|---|
| Breaking changes | go.sum contains unresolved merge markers) |
Changelog highlights (v7.18.1 → v7.19.0)
Release v7.19.0 includes dependency/tooling updates and agent tag/unit update work (source: elastic/elastic-agent-client release tag v7.19.0). No explicit API-breaking note was identified in that release body.
Usage in this repository
Directly used across x-pack management/agent code (e.g. x-pack/libbeat/management/managerV2.go, x-pack/filebeat/cmd/agent.go, x-pack/metricbeat/cmd/agent.go, x-pack/packetbeat/cmd/root.go) via pkg/client and pkg/proto imports.
Compatibility assessment
Cannot validate compatibility while go.sum is malformed. go list -m all fails with:
malformed go.sum:go.sum:377: wrong number of fields 2
and merge markers exist at go.sum:377, :382, :385, :490, :495, :498.
Dependency 3: github.com/go-jose/go-jose/v4 v4.1.4 → v4.1.6 (attempted in go.sum conflict block)
Ecosystem: Go
| Check | Result |
|---|---|
| Breaking changes |
Changelog highlights (v4.1.4 → v4.1.6)
v4.1.6 fixes a security advisory (GHSA-mgcc-cww5-fp2q) and introduces a behavioral breaking change: JWK parsing now caps RSA modulus size to 4096 bits unless MaxRSAModulusBits is set.
Usage in this repository
No direct github.com/go-jose/go-jose/v4 imports were found in repository *.go files, indicating transitive-only exposure in this repo.
Compatibility assessment
The upstream security fix is favorable, and direct API impact appears low for this repo. However, unresolved merge markers in go.sum prevent reliable dependency graph validation.
Labels Applied
No labels applied (oblt-aw/ai/merge-ready not applied because overall risk is high due malformed dependency files and immediate module-resolution failure).
What is this? | From workflow: Observability Agentic Workflow — Pull Request
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
TL;DRBuildkite failed because this backport commit includes unresolved merge conflict markers, which breaks pre-commit ( Remediation
Investigation detailsRoot CauseThis is a configuration/merge-resolution failure in the backport commit ( Evidence
Verification
Follow-up
What is this? | From workflow: Observability Agentic Workflow — Status Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
This pull request has not been merged yet. Could you please review and merge it @{{ assignee | join(', @') }}? 🙏 |
Dependency Update AnalysisSummary: This PR removes Dependency 1:
|
| Check | Result |
|---|---|
| Breaking changes | |
| Testable in PR | ✅ Yes (.github/workflows/check-default.yml and .github/workflows/golangci-lint.yml run on pull_request) |
Changelog highlights (v0.12.0 → removed)
- Local change replaces
ebpfeventsevent path with quark queue processing:auditbeat/module/file_integrity/eventreader_ebpf.go:53(QQ_EBPF | QQ_FILE | QQ_MIN_AGG)auditbeat/module/file_integrity/eventreader_ebpf.go:55(quark.OpenQueue)auditbeat/module/file_integrity/event_linux.go:43(NewEventFromQuarkEvent)
- Upstream
ebpfevents v0.12.0release itself was a kernel-rename compatibility bump; dependency is now removed instead of upgraded. - Security/CVE notes: no CVE/GHSA was identified in the
ebpfeventsrelease note body.
Usage in this repository
- Previous direct usage existed in base commit in:
auditbeat/module/file_integrity/event_linux.go:31(import)auditbeat/module/file_integrity/eventreader_ebpf.go:29(import)
- Current head has no remaining Go import matches for
github.com/elastic/ebpfevents.
Compatibility assessment
- This is not a pure version bump: it is a backend dependency swap in file-integrity event production.
- Behavioral differences are explicitly surfaced in code/docs updates (PID namespace handling, quark process-cache attribution path).
- High merge risk right now from unresolved conflict markers in changed files:
go.sum:377,go.sum:490NOTICE.txt:52422auditbeat/module/file_integrity/_meta/docs.md:6docs/reference/auditbeat/auditbeat-module-file_integrity.md:18docs/reference/auditbeat/running-on-docker.md:159
Dependency 2: github.com/elastic/elastic-agent-client/v7 v7.18.1 → v7.19.0 (go.sum)
Ecosystem: Go
| Check | Result |
|---|---|
| Breaking changes | ✅ None found in release notes affecting observed usage |
| Testable in PR | ✅ Yes |
Changelog highlights (v7.18.1 → v7.19.0)
- Mostly dependency/tooling updates and agent-tags work in upstream release.
- Security-relevant entries include grpc/x-net dependency bumps and workflow permission hardening.
Usage in this repository
- Widely used across x-pack management/agent integration code, e.g. imports in
x-pack/libbeat/management/*and beat cmd roots (pkg/client,pkg/proto).
Compatibility assessment
- No direct API-break signal in upstream notes for this bump.
- However, unresolved
go.sumconflict markers block confidence in deterministic module resolution until fixed.
Dependency 3: github.com/go-jose/go-jose/v4 v4.1.4 → v4.1.6 (go.sum)
Ecosystem: Go
| Check | Result |
|---|---|
| Breaking changes | |
| Testable in PR | ✅ Yes |
Changelog highlights (v4.1.4 → v4.1.6)
- Release includes fix for
GHSA-mgcc-cww5-fp2q. - Breaking note: JWK parsing now caps RSA modulus size unless
MaxRSAModulusBitsis adjusted. - Also includes CEK length validation hardening for JWE.
Usage in this repository
- No direct Go import matches for
github.com/go-jose/go-jose/v4were found; appears transitive.
Compatibility assessment
- As a transitive update, direct blast radius in this repo is limited.
- Security posture likely improves via advisory fix, but unresolved merge markers still dominate merge risk.
Labels Applied
No labels applied (oblt-aw/ai/merge-ready not applied because overall risk is high until conflict markers are resolved).
What is this? | From workflow: Observability Agentic Workflow — Pull Request
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
|
This pull request is now in conflicts. Could you fix it? 🙏 |
|
Closing as 9.4 is EOL |
Summary
Drops https://github.com/elastic/ebpfevents (and transitively, https://github.com/elastic/ebpf) as a dependency of beats. The goal is consolidation and reducing our maintenance burden: There is no good reason for us to be maintaining equivalent (or near equivalent) eBPF functionality across multiple projects, as eBPF issues may involve time consuming debugging, dependency management and staged releases (especially when kernel internals change).
Proposed commit message
The auditbeat file_integrity ebpf backend now reads file events from quark's eBPF backend instead of the ebpfevents library, removing the dependency on elastic/ebpfevents and elastic/ebpf. User configuration is unchanged. Process and container enrichment now comes from quark's process cache, operations on the same file that happen close together may be reported as a single event, and file.mode reports only the permission bits, consistent with the fsnotify backend. When running in Docker, the ebpf backend now requires --pid=host so that the process table matches the process IDs the kernel reports (same as the other quark consumers in beats).
Checklist
[ ] I have made corresponding change to the default configuration filesNot neededstresstest.shscript to run them under stress conditions and race detector to verify their stability../changelog/fragmentsusing the changelog tool.Disruptive User Impact
When running in Docker, the ebpf backend now requires
--pid=hostso that the process table matches the process IDs the kernel reports (same as the other quark consumers in beats).A CREATE followed by a REMOVE can be reported as a single 'deleted' event as Quark will merge the two events if they originate in the same process and are both within the hold time window. This case would previously result in two separate events.
For extra context, please also see my comment here.
NOTE: According to the documentation, the default backend is
fsnotify, withebpfandKprobesin technical preview.Question to reviewers: Should we mark (both/just pid=host) (pid=host and 'create followed by delete in the same process and hold window') as BREAKING changes?
EDIT: I'll mark the entire fragment as breaking change. Both ebpf and kprobe backends are 'technical preview', not the default (fsnotify is), and it seems that ebpf isn't used much -if at all- internally, which means that the blast radius from this breaking change should be minimal.
How to test this PR locally
Depending on the kernel you're running, you may first need to apply #54106 (if the Python tests fail with Linux kernel version parsing error).
You can also run
auditbeatdumping JSON to stdout:Verification that
auditbeatstarted correctly:Related issues
Notes for reviewers
Please review, I still have a few manual tests to go through (containers / Docker).
This is an automatic backport of pull request #53507 done by [Mergify](https://mergify.com).