CI: Implement gosec

This commit is contained in:
kayos@tcp.direct 2022-04-20 19:29:19 -07:00
parent fe898b0be7
commit d02d165af7
Signed by: kayos
GPG Key ID: 4B841471B4BEE979
4 changed files with 9 additions and 11 deletions

View File

@ -1,4 +1,4 @@
name: Go
name: Vibe Check
on:
push:
@ -7,19 +7,18 @@ on:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Build
run: go build -v ./...
- name: Vet
- name: go vet -v ./...
run: go vet -v ./...
- name: gosec ./...
uses: securego/gosec@master
args: ./...
- name: go build -v ./...
run: go build -v ./...

View File

@ -34,7 +34,7 @@ func main() {
signal.Notify(stopChan, syscall.SIGINT, syscall.SIGTERM)
go func() {
log.Error().Err(http.Serve()).Msg("HTTP err")
log.Error().Err(http.Serve()).Msg("HTTP error")
}()
<-stopChan // wait for SIGINT

View File

@ -32,7 +32,7 @@ func StartLogger() zerolog.Logger {
if snek.GetBool("logger.use_date_filename") {
tn := strings.ReplaceAll(time.Now().Format(time.RFC822), " ", "_")
tn = strings.ReplaceAll(logFileName, ":", "-")
tn = strings.ReplaceAll(tn, ":", "-")
logFileName = logFileName + "_" + tn
}

View File

@ -21,7 +21,6 @@ func bannerFail(errs ...error) {
func Banner() {
if runtime.GOOS == "windows" || config.NoColor {
println(config.Title + " " + config.Version)
println(" ")
return
}
PrintBanner()