Add nancy vulnerability scanner (#10289)

This commit is contained in:
Harshavardhana
2020-08-19 14:25:21 -07:00
committed by GitHub
parent 3acb5cff45
commit c8b84a0e9e
7 changed files with 92 additions and 53 deletions

View File

@@ -4,7 +4,6 @@ on:
pull_request:
branches:
- master
- release
jobs:
build:
@@ -12,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.14.x]
go-version: [1.14.x, 1.15.x]
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
@@ -39,6 +38,9 @@ jobs:
MINIO_CI_CD: 1
run: |
sudo apt-get install devscripts shellcheck
nancy_version=$(curl --retry 10 -Ls -o /dev/null -w "%{url_effective}" https://github.com/sonatype-nexus-community/nancy/releases/latest | sed "s/https:\/\/github.com\/sonatype-nexus-community\/nancy\/releases\/tag\///")
curl -L -o nancy https://github.com/sonatype-nexus-community/nancy/releases/download/${nancy_version}/nancy-linux.amd64-${nancy_version} && chmod +x nancy
go list -m all | ./nancy
make
diff -au <(gofmt -s -d cmd) <(printf "")
diff -au <(gofmt -s -d pkg) <(printf "")