-
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(plugins): trim whitespace in open_params
#2267
Conversation
`open_params` is read from the falco YAML configuration file and parsed using Go's URL. For example: https://github.com/falcosecurity/plugins/blob/c349be6e84d2230698b5ca5d51ddadcda42c5e21/plugins/k8saudit/pkg/k8saudit/source.go#L41-L42 Go's URL parser does not handle whitespace, so if a user defines the `open_params` in the falco configuration file as follows ```yaml open_params: > /file/path ``` the parser returns an error. To avoid this, we now trim this parameter so no whitespace will be left for Go's URL parser to error out on. For reference see #2262. Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
Welcome @yardenshoham! 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.
/milestone 0.34.0
/ok-to-test
/approve
LGTM label has been added. Git tree hash: 2565a394157ce6bd135e45e4cbcd36ab32578cee
|
Sorry WHAT |
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
Closing and reopening /close |
@leogr: Closed this PR. In response to this:
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. |
/reopen |
@leogr: Reopened this PR. In response to this:
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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, jasondellaluce, leogr, yardenshoham 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:
open_params
is read from the falco YAML configuration file and parsed using Go's URL.For example:
https://github.com/falcosecurity/plugins/blob/c349be6e84d2230698b5ca5d51ddadcda42c5e21/plugins/k8saudit/pkg/k8saudit/source.go#L41-L42
Go's URL parser does not handle whitespace, so if a user defines the
open_params
in the falco configuration file as followsthe parser returns an error. To avoid this, we now trim this parameter so no whitespace will be left for Go's URL parser to error out on.
Which issue(s) this PR fixes:
It doesn't fix it but it started from falcosecurity/plugins#182.
Special notes for your reviewer:
Read falcosecurity/plugins#182.
Does this PR introduce a user-facing change?:
/cc @jasondellaluce
/assign @yardenshoham