Added container vulnerability scan
This commit is contained in:
14
.drone.yml
14
.drone.yml
@@ -56,12 +56,13 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- git clone https://gitea.khongisa.co.za/MngomaLab/webapitest.git .
|
- git clone https://gitea.khongisa.co.za/MngomaLab/webapitest.git .
|
||||||
- git checkout ${DRONE_COMMIT}
|
- git checkout ${DRONE_COMMIT}
|
||||||
|
|
||||||
- name: dotnet publish
|
- name: dotnet publish
|
||||||
image: mcr.microsoft.com/dotnet/sdk:8.0
|
image: mcr.microsoft.com/dotnet/sdk:8.0
|
||||||
commands:
|
commands:
|
||||||
- dotnet publish --configuration Release
|
- dotnet publish --configuration Release
|
||||||
|
|
||||||
|
|
||||||
- name: build and push
|
- name: build and push
|
||||||
image: gcr.io/kaniko-project/executor:debug
|
image: gcr.io/kaniko-project/executor:debug
|
||||||
environment:
|
environment:
|
||||||
@@ -76,6 +77,15 @@ steps:
|
|||||||
--destination=index.docker.io/khwezi/webapitest:latest
|
--destination=index.docker.io/khwezi/webapitest:latest
|
||||||
--destination=index.docker.io/khwezi/webapitest:${DRONE_BUILD_NUMBER}
|
--destination=index.docker.io/khwezi/webapitest:${DRONE_BUILD_NUMBER}
|
||||||
|
|
||||||
|
- name: volnerability-scan
|
||||||
|
image: aquasec/trivy
|
||||||
|
commands:
|
||||||
|
- trivy image --exit-code 1 --severity CRITICAL khwezi/webapitest:${DRONE_BUILD_NUMBER}
|
||||||
|
|
||||||
|
- name: container-scan
|
||||||
|
image: aquasec/trivy
|
||||||
|
commands:
|
||||||
|
- trivy image --exit-code 1 --severity CRITICAL khwezi/webapitest:${DRONE_BUILD_NUMBER}
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
|
|||||||
Reference in New Issue
Block a user