Skip to content

[8.19](backport #54279) fix(auditbeat): restore non-recursive macOS FSEvents - #54454

Merged
marc-gr merged 1 commit into
8.19from
mergify/bp/8.19/pr-54279
Nov 5, 2026
Merged

marc-gr merged 1 commit into
8.19from
mergify/bp/8.19/pr-54279

Conversation

@mergify

@mergify mergify Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Proposed commit message

Return successful os.Lstat calls from the macOS FSEvents file-integrity reader without manufacturing an error. The previous fmt.Errorf call returned a non-nil error even when os.Lstat succeeded, so non-recursive watches never populated watchedDirs and dropped all realtime events.

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
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added an entry in ./changelog/fragments.

Disruptive User Impact

None. This restores the intended non-recursive macOS file-integrity behavior.

How to test this PR locally

The added regression test is Darwin-only. The changed package can be tested with:

go test ./auditbeat/module/file_integrity

Related issues

Closes #54257

AI assistance

Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content. The implementation was reviewed against the repository source and contribution instructions.


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

* fix(auditbeat): restore non-recursive macOS FSEvents

* chore: format Auditbeat changelog fragment

* test(auditbeat): cover non-recursive FSEvents watches

Add a Darwin regression test for the user-visible isWatched behavior and
include issue and pull request metadata in the changelog fragment.

Signed-off-by: Slai.life <[email protected]>

* auditbeat/module/file_integrity: use testing logger in FSEvents test

The forbidigo linter rejects logp.NewLogger in new code. Use
logptest.NewTestingLogger instead, which also routes log output through
the test's t.Log.

Assisted-By: Claude Code

---------

Signed-off-by: Slai.life <[email protected]>
Co-authored-by: Marc Guasch <[email protected]>
Co-authored-by: Marc Guasch <[email protected]>
(cherry picked from commit ee49816)
@mergify
mergify Bot requested a review from a team as a code owner November 4, 2026 09:32
@mergify mergify Bot added the backport label Nov 4, 2026
@mergify
mergify Bot requested a review from a team as a code owner November 4, 2026 09:32
@mergify mergify Bot added the backport label Nov 4, 2026
@mergify
mergify Bot requested review from khushijain21 and removed request for a team November 4, 2026 09:32
@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

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 Auditbeat macOS Enable builds in the CI for darwin testing bugfix Team:Security-Service Integrations Security Service Integrations Team labels Nov 4, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@botelastic botelastic Bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Dependency review finished without posting an analysis comment.

If you expected a review, push a new commit to this pull request (or close and reopen it) to try again.

Workflow run: https://github.com/elastic/beats/actions/runs/41808299491

@marc-gr
marc-gr enabled auto-merge (squash) November 4, 2026 09:43
@marc-gr

marc-gr commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

run docs-build

@mergify

mergify Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is merged.

@marc-gr
marc-gr merged commit 16a71df into 8.19 Nov 5, 2026
73 checks passed
@marc-gr
marc-gr deleted the mergify/bp/8.19/pr-54279 branch November 5, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auditbeat backport bugfix macOS Enable builds in the CI for darwin testing Team:Security-Service Integrations Security Service Integrations Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants