Skip to content

[8.19](backport #54625) [9.5] auditbeat: Update quark dependency to version 0.9.0 - #54653

Merged
christos68k merged 1 commit into
8.19from
mergify/bp/8.19/pr-54625
Nov 12, 2026
Merged

christos68k merged 1 commit into
8.19from
mergify/bp/8.19/pr-54625

Conversation

@mergify

@mergify mergify Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Proposed commit message

This brings 8.19 up-to-par with 9.5, 9.6 regarding go-quark: all these branches now use go-quark v0.9.0.

It cherry picks the following commits that were previously merged in 9.5:

which cherry picks the following commits that were previously merged in main:

Merging this PR to both 8.19 and 9.5 is a pre-requisite for the backports (see Related Issues) of #53507 to 8.19 and 9.5 to succeed.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation N/A
  • I have made corresponding change to the default configuration files N/A
  • I have added tests that prove my fix is effective or that my feature works. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.
  • I have added an entry in ./changelog/fragments using the changelog tool.

How to test this PR locally

sudo go test -v ./x-pack/auditbeat/module/system/process/ -run 'Quark|Snapshot|ForkExec'

Related Issues


This is an automatic backport of pull request #54625 done by [Mergify](https://mergify.com).

* [auditbeat] Replace use of QQ_ALL_BACKENDS (#52574)

The quark attribute flag QQ_ALL_BACKENDS is being removed in future versions of go-quark. This removes its use from auditbeat.

Instead of using QQ_ALL_BACKENDS, consumers will be responsible for explicitly setting the backend to be used, and retrying with a different backend in case of failure. Now auditbeat will attempt eBPF first, then attempt kprobe if it fails; this is the same behaviour quark has with QQ_ALL_BACKENDS

(cherry picked from commit 6861354)

* auditbeat: adapt to quark 0.8 backend flags and since-boot times (#52623)

* auditbeat: adapt to quark 0.8 since-boot timestamps

quark 0.8 hands out Proc.TimeBoot and Exit.ExitTimeProcess as
nanoseconds since boot instead of since the epoch (quark CHANGES
0.7->0.8): without conversion, process.start and process.end would be
dated shortly after 1970. Convert with the new quark.TimeToWallclock()
everywhere they feed process.start and process.end, in both quark
providers. Emitted events are unchanged.

quark's boottime epoch, cached at quark_queue_open(), also moves when
the system clock is stepped (say NTP correcting a clock that was wrong
at boot), and keeping it fresh is the consumer's job. Both providers
call quark.UpdateBoottime() on their existing 5-second stats cadence:
it re-reads /proc/stat btime, which is stable between reads and only
moves on a step, and quark stores it only when it actually changed.
Corrections apply retroactively to anything translated afterwards.

The backend flag changes (QQ_ALL_BACKENDS removal) landed separately
in #52574.

go-quark is pinned to a pre-release of the 0.8 update
(elastic/go-quark#40) and will be bumped to the tagged release before
merging.

* auditbeat: pin go-quark to v0.8.0

* auditbeat: fix goimports alignment in quark test

(cherry picked from commit 7b4b565)

* auditbeat: update for quark 0.9 changes (#53284)

* auditbeat: update for quark 0.9 changes

* auditbeat: update go-quark to v0.9.0

* auditbeat: add fragment

* auditbeat: review feedback on quark 0.9 update

(cherry picked from commit 181205b)

Co-authored-by: Michael Wolf <michael.wolf@elastic.co>
Co-authored-by: Nicholas Berlin <56366649+nicholasberlin@users.noreply.github.com>
(cherry picked from commit a998fe3)
@mergify mergify Bot added the backport label Nov 12, 2026
@mergify
mergify Bot requested review from a team as code owners November 12, 2026 10:00
@mergify mergify Bot added the backport label Nov 12, 2026
@mergify
mergify Bot requested review from fbac and removed request for a team November 12, 2026 10:00
@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)
  • /test : Run the Buildkite pipeline.

@github-actions github-actions Bot added enhancement Auditbeat cleanup Team:Security-Linux Platform Linux Platform Team in Security Solution dependencies Pull requests that update a dependency file labels Nov 12, 2026
@botelastic botelastic Bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 12, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform)

@mergify

mergify Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is merged.

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Dependency Update Analysis

Summary: github.com/elastic/go-quark was updated from v0.6.0 to v0.9.0 in go.mod, with matching auditbeat compatibility updates; overall risk is low-to-moderate and merge-ready.

Dependency: github.com/elastic/go-quark v0.6.0 → v0.9.0

Ecosystem: Go

Check Result
Breaking changes ✅ None found in repository usage after compatibility updates
Testable in PR ✅ Yes — code paths are covered by PR CI and targeted package tests pass
Changelog highlights (v0.6.0 → v0.9.0)
  • Upstream releases are sparse but indicate quark runtime updates through v0.7.0, v0.8.0, and v0.9.0 (elastic/go-quark release notes).
  • This PR includes explicit local adaptation for boottime API behavior and timestamp conversion changes:
    • x-pack/auditbeat/module/system/process/quark_provider_linux.go
    • x-pack/auditbeat/processors/sessionmd/provider/kerneltracingprovider/kerneltracingprovider_linux.go
  • No CVE/GHSA/security-fix entries were identified in the upstream release notes for these versions.
  • Security-impact assessment: changes primarily affect process timestamp conversion and queue backend fallback behavior; this appears to reduce fragility (clock-step handling, EBPF→kprobe fallback) without expanding external attack surface.
Usage in this repository
  • Dependency pin: go.mod:175 (github.com/elastic/go-quark v0.9.0).
  • Main runtime usage:
    • x-pack/auditbeat/module/system/process/quark_provider_linux.go:22 import and queue/event APIs (DefaultQueueAttr, OpenQueue, Boottime, QUARK_EV_*).
    • x-pack/auditbeat/processors/sessionmd/provider/kerneltracingprovider/kerneltracingprovider_linux.go:21 import and queue/lookup/time conversion APIs.
  • Compatibility-focused edits in this PR update wallclock conversion and leader/parent start-time handling (wallclock(...), epoch propagation) and add stalls metrics.
Compatibility assessment
  • No Go major version path break (v0.x → v0.x, same module path).
  • The PR updates call sites to match current quark time semantics (since-boot → wallclock conversion via Boottime) and keeps emitted event shape unchanged per changelog fragments.
  • Targeted validation passed:
    • go test ./x-pack/auditbeat/module/system/process ./x-pack/auditbeat/processors/sessionmd/provider/kerneltracingprovider ✅
  • Net: compatible with current repo usage; residual risk is limited to Linux/auditbeat process metadata behavior, hence low-to-moderate.

Labels Applied

  • oblt-aw/ai/merge-ready — risk is low-to-moderate, no breaking usage mismatch found, and targeted tests passed.

What is this? | From workflow: Observability Agentic Workflow — Pull Request

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@github-actions

Copy link
Copy Markdown
Contributor

Automerge skipped

Automerge skipped this pull request because the all-files collection is not enabled for this repository.

To allow automerge for this kind of update, enable the matching collection under Automerge on the Control Plane Dashboard (the oblt-aw/dashboard issue). See Automerge dependency collections for what each collection covers.

See Opt in or opt out for how to enable or disable Automerge collections on the Control Plane Dashboard.

Collections currently enabled for automerge: github-actions, pre-commit, terraform, open-policy-agent, updatecli, vm-images

Changed files considered:

  • NOTICE.txt
  • changelog/fragments/1786630989-auditbeat-quark-0.8.yaml
  • changelog/fragments/1789463004-auditbeat-quark-0.9-boottime.yaml
  • go.mod
  • go.sum
  • x-pack/auditbeat/module/system/process/quark_provider_linux.go
  • x-pack/auditbeat/module/system/process/quark_provider_linux_test.go
  • x-pack/auditbeat/processors/sessionmd/provider/kerneltracingprovider/kerneltracingprovider_linux.go
  • x-pack/auditbeat/processors/sessionmd/provider/kerneltracingprovider/metrics.go

@christos68k
christos68k merged commit 6354e25 into 8.19 Nov 12, 2026
255 of 256 checks passed
@christos68k
christos68k deleted the mergify/bp/8.19/pr-54625 branch November 12, 2026 12:29
christos68k added a commit that referenced this pull request Nov 12, 2026
Pick up the elastic-agent-libs import (#54570) and the go-quark 0.9.0
upgrade (#54653) from 8.19, both of which this backport depends on:
the FIM eBPF reader needs quark's File.ChangeMask, first available in
quark 0.8, and 8.19 now imports logp and mapstr from pkg/ rather than
from the elastic-agent-libs module.

Conflict resolution:
- file_integrity: keep this backport's ebpfreader_supported.go and
  eventreader_ebpf.go, importing logp from
  github.com/elastic/beats/v7/pkg. event_linux_test.go likewise for
  mapstr.
- go.mod, go.sum: take 8.19's and drop only ebpfevents, then tidy.
  This also restores the sarama and brotli versions the branch had
  fallen behind on.
- NOTICE.txt: regenerated.

Assisted-By: Claude Code
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
christos68k added a commit that referenced this pull request Nov 12, 2026
Pick up the elastic-agent-libs import (#54570) and the go-quark 0.9.0
upgrade (#54653) from 8.19, both of which this backport depends on:
the FIM eBPF reader needs quark's File.ChangeMask, first available in
quark 0.8, and 8.19 now imports logp and mapstr from pkg/ rather than
from the elastic-agent-libs module.

Conflict resolution:
- file_integrity: keep this backport's ebpfreader_supported.go and
  eventreader_ebpf.go, importing logp from
  github.com/elastic/beats/v7/pkg. event_linux_test.go likewise for
  mapstr.
- go.mod, go.sum: take 8.19's and drop only ebpfevents, then tidy.
  This also restores the sarama and brotli versions the branch had
  fallen behind on.
- NOTICE.txt: regenerated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auditbeat backport cleanup dependencies Pull requests that update a dependency file enhancement oblt-aw/ai/merge-ready Team:Security-Linux Platform Linux Platform Team in Security Solution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant