Skip to content

Preserve auditd.log.record_type #10829

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

Merged
merged 7 commits into from
Aug 22, 2024

Conversation

nicholasberlin
Copy link
Contributor

@nicholasberlin nicholasberlin commented Aug 20, 2024

Proposed commit message

Preserve auditd.log.record_type

Rather than renaming auditd.log.record_type to event.action and silently failing if event.action was pre-existing, set event.action with a copy of auditd.log.record_type if event.type is emtpy. This will preserve auditd.log.record_type if event.type is empty.

Also, since the mappings are name instead of number based, fallback to auditd.log.SYSCALL to gather syscall ecs mappings if auditd.log.syscall fails. <-- This needs more work

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.

Related issues

Rather than renaming `auditd.log.record_type` to `event.action`
and silently failing if `event.action` was pre-existing, set
`event.action` with a copy of `auditd.log.record_type` if `event.type`
is emtpy. This will preserve `auditd.log.record_type` if `event.type`
is empty.

Also, since the mappings are name instead of number based, fallback
to `auditd.log.SYSCALL` to gather syscall ecs mappings if `auditd.log.syscall`
fails.
@nicholasberlin nicholasberlin added bugfix Pull request that fixes a bug issue Team:Security-Linux Platform Linux Platform Security team [elastic/sec-linux-platform] bug Something isn't working, use only for issues enhancement New feature or request labels Aug 20, 2024
@andrewkroh andrewkroh added Integration:auditd Auditd Logs and removed bug Something isn't working, use only for issues labels Aug 20, 2024
@nicholasberlin nicholasberlin marked this pull request as ready for review August 22, 2024 15:43
@nicholasberlin nicholasberlin requested review from a team as code owners August 22, 2024 15:43
@elasticmachine
Copy link

Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform)

@nicholasberlin
Copy link
Contributor Author

/test

@elasticmachine
Copy link

💚 Build Succeeded

History

Copy link

@andrewkroh andrewkroh removed the request for review from a team August 22, 2024 16:35
Copy link
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.

LGTM

"a2": "242",
"a3": "180",
"items": "2",
"key": "delete\"\u001dARCH=x86_64",
Copy link
Member

Choose a reason for hiding this comment

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

That looks wrong. But it's unrelated to this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made an issue here: #10852
And another, related to parsing the syscall: #10853

@nicholasberlin nicholasberlin merged commit c5862b6 into main Aug 22, 2024
5 checks passed
@nicholasberlin nicholasberlin deleted the nberlin/preserve_auditd_log_record_type branch August 22, 2024 18:14
@elasticmachine
Copy link

Package auditd - 3.20.1 containing this change is available at https://epr.elastic.co/search?package=auditd

@andrewkroh andrewkroh removed the enhancement New feature or request label Aug 26, 2024
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
* Preserve auditd.log.record_type

Rather than renaming `auditd.log.record_type` to `event.action`
and silently failing if `event.action` was pre-existing, set
`event.action` with a copy of `auditd.log.record_type` if `event.type`
is emtpy. This will preserve `auditd.log.record_type` if `event.type`
is empty.
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
* Preserve auditd.log.record_type

Rather than renaming `auditd.log.record_type` to `event.action`
and silently failing if `event.action` was pre-existing, set
`event.action` with a copy of `auditd.log.record_type` if `event.type`
is emtpy. This will preserve `auditd.log.record_type` if `event.type`
is empty.
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 Integration:auditd Auditd Logs Team:Security-Linux Platform Linux Platform Security team [elastic/sec-linux-platform]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Auditd]: auditd.log.record_type not preserved
3 participants