Embed in Dockerfile Alternatively you can use Trivy in a multistage build. Thus avoiding the insecure . Also the image is not changed. [...]FROM build AS vulnscanRUN trivy filesystem --exit-code 1 --no-progress /