forked from aquasecurity/trivy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main_datarobot' into update_0.57.0
- Loading branch information
Showing
7 changed files
with
254 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
## How to release our fork | ||
|
||
It uses goreleaser: https://goreleaser.com/customization/release/#github | ||
|
||
What you need to release? | ||
|
||
`GITHUB_TOKEN` set to a GitHub API token that has release permissions | ||
|
||
Logged into Docker Hub with a user that has permission to write images to datarobotdev/trivy | ||
|
||
Make a tag that represents the version we are "forking". | ||
|
||
I typically pick the latest release from the upstream, for example v0.48.3 | ||
|
||
I would do | ||
|
||
``` | ||
git checkout v0.48.3 | ||
git checkout -b u/v0.48.3 | ||
git checkout main_datarobot | ||
git rebase u/v0.48.3 | ||
git push -f | ||
git tag v0.48.3-dr1 | ||
git push origin v0.48.3-dr1 | ||
``` | ||
then I'm ready to run the releaser that will build and push everything | ||
|
||
To try out the release and make sure it should work: | ||
|
||
https://goreleaser.com/quick-start/?h=dry+run#dry-run | ||
|
||
|
||
``` | ||
goreleaser -f goreleaser-datarobot.yml build --clean | ||
``` | ||
|
||
Make sure that works then: | ||
|
||
``` | ||
goreleaser -f goreleaser-datarobot.yml release --clean | ||
``` | ||
|
||
You probably will have some docker error: | ||
|
||
``` | ||
docker context use default | ||
``` | ||
should fix it, then run again | ||
|
||
|
||
To update the drone-trivy plugin, just run the main branch build from the harness ui. | ||
It is built from the latest tag of our forked trivy repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
VulnerabilityID,Severity,PackageName,InstalledVersion,FixedVersion,PackagePath,Target | ||
{{- range . }} | ||
{{- $target := .Target -}} | ||
{{- if (gt (len .Vulnerabilities) 0) }} | ||
{{- range .Vulnerabilities }} | ||
"{{- .VulnerabilityID | replace "\"" "\"\"" }}","{{- .Vulnerability.Severity | replace "\"" "\"\"" }}","{{- .PkgName | replace "\"" "\"\""}}","{{- .InstalledVersion | replace "\"" "\"\"" }}","{{- .FixedVersion | replace "\"" "\"\"" }}","{{- .PkgPath | replace "\"" "\"\"" }}","{{- $target | replace "\"" "\"\"" }}",{{- end }} | ||
{{- end -}} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
project_name: trivy | ||
builds: | ||
- id: build-linux | ||
main: cmd/trivy/main.go | ||
binary: trivy | ||
ldflags: | ||
- -s -w | ||
- "-extldflags '-static'" | ||
- -X github.com/aquasecurity/trivy/pkg/version.ver={{.Version}} | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
goarch: | ||
- 386 | ||
- arm | ||
- amd64 | ||
- arm64 | ||
goarm: | ||
- 7 | ||
- id: build-macos | ||
main: cmd/trivy/main.go | ||
binary: trivy | ||
ldflags: | ||
- -s -w | ||
- "-extldflags '-static'" | ||
- -X github.com/aquasecurity/trivy/pkg/version.ver={{.Version}} | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
goarm: | ||
- 7 | ||
|
||
dockers: | ||
- image_templates: | ||
- "docker.io/datarobotdev/trivy:{{ .Version }}-amd64" | ||
- "docker.io/datarobotdev/trivy:latest-amd64" | ||
use: buildx | ||
goos: linux | ||
goarch: amd64 | ||
ids: | ||
- build-linux | ||
build_flag_templates: | ||
- "--label=org.opencontainers.image.title={{ .ProjectName }}" | ||
- "--label=org.opencontainers.image.description=A Fast Vulnerability Scanner for Containers" | ||
- "--label=org.opencontainers.image.vendor=Aqua Security" | ||
- "--label=org.opencontainers.image.version={{ .Version }}" | ||
- "--label=org.opencontainers.image.created={{ .Date }}" | ||
- "--label=org.opencontainers.image.source=https://github.com/aquasecurity/trivy" | ||
- "--label=org.opencontainers.image.revision={{ .FullCommit }}" | ||
- "--label=org.opencontainers.image.url=https://www.aquasec.com/products/trivy/" | ||
- "--label=org.opencontainers.image.documentation=https://aquasecurity.github.io/trivy/v{{ .Version }}/" | ||
- "--platform=linux/amd64" | ||
extra_files: | ||
- contrib/ | ||
- image_templates: | ||
- "docker.io/datarobotdev/trivy:{{ .Version }}-arm64" | ||
- "docker.io/datarobotdev/trivy:latest-arm64" | ||
use: buildx | ||
goos: linux | ||
goarch: arm64 | ||
ids: | ||
- build-linux | ||
build_flag_templates: | ||
- "--label=org.opencontainers.image.title={{ .ProjectName }}" | ||
- "--label=org.opencontainers.image.description=A Fast Vulnerability Scanner for Containers" | ||
- "--label=org.opencontainers.image.vendor=Aqua Security" | ||
- "--label=org.opencontainers.image.version={{ .Version }}" | ||
- "--label=org.opencontainers.image.created={{ .Date }}" | ||
- "--label=org.opencontainers.image.source=https://github.com/aquasecurity/trivy" | ||
- "--label=org.opencontainers.image.revision={{ .FullCommit }}" | ||
- "--label=org.opencontainers.image.url=https://www.aquasec.com/products/trivy/" | ||
- "--label=org.opencontainers.image.documentation=https://aquasecurity.github.io/trivy/v{{ .Version }}/" | ||
- "--platform=linux/arm64" | ||
extra_files: | ||
- contrib/ | ||
|
||
docker_manifests: | ||
- name_template: 'datarobotdev/trivy:{{ .Version }}' | ||
image_templates: | ||
- 'datarobotdev/trivy:{{ .Version }}-amd64' | ||
- 'datarobotdev/trivy:{{ .Version }}-arm64' | ||
- name_template: 'datarobotdev/trivy:latest' | ||
image_templates: | ||
- 'datarobotdev/trivy:{{ .Version }}-amd64' | ||
- 'datarobotdev/trivy:{{ .Version }}-arm64' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters