From 03a08871ae4755c17493f1986bc79c9b671dda14 Mon Sep 17 00:00:00 2001 From: olsova Date: Wed, 11 Dec 2024 12:17:06 +0600 Subject: [PATCH] release: prepare v0.3.0 --- README.md | 18 +++++++++--------- go.mod | 2 +- main.go | 4 ++-- plugin.yaml | 51 +++++++++++++++++++++++++-------------------------- 4 files changed, 37 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 5070d1d..44b3972 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,37 @@ -# scan2html +# trivy-html A Trivy plugin that scans and outputs the results to a html file. ```sh -$ trivy image alpine:3.14.1 -f json --output plugin=scan2html --output-plugin-arg "--output=result.html" +$ trivy image alpine:3.14.1 -f json --output plugin=trivy-html --output-plugin-arg "--output=result.html" ``` ![image](https://user-images.githubusercontent.com/19297627/224302593-6873913c-d829-4769-84b6-643d00607a4a.png) ![image](https://user-images.githubusercontent.com/19297627/225588665-7b9dc56b-3326-4535-90f3-1dd81e389e5c.png) -### `scan2html` supports `--list-all-pkgs` +### `trivy-html` supports `--list-all-pkgs` ```sh -$ trivy image alpine:3.14.1 -f json --list-all-pkgs --output plugin=scan2html --output-plugin-arg "--output=result.html" +$ trivy image alpine:3.14.1 -f json --list-all-pkgs --output plugin=trivy-html --output-plugin-arg "--output=result.html" ``` ![image](https://user-images.githubusercontent.com/19297627/226530343-100e3064-0b0a-4860-a439-b6dfd97ac7c3.png) ![image](https://user-images.githubusercontent.com/19297627/226530361-65acc67e-64c0-45f4-b514-31c514284c2f.png) ## Install ```sh -$ trivy plugin install github.com/afdesk/scan2html +$ trivy plugin install github.com/afdesk/trivy-html -$ trivy scan2html -h +$ trivy trivy-html -h A Trivy plugin that scans and outputs the results to a html file. Usage: - scan2html [flags] + trivy-html [flags] Flags: - -h, --help help for scan2html + -h, --help help for trivy-html --output string file to save html report (default "trivy-report.html") ``` ## Uninstall ```sh - trivy plugin uninstall scan2html + trivy plugin uninstall trivy-html ``` diff --git a/go.mod b/go.mod index af3d007..8b7192d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/afdesk/scan2html +module github.com/afdesk/trivy-html go 1.23.3 diff --git a/main.go b/main.go index 5d8216e..f4baf85 100644 --- a/main.go +++ b/main.go @@ -8,7 +8,7 @@ import ( "github.com/spf13/cobra" "golang.org/x/xerrors" - "github.com/afdesk/scan2html/render" + "github.com/afdesk/trivy-html/render" ) func main() { @@ -25,7 +25,7 @@ func main() { func initRootCmd() (*cobra.Command, error) { var fileName string rootCmd := &cobra.Command{ - Use: "scan2html", + Use: "trivy-html", Short: "A Trivy plugin that scans and outputs the results to a html file.", CompletionOptions: cobra.CompletionOptions{ DisableDefaultCmd: true, diff --git a/plugin.yaml b/plugin.yaml index 65f7591..3f33479 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -1,67 +1,66 @@ -name: "scan2html" -repository: github.com/afdesk/scan2html -version: "0.2.0" +name: "trivy-html" +repository: github.com/afdesk/trivy-html +version: "0.3.0" usage: scan targets into a html file description: |- A Trivy plugin that scans and outputs the results to a html file. - trivy scan2html [-h,--help] command target filename platforms: - selector: os: linux arch: amd64 - uri: https://github.com/afdesk/scan2html/releases/download/v0.2.0/scan2html_0.2.0_linux-amd64.tar.gz - bin: ./scan2html + uri: https://github.com/afdesk/trivy-html/releases/download/v0.3.0/trivy-html_0.3.0_linux-amd64.tar.gz + bin: ./trivy-html - selector: os: linux arch: arm - uri: https://github.com/afdesk/scan2html/releases/download/v0.2.0/scan2html_0.2.0_linux-arm.tar.gz - bin: ./scan2html + uri: https://github.com/afdesk/trivy-html/releases/download/v0.3.0/trivy-html_0.3.0_linux-arm.tar.gz + bin: ./trivy-html - selector: os: linux arch: arm64 - uri: https://github.com/afdesk/scan2html/releases/download/v0.2.0/scan2html_0.2.0_linux-arm64.tar.gz - bin: ./scan2html + uri: https://github.com/afdesk/trivy-html/releases/download/v0.3.0/trivy-html_0.3.0_linux-arm64.tar.gz + bin: ./trivy-html - selector: os: linux arch: s390x - uri: https://github.com/afdesk/scan2html/releases/download/v0.2.0/scan2html_0.2.0_linux-s390x.tar.gz - bin: ./scan2html + uri: https://github.com/afdesk/trivy-html/releases/download/v0.3.0/trivy-html_0.3.0_linux-s390x.tar.gz + bin: ./trivy-html - selector: os: linux arch: ppc64le - uri: https://github.com/afdesk/scan2html/releases/download/v0.2.0/scan2html_0.2.0_linux-ppc64le.tar.gz - bin: ./scan2html + uri: https://github.com/afdesk/trivy-html/releases/download/v0.3.0/trivy-html_0.3.0_linux-ppc64le.tar.gz + bin: ./trivy-html - selector: os: linux arch: 386 - uri: https://github.com/afdesk/scan2html/releases/download/v0.2.0/scan2html_0.2.0_linux-386.tar.gz - bin: ./scan2html + uri: https://github.com/afdesk/trivy-html/releases/download/v0.3.0/trivy-html_0.3.0_linux-386.tar.gz + bin: ./trivy-html - selector: os: darwin arch: amd64 - uri: https://github.com/afdesk/scan2html/releases/download/v0.2.0/scan2html_0.2.0_darwin-amd64.tar.gz - bin: ./scan2html + uri: https://github.com/afdesk/trivy-html/releases/download/v0.3.0/trivy-html_0.3.0_darwin-amd64.tar.gz + bin: ./trivy-html - selector: os: darwin arch: arm64 - uri: https://github.com/afdesk/scan2html/releases/download/v0.2.0/scan2html_0.2.0_darwin-arm64.tar.gz - bin: ./scan2html + uri: https://github.com/afdesk/trivy-html/releases/download/v0.3.0/trivy-html_0.3.0_darwin-arm64.tar.gz + bin: ./trivy-html - selector: os: freebsd arch: 386 - uri: https://github.com/afdesk/scan2html/releases/download/v0.2.0/scan2html_0.2.0_freebsd-386.tar.gz - bin: ./scan2html + uri: https://github.com/afdesk/trivy-html/releases/download/v0.3.0/trivy-html_0.3.0_freebsd-386.tar.gz + bin: ./trivy-html - selector: os: freebsd arch: amd64 - uri: https://github.com/afdesk/scan2html/releases/download/v0.2.0/scan2html_0.2.0_freebsd-amd64.tar.gz - bin: ./scan2html + uri: https://github.com/afdesk/trivy-html/releases/download/v0.3.0/trivy-html_0.3.0_freebsd-amd64.tar.gz + bin: ./trivy-html - selector: os: windows arch: amd64 - uri: https://github.com/afdesk/scan2html/releases/download/v0.2.0/scan2html_0.2.0_windows-amd64.zip - bin: ./scan2html + uri: https://github.com/afdesk/trivy-html/releases/download/v0.3.0/trivy-html_0.3.0_windows-amd64.zip + bin: ./trivy-html