diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-01-18 19:10:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-18 19:10:55 +0800 |
commit | 632fa7914a2e6dbf1812581e0e769c93189771ca (patch) | |
tree | e8b415b01de87a6457a65ba191dc90f3ab8565e0 /cmd | |
parent | 9ff8f0cdc45a7b294ae71a28e7e205bb67e559cb (diff) | |
download | tangerine-consensus-632fa7914a2e6dbf1812581e0e769c93189771ca.tar tangerine-consensus-632fa7914a2e6dbf1812581e0e769c93189771ca.tar.gz tangerine-consensus-632fa7914a2e6dbf1812581e0e769c93189771ca.tar.bz2 tangerine-consensus-632fa7914a2e6dbf1812581e0e769c93189771ca.tar.lz tangerine-consensus-632fa7914a2e6dbf1812581e0e769c93189771ca.tar.xz tangerine-consensus-632fa7914a2e6dbf1812581e0e769c93189771ca.tar.zst tangerine-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 'cmd')
-rw-r--r-- | cmd/dexcon-simulation-with-scheduler/main.go | 5 | ||||
-rw-r--r-- | cmd/dexcon-simulation/main.go | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/cmd/dexcon-simulation-with-scheduler/main.go b/cmd/dexcon-simulation-with-scheduler/main.go index 8d59825..d06e6e0 100644 --- a/cmd/dexcon-simulation-with-scheduler/main.go +++ b/cmd/dexcon-simulation-with-scheduler/main.go @@ -105,7 +105,9 @@ func main() { test.NewStopByConfirmedBlocks(blockPerNode, apps, dbs)) now := time.Now().UTC() for _, v := range nodes { - v.Bootstrap(sch, now) + if err := v.Bootstrap(sch, now); err != nil { + panic(err) + } } // Run the simulation. sch.Run(cfg.Scheduler.WorkerNum) @@ -126,6 +128,7 @@ func main() { if err := pprof.WriteHeapProfile(f); err != nil { log.Fatal("could not write memory profile: ", err) } + // #nosec G104 f.Close() } diff --git a/cmd/dexcon-simulation/main.go b/cmd/dexcon-simulation/main.go index a9a8b10..d79f60e 100644 --- a/cmd/dexcon-simulation/main.go +++ b/cmd/dexcon-simulation/main.go @@ -84,6 +84,7 @@ func main() { if err := pprof.WriteHeapProfile(f); err != nil { log.Fatal("could not write memory profile: ", err) } + // #nosec G104 f.Close() } } |