Skip to content

[Windows] Prevent pipeline failure in Windows AppLocker/EXE and DLL logs when signed by common name.#17188

Merged
VihasMakwana merged 10 commits intoelastic:mainfrom
BrendanNurmi:main
Feb 11, 2026
Merged

[Windows] Prevent pipeline failure in Windows AppLocker/EXE and DLL logs when signed by common name.#17188
VihasMakwana merged 10 commits intoelastic:mainfrom
BrendanNurmi:main

Conversation

@BrendanNurmi
Copy link
Copy Markdown
Contributor

Proposed commit message

Prevent pipeline failure in Windows AppLocker/EXE and DLL logs when signed by common name.

At present the Windows Integration for AppLocker/EXE and DLL logs fails when the Fully Qualified Binary Name is a Common Name (CN).

  • This results in the below.
{
    "error": {
      "message": [
        "Provided Grok expressions do not match field value: [CN=58D26209-1D57-482C-B403-B655571B5C7B\\\\DOLBYACCESSOEM\\\\DOLBYACCESSOEM.EXE\\\\1.0.0.00]"
      ]
  }
}

To address this:

  1. Grok pattern added to support the Common Name and mapping it into a temp field, tmp.file.x509.subject.common_name.
  2. The temp field, tmp.file.x509.subject.common_name, is then append the field into the x509.subject.common_name as per the ECS.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • [ ]

How to test this PR locally

Using the Pipeline Testing Guide

  • Additional tests have been added to validate the grok parsing to capture the failing events.

Related issues

Screenshots

@BrendanNurmi BrendanNurmi requested a review from a team as a code owner February 2, 2026 06:24
@andrewkroh andrewkroh added Integration:windows Windows Team:Security-Windows Platform Security Windows Platform team [elastic/sec-windows-platform] labels Feb 2, 2026
@elasticmachine
Copy link
Copy Markdown

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

@andrewkroh andrewkroh added the bugfix Pull request that fixes a bug issue label Feb 2, 2026
@BrendanNurmi BrendanNurmi requested a review from a team as a code owner February 4, 2026 06:29
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Data-Plane Agent Data Plane team [elastic/elastic-agent-data-plane] label Feb 4, 2026
@elasticmachine
Copy link
Copy Markdown

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@pierrehilbert pierrehilbert requested review from VihasMakwana and removed request for orestisfl February 4, 2026 07:13
@adrianchen-es adrianchen-es requested review from a team and removed request for a team February 8, 2026 23:58
Adding link to current PR.
@adrianchen-es adrianchen-es removed the request for review from a team February 9, 2026 02:55
@adrianchen-es
Copy link
Copy Markdown
Contributor

@VihasMakwana Could you please let @BrendanNurmi know if there is anything needed for this fix?

- append:
field: file.x509.subject.common_name
value: "{{tmp.file.x509.subject.common_name}}"
ignore_failure: true
Copy link
Copy Markdown
Contributor

@VihasMakwana VihasMakwana Feb 9, 2026

Choose a reason for hiding this comment

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

@BrendanNurmi IMO we should set ignore_empty_values to true here.
Right now, the pipeline will set file.x509.subject.common_name to "" if any of the other patterns match.
Enabling ignore_empty_values will not cause empty fields on your ES.

You'll also need to update test-events-applocker-exe-8003.json-expected.json.

Suggested change
ignore_failure: true
ignore_failure: true
ignore_empty_values: true

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback, added for all appends, retested.

I've added it for all since the FQBN can be just the CN or the locality and/or CN could also not be present within the FQBN.

