github.com/devseccon/trivy@v0.47.1-0.20231123133102-bd902a0bd996/docs/tutorials/integrations/circleci.md (about) 1 # CircleCI 2 3 ``` 4 $ cat .circleci/config.yml 5 jobs: 6 build: 7 docker: 8 - image: docker:stable-git 9 steps: 10 - checkout 11 - setup_remote_docker 12 - run: 13 name: Build image 14 command: docker build -t trivy-ci-test:${CIRCLE_SHA1} . 15 - run: 16 name: Install trivy 17 command: | 18 apk add --update-cache --upgrade curl 19 curl -sfL https://raw.githubusercontent.com/devseccon/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin 20 - run: 21 name: Scan the local image with trivy 22 command: trivy image --exit-code 0 --no-progress trivy-ci-test:${CIRCLE_SHA1} 23 workflows: 24 version: 2 25 release: 26 jobs: 27 - build 28 ``` 29 30 [Example][example] 31 [Repository][repository] 32 33 [example]: https://circleci.com/gh/devseccon/trivy-ci-test 34 [repository]: https://github.com/devseccon/trivy-ci-test