File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -43,14 +43,9 @@ test-zts: ./docker-image/image.tags
4343 xargs -I % ./test-zts.sh % < ./docker-image/image.tags
4444
4545scan-vulnerability :
46- docker-compose -f test/security/docker-compose.yml -p clair-ci up -d
47- RETRIES=0 && while ! wget -T 10 -q -O /dev/null http://localhost:6060/v1/namespaces ; do sleep 1 ; echo -n " ." ; if [ $$ {RETRIES} -eq 60 ] ; then echo " Timeout, aborting." ; exit 1 ; fi ; RETRIES=$$ (( $$ {RETRIES}+ 1 )) ; done
48- cat ./docker-image/image.tags | xargs -I % sh -c ' clair-scanner --ip 172.17.0.1 -r "./docker-imageclair/%.json" -l ./clair/clair.log % || echo "% is vulnerable"'
49- docker-compose -f test/security/docker-compose.yml -p clair-ci down
46+ cat ./docker-image/image.tags | xargs -I % sh -c ' docker run -v /tmp/trivy:/var/lib/trivy -t aquasec/trivy:latest --cache-dir /var/lib/trivy image --exit-code 1 --no-progress --format table % || echo "% is vulnerable"'
5047
5148ci-scan-vulnerability :
52- docker-compose -f test/security/docker-compose.yml -p clair-ci up -d
53- RETRIES=0 && while ! wget -T 10 -q -O /dev/null http://localhost:6060/v1/namespaces ; do sleep 1 ; echo -n " ." ; if [ $$ {RETRIES} -eq 60 ] ; then echo " Timeout, aborting." ; exit 1 ; fi ; RETRIES=$$ (( $$ {RETRIES}+ 1 )) ; done
54- cat ./docker-image/image.tags | xargs -I % sh -c ' clair-scanner --ip 172.17.0.1 -r "./clair/%.json" -l ./clair/clair.log %' ; \
49+ cat ./docker-image/image.tags | xargs -I % sh -c ' docker run -v /tmp/trivy:/var/lib/trivy -t aquasec/trivy:latest --cache-dir /var/lib/trivy image --exit-code 1 --no-progress --format table %' ; \
5550 XARGS_EXIT=$$? ; \
56- if [ $$ {XARGS_EXIT} -eq 123 ] ; then find ./clair/wyrihaximusnet -type f | sed ' s/^/-Fjson=@/ ' | xargs -d ' \n ' curl -X POST ${WALLE_REPORT_URL} -F channel=team_oz -F buildUrl=https://circleci.com/gh/wyrihaximusnet/docker-php/ ${CIRCLE_BUILD_NUM} # artifacts/containers/0; else exit $${XARGS_EXIT}; fi
51+ exit $$ {XARGS_EXIT}
You can’t perform that action at this time.
0 commit comments