aboutsummaryrefslogtreecommitdiffstats
path: root/GNUmakefile
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-01-18 19:10:55 +0800
committerGitHub <noreply@github.com>2019-01-18 19:10:55 +0800
commit632fa7914a2e6dbf1812581e0e769c93189771ca (patch)
treee8b415b01de87a6457a65ba191dc90f3ab8565e0 /GNUmakefile
parent9ff8f0cdc45a7b294ae71a28e7e205bb67e559cb (diff)
downloaddexon-consensus-632fa7914a2e6dbf1812581e0e769c93189771ca.tar
dexon-consensus-632fa7914a2e6dbf1812581e0e769c93189771ca.tar.gz
dexon-consensus-632fa7914a2e6dbf1812581e0e769c93189771ca.tar.bz2
dexon-consensus-632fa7914a2e6dbf1812581e0e769c93189771ca.tar.lz
dexon-consensus-632fa7914a2e6dbf1812581e0e769c93189771ca.tar.xz
dexon-consensus-632fa7914a2e6dbf1812581e0e769c93189771ca.tar.zst
dexon-consensus-632fa7914a2e6dbf1812581e0e769c93189771ca.zip
misc: Add gosec to check security issues (#424)
* Add gosec to tools * Run security check to ci * Fix secrity issues
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 0608cbe..64926a1 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -77,7 +77,7 @@ $(foreach component, $(COMPONENTS), $(eval $(call BUILD_RULE,$(component))))
pre-build: dep docker-dep
-pre-submit: dep check-format lint test vet
+pre-submit: dep check-format lint vet check-security test
dep:
@bin/install_eth_dep.sh
@@ -98,6 +98,15 @@ lint:
vet:
@go vet `go list ./... | grep -v 'vendor'`
+check-security:
+ @rm -f gosec.log
+ @gosec -quiet -out gosec.log ./... || true
+ @if [ -a gosec.log ]; then \
+ cat gosec.log; \
+ echo 'Error: security issue found'; \
+ exit 1; \
+ fi
+
test-short:
@for pkg in `$(TEST_TARGET)`; do \