summaryrefslogtreecommitdiff
path: root/security-check.sh
blob: 34b03fcaba388de6fc1981f4861b9191defae713 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
set -x

top_dir=$(pwd)
if [ ! -z $1 ];then
    mkdir -p $1
    cd $1
fi

if [ ! -f ./bin/gosec ];then
    curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s 2.0.0
fi

out_file=result.json

./bin/gosec -fmt=json -out=${out_file} ${top_dir}/...

python ${top_dir}/analyze.py ${out_file}