Skip to content

Commit

Permalink
Forked to remove hardcoded args
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavi committed Jan 24, 2024
1 parent 4f0f1d9 commit fcec538
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
22 changes: 14 additions & 8 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,21 @@ builds:
- goos: darwin
goarch: 386
archives:
- name_template: "{{ .ProjectName }}_{{.Version}}_{{ .Os }}_{{ .Arch }}"
- id: archive
name_template: >-
{{- .ProjectName }}_
{{- .Version }}_
{{- if eq .Os "darwin" }}macOS_
{{- else if eq .Os "linux" }}Linux_
{{- else }}{{ .Os }}_
{{ end }}
{{- if eq .Arch "amd64" }}64bit
{{- else if eq .Arch "arm" }}ARM
{{- else if eq .Arch "arm64" }}ARM64
{{- else }}{{ .Arch }}
{{ end }}
builds:
- trivy-webhook
replacements:
amd64: 64bit
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
checksum:
name_template: "checksums.txt"
snapshot:
Expand All @@ -49,4 +55,4 @@ changelog:
exclude:
- '^docs'
- '^test'
- '^release'
- '^release'
1 change: 0 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ func runScan(args []string, execCmd func(string, ...string) *exec.Cmd) ([]byte,
if !containsSlice(trivyArgs, "format") {
trivyArgs = append(trivyArgs, []string{"--format=json"}...)
}
trivyArgs = append(trivyArgs, []string{"--quiet", "--timeout=30s"}...)

log.Println("running trivy with args: ", trivyArgs)
out, err := execCmd("trivy", trivyArgs...).CombinedOutput()
Expand Down
14 changes: 7 additions & 7 deletions plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "webhook"
repository: github.com/aquasecurity/trivy-plugin-webhook
version: "0.4.1"
repository: github.com/aetion/trivy-plugin-webhook
version: "0.4.2"
usage: trivy webhook -- <plugin args> -- <trivy args>
description: |-
A Trivy plugin that sends the trivy results to a webhook endpoint.
Expand All @@ -9,25 +9,25 @@ platforms:
- selector:
os: linux
arch: amd64
uri: https://github.com/aquasecurity/trivy-plugin-webhook/releases/download/v0.4.1/trivy-webhook_0.4.1_Linux_64bit.tar.gz
uri: https://github.com/aetion/trivy-plugin-webhook/releases/download/v0.4.2/trivy-webhook_0.4.2_Linux_64bit.tar.gz
bin: ./trivy-webhook
- selector:
os: linux
arch: arm
uri: https://github.com/aquasecurity/trivy-plugin-webhook/releases/download/v0.4.1/trivy-webhook_0.4.1_Linux_ARM.tar.gz
uri: https://github.com/aetion/trivy-plugin-webhook/releases/download/v0.4.2/trivy-webhook_0.4.2_Linux_ARM.tar.gz
bin: ./trivy-webhook
- selector:
os: linux
arch: arm64
uri: https://github.com/aquasecurity/trivy-plugin-webhook/releases/download/v0.4.1/trivy-webhook_0.4.1_Linux_ARM64.tar.gz
uri: https://github.com/aetion/trivy-plugin-webhook/releases/download/v0.4.2/trivy-webhook_0.4.2_Linux_ARM64.tar.gz
bin: ./trivy-webhook
- selector:
os: darwin
arch: amd64
uri: https://github.com/aquasecurity/trivy-plugin-webhook/releases/download/v0.4.1/trivy-webhook_0.4.1_macOS_64bit.tar.gz
uri: https://github.com/aetion/trivy-plugin-webhook/releases/download/v0.4.2/trivy-webhook_0.4.2_macOS_64bit.tar.gz
bin: ./trivy-webhook
- selector:
os: darwin
arch: arm64
uri: https://github.com/aquasecurity/trivy-plugin-webhook/releases/download/v0.4.1/trivy-webhook_0.4.1_macOS_ARM64.tar.gz
uri: https://github.com/aetion/trivy-plugin-webhook/releases/download/v0.4.2/trivy-webhook_0.4.2_macOS_ARM64.tar.gz
bin: ./trivy-webhook

0 comments on commit fcec538

Please sign in to comment.