-
Notifications
You must be signed in to change notification settings - Fork 908
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
cleanup: replace banned.h with semgrep #2881
cleanup: replace banned.h with semgrep #2881
Conversation
Signed-off-by: Luca Guerra <[email protected]>
This PR may bring feature or behavior changes in the Falco engine and may require the engine version to be bumped. Please double check userspace/engine/falco_engine_version.h file. See versioning for FALCO_ENGINE_VERSION. /hold |
Signed-off-by: Luca Guerra <[email protected]>
Signed-off-by: Luca Guerra <[email protected]>
d436910
to
7ccfeb6
Compare
/unhold version bump is not required |
/milestone 0.37.0 |
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.
/approve
LGTM label has been added. Git tree hash: 59b9a0000ded79a003f216371a159fa2e21cc81e
|
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, FedeDP, LucaGuerra 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 |
What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area engine
/area CI
What this PR does / why we need it:
We used to have a
banned.h
header file that prevents you from using specific functions. The problem with it is that we have to manually add it to any.cpp
file that we ever write. This does not happen in practice unless there is a specific header that always needs to be included (falco_common.h
seems to be it but really is not). In libs we have decided to use semgrep in CI instead.The advantage of using Semgrep is that we don't have to modify the code or remember to include any extra header. The disadvantage is that you won't get compile time errors but only CI time errors. Let's do the same in Falco and in libs.
In addition, a file was using
strncat
. Replace it withstrlcat
.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: