-
Notifications
You must be signed in to change notification settings - Fork 165
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
new(savefile): introduce scap-file converter skeleton #2168
base: master
Are you sure you want to change the base?
new(savefile): introduce scap-file converter skeleton #2168
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97 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 |
Please double check driver/SCHEMA_VERSION file. See versioning. /hold |
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2168 +/- ##
==========================================
+ Coverage 74.77% 74.82% +0.04%
==========================================
Files 254 254
Lines 33505 33519 +14
Branches 5747 5748 +1
==========================================
+ Hits 25054 25080 +26
+ Misses 8451 8439 -12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
fd56382
to
5984e0f
Compare
Signed-off-by: Andrea Terzolo <[email protected]>
Signed-off-by: Andrea Terzolo <[email protected]>
562b48a
to
1775efd
Compare
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area libscap-engine-savefile
/area libscap
/area tests
Does this PR require a change in the driver versions?
No
What this PR does / why we need it:
This PR implements the skeleton for the scap-file converter. The idea is to have a declarative converter, so we just need to fill a table and the code should do the rest for us. In this branch, you can find a complete example of how the converter could work https://github.com/falcosecurity/libs/compare/master...Andreagit97:libs:remove_sys_enter_new?expand=1
I'm sharing some highlights directly extracted from that branch here.
The conversion table has as a key
{evt_type, num_params}
and as a value the action to take + some instructions if needed. The idea is to reconstruct the history of our event table from the very beginning and do each conversion until we reach the final event version that we have today in our event table.Let's consider the BRK syscall case:
C_ACTION_SKIP
PPME_SYSCALL_BRK_4_X
with 5 parameters (so the new event version we will introduce in the sys_enter/sys_exit work)The idea is to test each conversion with its own test. This is an example for the BRK syscall
Special notes for your reviewer:
Does this PR introduce a user-facing change?: