-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
auditbeat/module/auditd: add ignore_errors config option #36851
Conversation
Setting ignore_errors to true allows incompletely valid rule sets to be used in a configuration. This is equivalent to the -i flag of auditctl.
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
if log == nil { | ||
return fmt.Errorf("unable to get the absolute path for %s: %w", pattern, err) | ||
} | ||
log.Warnf("unable to get the absolute path for %s: %v", pattern, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just out of curiousity, why %v
here for the error? I was under the impression %w
was intended for printing errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%w
is only for use with https://pkg.go.dev/fmt#Errorf when wrapping errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Setting ignore_errors to true allows incompletely valid rule sets to be used in a configuration. This is equivalent to the -i flag of auditctl.
Proposed commit message
Setting ignore_errors to true allows incompletely valid rule sets to be
used in a configuration. This is equivalent to the -i flag of auditctl.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
In auditbeat/module/auditd, run
go test -v -run TestConfig/ValidateWithError
. Both tests should pass and the second should emit a warning log line similar to thisRelated issues
Use cases
Screenshots
Logs