-
Notifications
You must be signed in to change notification settings - Fork 920
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
Fix base64 flag #988
Fix base64 flag #988
Conversation
@realgam3: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Welcome @realgam3! It looks like this is your first PR to falcosecurity/falco 🎉 |
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.
Hello @realgam3 thanks for submitting this.
Will look deeply into it soon.
In the meantime would you please fill the PR template, provide a good title for the PR, and sign-off your commit?
Hey @realgam3, a friendly ping :) We need the commits to be signed-off :) |
|
Maybe yes! Otherwise I'll use some git magic here as soon I have some spare time :) |
For the people who uses the -b or --print-base64 command argument, "s_inspector->set_buffer_format(sinsp_evt::PF_NORMAL);" will restore the state to normal dot escaped string instead of base64 (that they chose....). Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com> Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
LGTM label has been added. Git tree hash: 55765d89151dac5c7986a05816f654fce68f3dc7
|
@realgam3 sorry CI didn't trigger (we had a problem with some settings earlier) |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: leodido The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I'm still waiting to merge this because I'm trying to understand how this is related to #581 |
That line was initially removed to support base64 but then was re-added because json was broken https://github.com/falcosecurity/falco/pull/410/files#diff-619b66cc1dd5ce6c64d2aa45a121ad63L127 |
Here's what I get after testing this patch: Output with this change: {
"output": "{\"evt.buffer\":\"IBtbMG0bWzAxOzM0bURlc2t0b3AbWzBtICAgG1swMTszNG1Eb2N1bWVudHMbWzBtICAgG1swMTszNG1Eb3dubG9hZHMbWzBtICAgG1swMTszNG1nbxtbMG0gICAbWzAxOzM0bVBpY3R1cmVzG1swbSAgIBtbMDE7MzRtUHJvamVjdHMbWzBtICAgG1swMTszNG1WaWRlb3MbWzBtICAbWzAxOzM0bSdWaXJ0dWFsQm94IFZNcycbWzBtCg==\",\"evt.time\":1580811468970787674}",
"priority": "Notice",
"rule": "Test renzo",
"time": "2020-02-04T10:17:48.970787674Z",
"output_fields": {
"evt.buffer": "IBtbMG0bWzAxOzM0bURlc2t0b3AbWzBtICAgG1swMTszNG1Eb2N1bWVudHMbWzBtICAgG1swMTszNG1Eb3dubG9hZHMbWzBtICAgG1swMTszNG1nbxtbMG0gICAbWzAxOzM0bVBpY3R1cmVzG1swbSAgIBtbMDE7MzRtUHJvamVjdHMbWzBtICAgG1swMTszNG1WaWRlb3MbWzBtICAbWzAxOzM0bSdWaXJ0dWFsQm94IFZNcycbWzBtCg==",
"evt.time": 1580811468970787600
}
}
This is wrong because:
Output without this change: {
"output": "11:22:08.168296981: Notice Yo (error= .[0m.[01;34mDesktop.[0m .[01;34mDocuments.[0m .[01;34mDownloads.[0m .[01;34mgo.[0m .[01;34mPictures.[0m .[01;34mProjects.[0m .[01;34mVideos.[0m .[01;34m'VirtualBox VMs'.[0m.)",
"priority": "Notice",
"rule": "Test renzo",
"time": "2020-02-04T10:22:08.168296981Z",
"output_fields": {
"evt.buffer": " .[0m.[01;34mDesktop.[0m .[01;34mDocuments.[0m .[01;34mDownloads.[0m .[01;34mgo.[0m .[01;34mPictures.[0m .[01;34mProjects.[0m .[01;34mVideos.[0m .[01;34m'VirtualBox VMs'.[0m.",
"evt.time": 1580811728168297000
}
} This is wrong because
|
/close in favor of #1033 |
For the people who uses the -b or --print-base64 command argument,
"s_inspector->set_buffer_format(sinsp_evt::PF_NORMAL);" will restore the state to normal dot escaped string instead of base64 (that they chose....).
What type of PR is this?
Any specific area of the project related to this PR?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #987
Special notes for your reviewer:
Does this PR introduce a user-facing change?: