Skip to content
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: proper fragment delimiters in webhook URL #3943

Merged
merged 2 commits into from
Apr 26, 2024

Conversation

ndegory
Copy link
Contributor

@ndegory ndegory commented Mar 29, 2024

1. Explain what the PR does

  • fix: proper fragment delimiters in webhook URL (fixes 3866)

2. Explain how to test it

Legacy way to pass a webhook worked with proper URLs (http://hostname:port?query[&fragment1][&fragment2]
This reproduces it in the code converting the config to flags.

3. Other comments

I have NOT compiled and tested this code (the Makefile is not Apple silicon friendly), but I ran the tests:

➜ go test pkg/cmd/cobra/config_test.go ./pkg/cmd/cobra/config.go
ok      command-line-arguments  0.365s

The current implementation uses '?' as the delimiter for the fragment part of the URL.
Tracee fails to read it, and logs this error:
Error: printer.(*webhookEventPrinter).Init: unable to convert timeout value "3s?gotemplate=...

Signed-off-by: Nicolas Degory <nicolas.degory@gmail.com>
@ndegory
Copy link
Contributor Author

ndegory commented Mar 29, 2024

@josedonizetti this PR is ready for review

@josedonizetti josedonizetti merged commit 095abad into aquasecurity:main Apr 26, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants