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

Webhook message formatting using go templates #582

Merged
merged 13 commits into from
Mar 4, 2021
Merged

Webhook message formatting using go templates #582

merged 13 commits into from
Mar 4, 2021

Conversation

simar7
Copy link
Member

@simar7 simar7 commented Feb 27, 2021

This PR aims to add the following:

  • Formatting webhook payloads with supplied templates
  • Using a user supplied template for formatting payload
  • Additional refactoring & testing

Fixes: #539

Sample usage:

tracee-rules --input-tracee format:json --webhook="http://foo.local" --webhook-template="templates/simple.tmpl" --content-type="application/json"

Signed-off-by: Simarpreet Singh simar@linux.com

@simar7 simar7 self-assigned this Feb 27, 2021
tracee-rules/output.go Outdated Show resolved Hide resolved
tracee-rules/output.go Show resolved Hide resolved
tracee-rules/output.go Outdated Show resolved Hide resolved
tracee-rules/output.go Outdated Show resolved Hide resolved
tracee-rules/output_test.go Outdated Show resolved Hide resolved
simar7 added 11 commits March 2, 2021 14:07
Signed-off-by: Simarpreet Singh <simar@linux.com>
Signed-off-by: Simarpreet Singh <simar@linux.com>
Signed-off-by: Simarpreet Singh <simar@linux.com>
Signed-off-by: Simarpreet Singh <simar@linux.com>
Signed-off-by: Simarpreet Singh <simar@linux.com>
Signed-off-by: Simarpreet Singh <simar@linux.com>
Signed-off-by: Simarpreet Singh <simar@linux.com>
Signed-off-by: Simarpreet Singh <simar@linux.com>
Signed-off-by: Simarpreet Singh <simar@linux.com>
Signed-off-by: Simarpreet Singh <simar@linux.com>
Signed-off-by: Simarpreet Singh <simar@linux.com>
tracee-rules/output.go Outdated Show resolved Hide resolved
tracee-rules/main.go Outdated Show resolved Hide resolved
tracee-rules/output.go Show resolved Hide resolved
Signed-off-by: Simarpreet Singh <simar@linux.com>
Signed-off-by: Simarpreet Singh <simar@linux.com>
@simar7 simar7 merged commit 9c6d248 into aquasecurity:main Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use gotemplate to format webhook message
3 participants