aquasecurity / aquasecurity/postee
Trivy Operator error "kind":"Vulnerabili... doesn't match a REGO input files rule"
- Dominant language
- Go
- Stars
- 204
- Forks
- 65
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 1
Description
## Description
When running trivy operator scan, postee can't match the results with rego input
Postee Configuration:
```
routes:
- name: Trivy Operator Alerts
input: input.report.summary.criticalCount > 0 # You can customize this based on your needs
actions: [send-slack-msg]
template: trivy-operator-slack
# Templates are used to format a message
templates:
- name: trivy-operator-slack
rego-package: postee.trivyoperator.slack
# Actions are target services that should consume the messages
actions:
- name: send-slack-msg
type: slack
enable: true
url: SLACK_WEBHOOK
```
## What did you expect to happen?
To be able to send the results through slack
## What happened instead?
Gives an error:
```
postee-0 postee 2022/11/18 18:26:46 route "Trivy Operator Alerts" contains reference to undefined or misconfigured template "trivy-operator-slack".
postee-0 postee 2022/11/18 18:26:46 route "stdout" contains reference to undefined or misconfigured template "raw-json".
postee-0 postee 2022/11/18 18:26:46 Input {"kind":"Vulnerabili... doesn't match a REGO input files rule
```
Postee version: v2.9.0
Trivy operator version: 0.6.0
Contributor guide
Research direction
Start by reproducing the supplied Postee configuration with Trivy Operator 0.6.0 and Postee v2.9.0. Trace how the trivy-operator-slack and raw-json templates are loaded and how the Vulnerability input is checked against REGO input-file rules. Done means the route accepts the scan results and sends them through Slack without the template or input-rule errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes
- Domain
- security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100