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

[libbeat] add_network_direction creates field name that contains a dot #29747

Closed
andrewkroh opened this issue Jan 7, 2022 · 1 comment · Fixed by #29751
Closed

[libbeat] add_network_direction creates field name that contains a dot #29747

andrewkroh opened this issue Jan 7, 2022 · 1 comment · Fixed by #29751
Labels
bug good first issue Indicates a good issue for first-time contributors libbeat :Processors

Comments

@andrewkroh
Copy link
Member

andrewkroh commented Jan 7, 2022

The add_network_direction processor creates field names that contain dots. By default it will create a document that contains

What is does:

{
  "network.direction": "outbound"
}

What is SHOULD do:

{
  "network": {
    "direction": "outbound"
  }
}

The problem is this line that directly uses the target key without considering that it could contain dots.

event.Fields.DeepUpdate(common.MapStr{
m.Target: networkDirection(internalSource, internalDestination),
})

It looks to me like it should use:

event.PutValue(m.Target, networkDirection(internalSource, internalDestination))

@andrewkroh andrewkroh added bug libbeat :Processors good first issue Indicates a good issue for first-time contributors labels Jan 7, 2022
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 7, 2022
legoguy1000 added a commit to legoguy1000/beats that referenced this issue Jan 9, 2022
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 17, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

andrewkroh added a commit that referenced this issue Feb 1, 2022
Fix Add Network Direction processor field with dot in name.


Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
mergify bot pushed a commit that referenced this issue Feb 1, 2022
Fix Add Network Direction processor field with dot in name.

Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
(cherry picked from commit 56b227d)
mergify bot pushed a commit that referenced this issue Feb 1, 2022
Fix Add Network Direction processor field with dot in name.

Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
(cherry picked from commit 56b227d)
andrewkroh added a commit that referenced this issue Mar 15, 2022
Fix Add Network Direction processor field with dot in name.

(cherry picked from commit 56b227d)

Co-authored-by: Alex Resnick <adr8292@gmail.com>
Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Indicates a good issue for first-time contributors libbeat :Processors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants