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

Send webhook for deleted reports #1075

Merged
merged 9 commits into from
Mar 23, 2023
Merged

Send webhook for deleted reports #1075

merged 9 commits into from
Mar 23, 2023

Conversation

bgoareguer
Copy link
Contributor

@bgoareguer bgoareguer commented Mar 20, 2023

Description

Before this PR, trivy-operator only sent webhooks for created/updated reports.
In this PR trivy-operator also sends webhooks for deleted reports.

To make sure the receiver of the webhook can distinguish between created/updated reports and deleted reports, the webhook has been modified so that it now contains 2 fields:

  • verb (can be "update" or "delete")
  • report (the actual trivy-operator report)

Related issues

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@chen-keinan
Copy link
Contributor

chen-keinan commented Mar 21, 2023

@bgoareguer thanks you for the contribution , I have added few comments , also maybe it should configurable as this change might break the default integration with postee alerts and postee template , which use rego --> input.report

@bgoareguer bgoareguer requested a review from chen-keinan March 21, 2023 16:48
@chen-keinan
Copy link
Contributor

chen-keinan commented Mar 22, 2023

@bgoareguer thank you for the PR update , I have added couple of suggestion and nit comment

@bgoareguer bgoareguer requested a review from chen-keinan March 23, 2023 08:31
@chen-keinan
Copy link
Contributor

@bgoareguer look good 🚀 thank you for the contribution, last thing , do you mind updating the helm readme with new param

@chen-keinan
Copy link
Contributor

lgtm 🚀

@chen-keinan chen-keinan merged commit 3d80d96 into aquasecurity:main Mar 23, 2023
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.

Send a webhook when a report is deleted
2 participants