Sanitize log entries

While most of these log entries come from either github or our own
database, it's still a good idea to sanitize them.
This commit is contained in:
Gabriel Adrian Samfira 2023-01-23 17:56:19 +02:00
parent 114f17718b
commit e93b6d73e5
No known key found for this signature in database
GPG key ID: 7D073DCC2C074CB5
5 changed files with 17 additions and 10 deletions

View file

@ -11,6 +11,7 @@ import (
"time"
apiParams "garm/apiserver/params"
"garm/util"
"github.com/gorilla/websocket"
"github.com/spf13/cobra"
@ -61,7 +62,7 @@ var logCmd = &cobra.Command{
log.Printf("read: %q", err)
return
}
log.Print(string(message))
log.Print(util.SanitizeLogEntry(string(message)))
}
}()