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

trivy args and slack webhook #15

Open
abdidarmawan007 opened this issue Feb 14, 2023 · 4 comments
Open

trivy args and slack webhook #15

abdidarmawan007 opened this issue Feb 14, 2023 · 4 comments

Comments

@abdidarmawan007
Copy link

abdidarmawan007 commented Feb 14, 2023

i try sending trivy scan to slack webhook and i have questionwhat is trivy args ?

trivy webhook -- -url=https://hooks.slack.com/services/xxxx/xxxx/xxxx -- "trivy args"

@HW-Jeremy
Copy link

HW-Jeremy commented Feb 15, 2023

Same here :

trivy webhook -- -url="https://hooks.slack.com/services/xxx/xxx/xxx" -- "image xxx/xxx/xxx --exit-code 1 --cache-dir .trivycache/ --no-progress --security-checks vuln,config,secret --severity CRITICAL"
trivy webhook -- -url=<webhook-url> -- <trivy args>
     webhook endpoint url
2023/02/15 09:08:44 trivy webhook plugin expects a webhook endpoint url
Error: plugin error: plugin exec: exit status 1
Usage:
  trivy webhook [flags]

Flags:
  -h, --help   help for webhook

Global Flags:
      --cache-dir string          cache directory (default "/Users/xxxx/Library/Caches/trivy")
  -c, --config string             config path (default "trivy.yaml")
  -d, --debug                     debug mode
      --generate-default-config   write the default config to trivy-default.yaml
      --insecure                  allow insecure server connections when using TLS
  -q, --quiet                     suppress progress bar and log output
      --timeout duration          timeout (default 5m0s)
  -v, --version                   show version

2023-02-15T09:08:44.792+0100	FATAL	plugin error: plugin exec: exit status 1

@abdidarmawan007
Copy link
Author

abdidarmawan007 commented Feb 16, 2023

@HW-Jeremy I have also tried like that and it doesn't work,

@KrishnaMohanGannamraju
Copy link

KrishnaMohanGannamraju commented Mar 16, 2023

@knqyf263 As suggested in the aquasecurity/trivy#632

The issue already exists here. I am trying to use this plugin to create a jira ticket for the image scan vulnerabilities.

Getting the same error.

@sokoow
Copy link

sokoow commented Mar 24, 2023

There's an extra -- at the beginning of the command, here's what works for me:

trivy webhook --url=http://postee.kube-system:8082 -- image alpine:3.10 --format=json

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

No branches or pull requests

4 participants