From 4108f9443c5372d3aa73ce25a798b5ecf61b671b Mon Sep 17 00:00:00 2001 From: kunlongli Date: Wed, 22 Mar 2023 17:42:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9trivy=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E5=8C=85=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ trivy/cmd/main.go | 4 ++-- trivy/go.mod | 2 +- trivy/go.sum | 4 ++-- trivy/{ => pkg}/constant/trivy.go | 0 trivy/{cmd => pkg}/output.go | 4 ++-- trivy/{cmd => pkg}/scan_executor.go | 4 ++-- 7 files changed, 11 insertions(+), 9 deletions(-) rename trivy/{ => pkg}/constant/trivy.go (100%) rename trivy/{cmd => pkg}/output.go (98%) rename trivy/{cmd => pkg}/scan_executor.go (98%) diff --git a/README.md b/README.md index 7f48c46..dc8a721 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ [trivy使用文档](https://github.com/TencentBlueKing/ci-repoAnalysis/tree/master/trivy) +[dependency-check使用文档](https://github.com/TencentBlueKing/ci-repoAnalysis/tree/master/dependency-check) + ### 接入新的工具 工具接入参考[开发文档](https://github.com/TencentBlueKing/ci-repoAnalysis/tree/master/docs/development.md) diff --git a/trivy/cmd/main.go b/trivy/cmd/main.go index fe7414f..fad2fd3 100644 --- a/trivy/cmd/main.go +++ b/trivy/cmd/main.go @@ -2,9 +2,9 @@ package main import ( "github.com/TencentBlueKing/ci-repoAnalysis/analysis-tool-sdk-golang/framework" - "github.com/TencentBlueKing/ci-repoAnalysis/trivy/cmd" + "github.com/TencentBlueKing/ci-repoAnalysis/trivy/pkg" ) func main() { - framework.Analyze(cmd.TrivyExecutor{}) + framework.Analyze(pkg.TrivyExecutor{}) } diff --git a/trivy/go.mod b/trivy/go.mod index 748e723..9f75f95 100644 --- a/trivy/go.mod +++ b/trivy/go.mod @@ -2,4 +2,4 @@ module github.com/TencentBlueKing/ci-repoAnalysis/trivy go 1.18 -require github.com/TencentBlueKing/ci-repoAnalysis/analysis-tool-sdk-golang v0.0.11 +require github.com/TencentBlueKing/ci-repoAnalysis/analysis-tool-sdk-golang v0.0.12 diff --git a/trivy/go.sum b/trivy/go.sum index 61f191e..c4b84d7 100644 --- a/trivy/go.sum +++ b/trivy/go.sum @@ -1,2 +1,2 @@ -github.com/TencentBlueKing/ci-repoAnalysis/analysis-tool-sdk-golang v0.0.11 h1:Y1kw75IWG/cLgx154SRSnZ6sWUlpQTnr4bUqMV/YeqI= -github.com/TencentBlueKing/ci-repoAnalysis/analysis-tool-sdk-golang v0.0.11/go.mod h1:8fgb+y0YWqULX/oVg4dsWAq6ftsVZfFrXQjCKXwAE1Q= +github.com/TencentBlueKing/ci-repoAnalysis/analysis-tool-sdk-golang v0.0.12 h1:Pb8Y0QqLJ2Z0ZI4oN7hdh3yXROdIOD6ZXTwuIB+IOZ8= +github.com/TencentBlueKing/ci-repoAnalysis/analysis-tool-sdk-golang v0.0.12/go.mod h1:8fgb+y0YWqULX/oVg4dsWAq6ftsVZfFrXQjCKXwAE1Q= diff --git a/trivy/constant/trivy.go b/trivy/pkg/constant/trivy.go similarity index 100% rename from trivy/constant/trivy.go rename to trivy/pkg/constant/trivy.go diff --git a/trivy/cmd/output.go b/trivy/pkg/output.go similarity index 98% rename from trivy/cmd/output.go rename to trivy/pkg/output.go index d7d2407..575607b 100644 --- a/trivy/cmd/output.go +++ b/trivy/pkg/output.go @@ -1,8 +1,8 @@ -package cmd +package pkg import ( "github.com/TencentBlueKing/ci-repoAnalysis/analysis-tool-sdk-golang/object" - "github.com/TencentBlueKing/ci-repoAnalysis/trivy/constant" + "github.com/TencentBlueKing/ci-repoAnalysis/trivy/pkg/constant" "strings" "time" ) diff --git a/trivy/cmd/scan_executor.go b/trivy/pkg/scan_executor.go similarity index 98% rename from trivy/cmd/scan_executor.go rename to trivy/pkg/scan_executor.go index e72d660..9d4260e 100644 --- a/trivy/cmd/scan_executor.go +++ b/trivy/pkg/scan_executor.go @@ -1,4 +1,4 @@ -package cmd +package pkg import ( "archive/tar" @@ -9,7 +9,7 @@ import ( "fmt" "github.com/TencentBlueKing/ci-repoAnalysis/analysis-tool-sdk-golang/object" "github.com/TencentBlueKing/ci-repoAnalysis/analysis-tool-sdk-golang/util" - "github.com/TencentBlueKing/ci-repoAnalysis/trivy/constant" + "github.com/TencentBlueKing/ci-repoAnalysis/trivy/pkg/constant" "io" "net/http" "os"