Skip to content

Bugfix: Safely Handle Malformed UAC events#49869

Merged
brian-mckinney merged 12 commits into
elastic:mainfrom
brian-mckinney:sdh6727
Apr 10, 2026
Merged

Bugfix: Safely Handle Malformed UAC events#49869
brian-mckinney merged 12 commits into
elastic:mainfrom
brian-mckinney:sdh6727

Conversation

@brian-mckinney
Copy link
Copy Markdown
Contributor

Proposed commit message

https://github.com/elastic/sdh-beats/issues/6727

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. 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.

Disruptive User Impact

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@brian-mckinney brian-mckinney added bug Winlogbeat Team:Security-Windows Platform Windows Platform Team in Security Solution labels Apr 1, 2026
@botelastic botelastic Bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Apr 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Apr 1, 2026

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @brian-mckinney? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@brian-mckinney brian-mckinney marked this pull request as ready for review April 2, 2026 22:03
@brian-mckinney brian-mckinney requested a review from a team as a code owner April 2, 2026 22:03
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/sec-windows-platform (Team:Security-Windows Platform)

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a893a813-b613-441d-9f3b-ccf6b42c90c5

📥 Commits

Reviewing files that changed from the base of the PR and between a85f85e and b228ebf.

📒 Files selected for processing (1)
  • x-pack/winlogbeat/module/security/ingest/security_standard.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • x-pack/winlogbeat/module/security/ingest/security_standard.yml

📝 Walkthrough

Walkthrough

The pull request adds defensive error handling to a Windows security ingest pipeline. A changelog fragment documents a bug fix for "Long decoding error" in a Painless script for winlogbeat. The ingest pipeline script is updated with try/catch blocks around Long.decode() calls for both NewUacValue parsing and parameter iteration, allowing the script to continue or return early on decode failures rather than aborting.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pipeline change looks fine.

Note that there is no testing of the pipeline as explained in #49947.

@brian-mckinney brian-mckinney merged commit f1bb535 into elastic:main Apr 10, 2026
27 checks passed
@brian-mckinney brian-mckinney deleted the sdh6727 branch April 10, 2026 15:47
@brian-mckinney brian-mckinney added the backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches label May 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

@Mergifyio backport 9.3 9.4

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 7, 2026

backport 9.3 9.4

✅ Backports have been created

Details

brian-mckinney added a commit that referenced this pull request May 7, 2026
* Try to prove the bug via CI

* fix painless logic when decoding longs

* add changelog fragment

* fix typo

* PR Feedback

* Don't fail silently for explicit params

(cherry picked from commit f1bb535)

Co-authored-by: Brian McKinney <[email protected]>
brian-mckinney added a commit that referenced this pull request May 7, 2026
* Try to prove the bug via CI

* fix painless logic when decoding longs

* add changelog fragment

* fix typo

* PR Feedback

* Don't fail silently for explicit params

(cherry picked from commit f1bb535)

Co-authored-by: Brian McKinney <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches bug Team:Security-Windows Platform Windows Platform Team in Security Solution Winlogbeat

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants