File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ check-gosec:
6161 || go install github.com/securego/gosec/v2/cmd/gosec@latest
6262
6363vulncheck : check-govulncheck # Check for known vulnerabilities
64- govulncheck $(CHECK_FILES )
64+ govulncheck -format json $(CHECK_FILES ) | go run ./hack/vulncheck-filter
6565
6666check-govulncheck :
6767 @command -v govulncheck > /dev/null 2>&1 \
Original file line number Diff line number Diff line change 1+ package main
2+
3+ import (
4+ "encoding/json"
5+ "fmt"
6+ "io"
7+ "os"
8+ )
9+
10+ // Vulnerabilities with no upstream fix — remove entries once fixed.
11+ var ignore = map [string ]string {
12+ "GO-2026-4518" : "pgproto3/v2 DoS, no fix available (EOL). Transitive via pgconn v1 + pop/v6." ,
13+ }
14+
15+ type message struct {
16+ Finding * struct {
17+ OSV * struct {
18+ ID string `json:"id"`
19+ } `json:"osv"`
20+ } `json:"finding"`
21+ }
22+
23+ func main () {
24+ dec := json .NewDecoder (os .Stdin )
25+
26+ var unignored []string
27+ seen := make (map [string ]bool )
28+ for {
29+ var m message
30+ if err := dec .Decode (& m ); err != nil {
31+ if err == io .EOF {
32+ break
33+ }
34+ // govulncheck JSON stream may contain objects we don't care about; skip decode errors
35+ continue
36+ }
37+ if m .Finding == nil {
38+ continue
39+ }
40+ if m .Finding .OSV == nil {
41+ continue
42+ }
43+ id := m .Finding .OSV .ID
44+ if seen [id ] {
45+ continue
46+ }
47+ seen [id ] = true
48+
49+ if reason , ok := ignore [id ]; ok {
50+ fmt .Fprintf (os .Stderr , "ignoring %s: %s\n " , id , reason )
51+ } else {
52+ fmt .Fprintf (os .Stderr , "ERROR: %s (not in ignore list)\n " , id )
53+ unignored = append (unignored , id )
54+ }
55+ }
56+
57+ if len (unignored ) > 0 {
58+ fmt .Fprintf (os .Stderr , "\n %d unignored vulnerability(ies) found\n " , len (unignored ))
59+ os .Exit (1 )
60+ }
61+ }
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ type AnonymousProviderConfiguration struct {
8787
8888// CustomOAuthConfiguration holds configuration for custom OAuth and OIDC providers
8989type CustomOAuthConfiguration struct {
90- Enabled bool `json:"enabled" split_words:"true" default:"false "`
90+ Enabled bool `json:"enabled" split_words:"true" default:"true "`
9191 MaxProviders int `json:"max_providers" split_words:"true" default:"0"`
9292}
9393
You can’t perform that action at this time.
0 commit comments