mirror of
https://github.com/goharbor/harbor
synced 2025-04-21 21:09:19 +00:00
Bump up trivy adapter (#21015)
update the version and point to the URL of new repository under goharbor Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
This commit is contained in:
parent
ad8c5df52e
commit
f6eec371d7
6
Makefile
6
Makefile
@ -104,8 +104,8 @@ PREPARE_VERSION_NAME=versions
|
|||||||
|
|
||||||
#versions
|
#versions
|
||||||
REGISTRYVERSION=v2.8.3-patch-redis
|
REGISTRYVERSION=v2.8.3-patch-redis
|
||||||
TRIVYVERSION=v0.51.2
|
TRIVYVERSION=v0.56.1
|
||||||
TRIVYADAPTERVERSION=v0.31.2
|
TRIVYADAPTERVERSION=v0.32.0-rc.1
|
||||||
|
|
||||||
# version of registry for pulling the source code
|
# version of registry for pulling the source code
|
||||||
REGISTRY_SRC_TAG=v2.8.3
|
REGISTRY_SRC_TAG=v2.8.3
|
||||||
@ -115,7 +115,7 @@ DISTRIBUTION_SRC=https://github.com/distribution/distribution.git
|
|||||||
# dependency binaries
|
# dependency binaries
|
||||||
REGISTRYURL=https://storage.googleapis.com/harbor-builds/bin/registry/release-${REGISTRYVERSION}/registry
|
REGISTRYURL=https://storage.googleapis.com/harbor-builds/bin/registry/release-${REGISTRYVERSION}/registry
|
||||||
TRIVY_DOWNLOAD_URL=https://github.com/aquasecurity/trivy/releases/download/$(TRIVYVERSION)/trivy_$(TRIVYVERSION:v%=%)_Linux-64bit.tar.gz
|
TRIVY_DOWNLOAD_URL=https://github.com/aquasecurity/trivy/releases/download/$(TRIVYVERSION)/trivy_$(TRIVYVERSION:v%=%)_Linux-64bit.tar.gz
|
||||||
TRIVY_ADAPTER_DOWNLOAD_URL=https://github.com/aquasecurity/harbor-scanner-trivy/releases/download/$(TRIVYADAPTERVERSION)/harbor-scanner-trivy_$(TRIVYADAPTERVERSION:v%=%)_Linux_x86_64.tar.gz
|
TRIVY_ADAPTER_DOWNLOAD_URL=https://github.com/goharbor/harbor-scanner-trivy/archive/refs/tags/$(TRIVYADAPTERVERSION).tar.gz
|
||||||
|
|
||||||
define VERSIONS_FOR_PREPARE
|
define VERSIONS_FOR_PREPARE
|
||||||
VERSION_TAG: $(VERSIONTAG)
|
VERSION_TAG: $(VERSIONTAG)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM golang:1.22.3
|
FROM golang:1.22.3
|
||||||
|
|
||||||
ADD . /go/src/github.com/aquasecurity/harbor-scanner-trivy/
|
ADD . /go/src/github.com/goharbor/harbor-scanner-trivy/
|
||||||
WORKDIR /go/src/github.com/aquasecurity/harbor-scanner-trivy/
|
WORKDIR /go/src/github.com/goharbor/harbor-scanner-trivy/
|
||||||
|
|
||||||
RUN export GOOS=linux GO111MODULE=on CGO_ENABLED=0 && \
|
RUN export GOOS=linux GO111MODULE=on CGO_ENABLED=0 && \
|
||||||
go build -o scanner-trivy cmd/scanner-trivy/main.go
|
go build -o scanner-trivy cmd/scanner-trivy/main.go
|
||||||
|
@ -16,7 +16,7 @@ cur=$PWD
|
|||||||
|
|
||||||
# The temporary directory to clone Trivy adapter source code
|
# The temporary directory to clone Trivy adapter source code
|
||||||
TEMP=$(mktemp -d ${TMPDIR-/tmp}/trivy-adapter.XXXXXX)
|
TEMP=$(mktemp -d ${TMPDIR-/tmp}/trivy-adapter.XXXXXX)
|
||||||
git clone https://github.com/aquasecurity/harbor-scanner-trivy.git $TEMP
|
git clone https://github.com/goharbor/harbor-scanner-trivy.git $TEMP
|
||||||
cd $TEMP; git checkout $VERSION; cd -
|
cd $TEMP; git checkout $VERSION; cd -
|
||||||
|
|
||||||
echo "Building Trivy adapter binary based on golang:1.22.3..."
|
echo "Building Trivy adapter binary based on golang:1.22.3..."
|
||||||
@ -25,7 +25,7 @@ docker build -f $TEMP/Dockerfile.binary -t trivy-adapter-golang $TEMP
|
|||||||
|
|
||||||
echo "Copying Trivy adapter binary from the container to the local directory..."
|
echo "Copying Trivy adapter binary from the container to the local directory..."
|
||||||
ID=$(docker create trivy-adapter-golang)
|
ID=$(docker create trivy-adapter-golang)
|
||||||
docker cp $ID:/go/src/github.com/aquasecurity/harbor-scanner-trivy/scanner-trivy binary
|
docker cp $ID:/go/src/github.com/goharbor/harbor-scanner-trivy/scanner-trivy binary
|
||||||
|
|
||||||
docker rm -f $ID
|
docker rm -f $ID
|
||||||
docker rmi -f trivy-adapter-golang
|
docker rmi -f trivy-adapter-golang
|
||||||
|
Loading…
x
Reference in New Issue
Block a user