-
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
filebeat/module/auditd: teach kv about quoted spaces #34069
Conversation
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
Please retry analysis of this Pull-Request directly on SonarCloud. |
This pull request is now in conflicts. Could you fix it? 🙏
|
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 👍🏼
Yeah the test needs to be fixed and conflict resolved before merging.
@@ -2445,3 +2445,4 @@ type=DAEMON_END msg=audit(1481078697.892:7799): auditd normal halt, sending auid | |||
type=CWD msg=audit(1489639811.480:451): cwd="/home/some_user" | |||
type=PATH msg=audit(1489639811.480:451): item=0 name="/etc/ssh/sshd_config" inode=34485109 dev=08:01 mode=0100600 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:etc_t:s0 objtype=NORMAL | |||
type=USER_CMD msg=audit(1489639825.595:452): pid=1325 uid=1000 auid=1000 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/some_user" cmd=7461696C202D3230202F7661722F6C6F672F61756469742F61756469742E6C6F67 terminal=pts/0 res=success' | |||
type=ANOM_ABEND msg=audit(1605431420.026:123): auid=12345 uid=123 gid=123 ses=123456789 pid=1234 comm="extproc" reason="memory violation" sig=6 |
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.
Only the first 100 events are verified and output to the golden file if I understand test_modules.py correctly. So if you want this to show up in a golden file then I recommend to move it to its own file.
Audit messages may contain spaces when the value is quoted, so let the kv processor know how to deal with this case.
Audit messages may contain spaces when the value is quoted, so let the kv processor know how to deal with this case. (cherry picked from commit f5054f7)
Audit messages may contain spaces when the value is quoted, so let the kv processor know how to deal with this case. (cherry picked from commit f5054f7)
Audit messages may contain spaces when the value is quoted, so let the kv processor know how to deal with this case. (cherry picked from commit f5054f7) Co-authored-by: Dan Kortschak <[email protected]>
Audit messages may contain spaces when the value is quoted, so let the kv processor know how to deal with this case. (cherry picked from commit f5054f7) Co-authored-by: Dan Kortschak <[email protected]>
Audit messages may contain spaces when the value is quoted, so let the kv processor know how to deal with this case.
What does this PR do?
This allows parsing auditd messages that inclued quoted spaces
Why is it important?
Currently these messages cannot be processed.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
TESTING_FILEBEAT_MODULES=auditd MODULES_PATH=module GENERATE=1 mage -v pythonIntegTest
did not generate the expected case for the added test, and yet the test still passed locally. This needs to be fixed before this PR is merged. Take a look at the integrations partner for this change that does have a complete test, auditd: teach kv about quoted spaces integrations#4858.How to test this PR locally
Related issues
Use cases
Screenshots
Logs