-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
Adds Log() to MatchedRule, fixes audit log without log
#848
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #848 +/- ##
==========================================
+ Coverage 81.51% 81.58% +0.07%
==========================================
Files 158 159 +1
Lines 8947 9010 +63
==========================================
+ Hits 7293 7351 +58
- Misses 1408 1412 +4
- Partials 246 247 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
#846 back to this |
var al2 auditlog.Log | ||
// there should be no audit log because of nolog | ||
if err := json.NewDecoder(file).Decode(&al2); err == nil { | ||
if al2.Messages() != nil { |
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.
Are there any assertions about the content of the logs?
This PR proposes to enrich
MatchedRule
withLog()
for filtering purposes.It permits to:
Rule().Severity()
, but that field was not suitable for this purpose).Edit: with the workaround:
MatchedRule
: meant to internally collect any matched rule ( possible implications may be related to audit logs, Restricts MatchedRule list to rules with log directive #840 (comment) or anything else that adds an exception to the code may (or will) lead).Supersedes #840
Fixes #839