b@pi5-a:~/integrations/packages/windows/data_stream/applocker_exe_and_dll$ elastic-package test pipeline
Run pipeline tests for the package
2026/02/09 22:43:27  INFO elastic-package v0.118.0 version-hash 816ceecf (build time: 2025-12-30T13:03:37Z)
2026/02/09 22:43:27  INFO elastic-stack: 9.2.3
--- Test results for package: windows - START ---
╭─────────┬───────────────────────────────────┬───────────┬─────────────────────────────────────────────────────────────────────────────────────────────────┬────────┬──────────────╮
│ PACKAGE │ DATA STREAM                       │ TEST TYPE │ TEST NAME                                                                                       │ RESULT │ TIME ELAPSED │
├─────────┼───────────────────────────────────┼───────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼──────────────┤
│ windows │ applocker_exe_and_dll             │ pipeline  │ (ingest pipeline warnings test-events-applocker-exe-8003-common-name.json)                      │ PASS   │ 546.253384ms │
│ windows │ applocker_exe_and_dll             │ pipeline  │ (ingest pipeline warnings test-events-applocker-exe-8003.json)                                  │ PASS   │ 455.685091ms │
│ windows │ applocker_exe_and_dll             │ pipeline  │ test-events-applocker-exe-8003-common-name.json                                                 │ PASS   │  283.37205ms │
│ windows │ applocker_exe_and_dll             │ pipeline  │ test-events-applocker-exe-8003.json                                                             │ PASS   │ 213.922322ms │

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@BrendanNurmi Looks like ignore_empty_values was only added in 9.x+ versions of ElasticSearch. Could you please revert this change and remove ignore_empty_values?

I'll address this later with a "breaking" change.

For now, let's just revert to the previous version.
Sorry for inconvenience. I had no idea about it 😓

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You're all good, I should have tested a backport against v8, i'm still learning here, at least the cicd caught it.

Copy link
Copy Markdown
Contributor

@VihasMakwana VihasMakwana left a comment

Choose a reason for hiding this comment

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

I have asked a question related to the append processor. Looks good otherwise.

@adrianchen-es
Copy link
Copy Markdown
Contributor

@nfritts , Could please you have a look at/help with a reviewer from your team?

@marc-gr marc-gr self-assigned this Feb 10, 2026
@marc-gr
Copy link
Copy Markdown
Contributor

marc-gr commented Feb 10, 2026

/test

@VihasMakwana
Copy link
Copy Markdown
Contributor

@BrendanNurmi Could you run elastic-package build in the integrations/packages/windows directory and commit the changes?

@BrendanNurmi
Copy link
Copy Markdown
Contributor Author

Recommitted; apologies, I missed this one.

@andrewkroh andrewkroh added the documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. label Feb 10, 2026
@VihasMakwana VihasMakwana enabled auto-merge (squash) February 11, 2026 05:26
@VihasMakwana
Copy link
Copy Markdown
Contributor

/test

@VihasMakwana
Copy link
Copy Markdown
Contributor

VihasMakwana commented Feb 11, 2026

auto-merge was automatically disabled February 11, 2026 11:41

Head branch was pushed to by a user without write access

@BrendanNurmi
Copy link
Copy Markdown
Contributor Author

Should be fixed; I've updated the pipeline, removed the extra comment from the changelog and corrected the test cases.

Both complete without error:

  • elastic-package build
  • elastic-package test

@VihasMakwana
Copy link
Copy Markdown
Contributor

/test

@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

🚀 Benchmarks report

Package windows 👍(5) 💚(1) 💔(4)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
windows_defender 9615.38 7575.76 -2039.62 (-21.21%) 💔
powershell_operational 3086.42 1605.65 -1480.77 (-47.98%) 💔
applocker_exe_and_dll 5747.13 4166.67 -1580.46 (-27.5%) 💔
applocker_packaged_app_execution 12820.51 9900.99 -2919.52 (-22.77%) 💔

To see the full report comment with /test benchmark fullreport

@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

History

cc @marc-gr

@VihasMakwana VihasMakwana merged commit 4246837 into elastic:main Feb 11, 2026
10 checks passed
@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

Package windows - 3.4.1 containing this change is available at https://epr.elastic.co/package/windows/3.4.1/

jakubgalecki0 pushed a commit to jakubgalecki0/integrations that referenced this pull request Feb 19, 2026
…ogs when signed by common name. (elastic#17188)

* Resolve defect where grok failure occurs because applocker event is signed by common name only.

* Changelog entry, updating manifest with new version and add file.x509.subject.common_name into esc fields

* Update changelog.yml

Adding link to current PR.

* ignore_emtpy_values to prevent empty fields.

* Adding exported field reference.

* Removing the ignore_empty_values as it doesn't function pre v9, and this will work for both 8 & 9.

* Update changelog to remove the part that no longer exists.

---------

Co-authored-by: Vihas Makwana <121151420+VihasMakwana@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes a bug issue documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. Integration:windows Windows Team:Elastic-Agent-Data-Plane Agent Data Plane team [elastic/elastic-agent-data-plane] Team:Security-Windows Platform Security Windows Platform team [elastic/sec-windows-platform]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants