-
Notifications
You must be signed in to change notification settings - Fork 905
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(userspace/engine): avoid storing escaped strings in engine #3028
Conversation
Signed-off-by: Jason Dellaluce <[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 |
/unhold False positive on the engine version checks. |
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! Can we add a simple unit test like the one you used in the PR description?
Signed-off-by: Jason Dellaluce <[email protected]>
Definitely! Just added one. |
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: c8022055cdd4f1d0d1e5e9d5a5831088e1ad8c6f
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, jasondellaluce, 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 bug
Any specific area of the project related to this PR?
/area engine
What this PR does / why we need it:
When the engine compiles list infos, we have a small bug for which we store forcefully-quoted strings in the engine's data structures instead of quoting them only at the time of their usage (at list refs resolution time). After investigating, this doesn't seem to affect the runtime-evaluated rules data structures, but it's clearly visible with the
-L
functionality and reproduced on list items that are YAML-escaped or contain spaces.Example:
Here,
"escaped val"
is interpreted as a list reference and is not properly escaped when printed as a value.Which issue(s) this PR fixes:
Special notes for your reviewer:
With these changes, the same example now correctly prints as:
Does this PR introduce a user-facing change?: