-
Notifications
You must be signed in to change notification settings - Fork 138
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
Added dataJsonString to custom provider format handler. #225
Conversation
change example `notify -version` to `notify -verbose`. It's a small typo.
Fix a typo mistake in README.md
Added dataJsonString to custom format - it treats data ans json string that needs to be escaped.
Added support for sprig and json input when using custom_sprig option
Better error info
Added an examples for dataJsonString and custom_sprig
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.
PR Summary
- adds
dataJsonFormat
custom format which marshals given msg to json and injects json string .example
custom:
- id: webhookJson
custom_webhook_url: http://host/api/webhook
custom_method: GET
custom_format: '{"text":{{dataJsonString}} }'
custom_headers:
Content-Type: application/json
X-Api-Key: XXXXX
- adds support for sprig templating and helper functions (which is like nuclei dsl) Ref: http://masterminds.github.io/sprig/
- need confirmation on ^ from @Mzack9999 since this was closed earlier as not planned feat: Message format as golang template #114
- another thing to note is that all these changes are only done/implemented on
custom webhooks
Kudos, SonarCloud Quality Gate passed! |
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 - @tarunKoyalwar, the original issue was kept on hold as the change impacted the existing default behavior of the engine.
Added dataJsonString to custom format - it treats data ans json string that needs to be escaped.