2 Commits

Author SHA1 Message Date
689402c8e9 add scan in ci
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2025-03-27 16:24:23 +01:00
4f9a333219 new alpine base
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2025-03-27 16:13:30 +01:00
2 changed files with 36 additions and 1 deletions

View File

@ -28,3 +28,38 @@ steps:
dockerfile: Dockerfile
when:
- event: [tag]
scan:
image: quay.io/wollud1969/woodpecker-helper:0.5.1
environment:
TRIVY_TOKEN:
from_secret: trivy_token
TRIVY_URL:
from_secret: trivy_url
DTRACK_API_KEY:
from_secret: dtrack_api_key
DTRACK_API_URL:
from_secret: dtrack_api_url
commands:
- HOME=/home/`id -nu`
- IMAGE=quay.io/wollud1969/exim-docker:$CI_COMMIT_TAG
- |
trivy image \
--server $TRIVY_URL \
--token $TRIVY_TOKEN \
--format cyclonedx \
--scanners license \
--output /tmp/sbom.xml \
$IMAGE
- cat /tmp/sbom.xml
- |
curl -X "POST" \
-H "Content-Type: multipart/form-data" \
-H "X-Api-Key: $DTRACK_API_KEY" \
-F "autoCreate=true" \
-F "projectName=$CI_REPO" \
-F "projectVersion=$CI_COMMIT_TAG" \
-F "bom=@/tmp/sbom.xml"\
"$DTRACK_API_URL/api/v1/bom"
when:
- event: [tag]

View File

@ -1,4 +1,4 @@
FROM alpine:3.21.0
FROM alpine:3.21.3
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
LABEL ImageName=""