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

aucoalesce: Be more forgiving of compound events. #3

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

stephen-fox
Copy link
Contributor

The CoalesceMessages function takes one or more audit messages and creates an Event object. An Event containing more than one message is known as a "compound event".

Prior to this commit, the compound event parsing logic required that a "syscall" message be included in the slice passed to the function. This requirement may be a little over-zealous. In GitHub issue 127, we discovered examples of audit events that did not include a syscall message. [1] This resulted in CoalesceMessages returning an error.

This commit modifies the syscall message check to only return an error if both the "special" and syscall audit messages are missing. In such a case, a new (testable) error is returned.

  1. aucoalesce: CoalesceMessages fails with "missing syscall message in compound event" elastic/go-libaudit#127

The CoalesceMessages function takes one or more audit messages and
creates an Event object. An Event containing more than one message
is known as a "compound event".

Prior to this commit, the compound event parsing logic required that
a "syscall" message be included in the slice passed to the function.
This requirement may be a little over-zealous. In GitHub issue 127,
we discovered examples of audit events that did not include a syscall
message. [1] This resulted in CoalesceMessages returning an error.

This commit modifies the syscall message check to only return an
error if both the "special" and syscall audit messages are missing.
In such a case, a new (testable) error is returned.

1. elastic/go-libaudit#127
@stephen-fox stephen-fox requested a review from JAORMX March 13, 2023 14:40
@JAORMX JAORMX merged commit 2122257 into main Mar 13, 2023
@JAORMX JAORMX deleted the relax-compound-event-message-check branch March 13, 2023 15:39
stephen-fox pushed a commit to metal-toolbox/audito-maldito that referenced this pull request Mar 13, 2023
stephen-fox pushed a commit to metal-toolbox/audito-maldito that referenced this pull request Mar 13, 2023
stephen-fox pushed a commit to metal-toolbox/audito-maldito that referenced this pull request Mar 14, 2023
stephen-fox pushed a commit to metal-toolbox/audito-maldito that referenced this pull request Mar 14, 2023
stephen-fox pushed a commit to metal-toolbox/audito-maldito that referenced this pull request Mar 14, 2023
stephen-fox pushed a commit to metal-toolbox/audito-maldito that referenced this pull request Mar 14, 2023
stephen-fox pushed a commit to metal-toolbox/audito-maldito that referenced this pull request Mar 14, 2023
JAORMX pushed a commit to metal-toolbox/audito-maldito that referenced this pull request Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants