Compare commits

...

3 Commits

Author SHA1 Message Date
Alexandre Sieira
e5ff5ec895 Fix CircleCI example in README.md (#451)
After trying to run trivy using CircleCI based on the sample configuration and failing, I want to suggest the following updates:

* `docker:18.09-git` no longer exists and causes workflow to fail, replaced with `stable-git` instead.
* added  `setup_remote_docker` or else the docker commands fail in the rest of the execution, as per https://circleci.com/docs/2.0/building-docker-images/#overview

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
2020-04-01 10:32:00 +03:00
Teppei Fukuda
1bc02f9f6a fix(db): retry downloading the database if it is broken (#452) 2020-03-31 17:56:34 +03:00
Teppei Fukuda
05fa7791dc chore(release): add all supported versions (#445) 2020-03-31 11:51:03 +03:00
5 changed files with 14 additions and 8 deletions

View File

@@ -1207,9 +1207,10 @@ $ cat .circleci/config.yml
jobs:
build:
docker:
- image: docker:18.09-git
- image: docker:stable-git
steps:
- checkout
- setup_remote_docker
- run:
name: Build image
command: docker build -t trivy-ci-test:${CIRCLE_SHA1} .

View File

@@ -1,7 +1,7 @@
FROM circleci/golang:1.13-buster
RUN sudo apt-get -y update \
&& sudo apt-get -y install rpm reprepro createrepo
&& sudo apt-get -y install rpm reprepro createrepo distro-info
ARG GORELEASER_VERSION=0.124.1
ARG GORELEASER_ARTIFACT=goreleaser_Linux_x86_64.tar.gz

View File

@@ -1,13 +1,18 @@
#!/bin/bash
RELEASES=(wheezy jessie stretch buster trusty xenial bionic)
DEBIAN_RELEASES=$(debian-distro-info --supported)
UBUNTU_RELEASES=$(ubuntu-distro-info --supported)
cd trivy-repo/deb
for release in ${RELEASES[@]}; do
echo "Adding deb package to $release"
for release in $(reprepro ls trivy | awk -F "|" '{print $3}' | sed 's/ //g'); do
echo "Removing deb package of $release"
reprepro -A i386 remove $release trivy
reprepro -A amd64 remove $release trivy
done
for release in ${DEBIAN_RELEASES[@]} ${UBUNTU_RELEASES[@]}; do
echo "Adding deb package to $release"
reprepro includedeb $release ../../dist/*Linux-64bit.deb
reprepro includedeb $release ../../dist/*Linux-32bit.deb
done

2
go.mod
View File

@@ -5,7 +5,7 @@ go 1.13
require (
github.com/aquasecurity/fanal v0.0.0-20200317181056-f28b6d21845c
github.com/aquasecurity/go-dep-parser v0.0.0-20190819075924-ea223f0ef24b
github.com/aquasecurity/trivy-db v0.0.0-20200318223623-7d3e67b057d4
github.com/aquasecurity/trivy-db v0.0.0-20200331122722-2adcf16a2a26
github.com/caarlos0/env/v6 v6.0.0
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/cheggaaa/pb/v3 v3.0.3

4
go.sum
View File

@@ -34,8 +34,8 @@ github.com/aquasecurity/fanal v0.0.0-20200317181056-f28b6d21845c/go.mod h1:yPZqe
github.com/aquasecurity/go-dep-parser v0.0.0-20190819075924-ea223f0ef24b h1:55Ulc/gvfWm4ylhVaR7MxOwujRjA6et7KhmUbSgUFf4=
github.com/aquasecurity/go-dep-parser v0.0.0-20190819075924-ea223f0ef24b/go.mod h1:BpNTD9vHfrejKsED9rx04ldM1WIbeyXGYxUrqTVwxVQ=
github.com/aquasecurity/trivy v0.1.6/go.mod h1:5hobyhxLzDtxruHzPxpND2PUKOssvGUdE9BocpJUwo4=
github.com/aquasecurity/trivy-db v0.0.0-20200318223623-7d3e67b057d4 h1:DeVT3LzIgKc+5sGhSGusWL+JZ/kiWGjKjQYeshz/gOk=
github.com/aquasecurity/trivy-db v0.0.0-20200318223623-7d3e67b057d4/go.mod h1:Uf9bXd50zTHtWTP7+7u5+OFCPtUVrmsS4v0RXd7E5lw=
github.com/aquasecurity/trivy-db v0.0.0-20200331122722-2adcf16a2a26 h1:KGAZ0FoLGQNYdtSzy4tVPr+/4AxpBQHYdBf+C9joopE=
github.com/aquasecurity/trivy-db v0.0.0-20200331122722-2adcf16a2a26/go.mod h1:Uf9bXd50zTHtWTP7+7u5+OFCPtUVrmsS4v0RXd7E5lw=
github.com/aquasecurity/vuln-list-update v0.0.0-20191016075347-3d158c2bf9a2 h1:xbdUfr2KE4THsFx9CFWtWpU91lF+YhgP46moV94nYTA=
github.com/aquasecurity/vuln-list-update v0.0.0-20191016075347-3d158c2bf9a2/go.mod h1:6NhOP0CjZJL27bZZcaHECtzWdwDDm2g6yCY0QgXEGQQ=
github.com/araddon/dateparse v0.0.0-20190426192744-0d74ffceef83/go.mod h1:SLqhdZcd+dF3TEVL2RMoob5bBP5R1P1qkox+HtCBgGI=