Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x-pack/winlogbeat/module/powershell: don't split tokens on hyphen #28483

Merged
merged 1 commit into from
Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Add source.ip validation for event ID 4778 in the Security module. {issue}19627[19627]
- Tolerate faults when Windows Event Log session is interrupted {issue}27947[27947] {pull}28191[28191]
- Add ECS 1.9 new users fields {pull}26509[26509]
- Don't split hyphenated tokens {pull}28483[28483]

*Functionbeat*

Expand Down
8 changes: 8 additions & 0 deletions x-pack/winlogbeat/module/powershell/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@

- name: script_block_text
type: text
analyzer:
winlogbeat_powershell_script_analyzer:
type: pattern
pattern: "[\\W&&[^-]]+"
search_analyzer:
winlogbeat_powershell_script_analyzer:
type: pattern
pattern: "[\\W&&[^-]]+"
Comment on lines +134 to +137
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just a note. I duplicated the definition in the search analyzer although this is not required since the analyzers are collated during the fields walk. It is included for clarity — though I'm not sure it achieves that.

description: >
Text of the executed script block.
example: ".\\a_script.ps1"
Expand Down
2 changes: 1 addition & 1 deletion x-pack/winlogbeat/module/powershell/fields.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.