mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-08-23 22:26:27 +00:00
The bump to v0.311.3 from commit98e831b4("Fix Grype CVEs: update logrus and prometheus/prometheus") was unintentionally reverted to v0.35.0 by the go.mod conflict resolution in commitf844870a("Run go mod tidy and adapt to prometheus/common v0.67 API"). Re-apply it to fix CVE-2026-42154 (High), CVE-2026-40179 and CVE-2026-44903 (Medium). prometheus/prometheus v0.311.3 requires k8s.io/client-go v0.35.x, which would drag the k8s.io modules past the v0.34 line this branch must stay on. Pin k8s.io/api, k8s.io/apimachinery and k8s.io/client-go back to v0.34.1 with replace directives in both the root and test modules, so the built binaries keep using v0.34.1 (the replacement is also what gets recorded in the binary build info). The only prometheus/prometheus package linked into the NPD binaries is model/value, so none of the k8s-facing prometheus code is compiled.
156 lines
3.6 KiB
YAML
156 lines
3.6 KiB
YAML
version: "2"
|
|
run:
|
|
tests: true
|
|
# build-tags:
|
|
# - journald
|
|
linters:
|
|
default: none
|
|
enable:
|
|
- arangolint
|
|
- asasalint
|
|
- asciicheck
|
|
- bidichk
|
|
- bodyclose
|
|
- canonicalheader
|
|
- containedctx
|
|
- contextcheck
|
|
# - copyloopvar 1
|
|
# - cyclop 15
|
|
- decorder
|
|
# - depguard 265
|
|
- dogsled
|
|
# - dupl 2
|
|
- dupword
|
|
- durationcheck
|
|
# - embeddedstructfieldcheck 5
|
|
# - err113 64
|
|
- errcheck
|
|
- errchkjson
|
|
- errname
|
|
# - errorlint 4
|
|
# - exhaustive 2
|
|
# - exhaustruct 260
|
|
- exptostd
|
|
- fatcontext
|
|
# - forbidigo 6
|
|
# - forcetypeassert: 5
|
|
# - funcorder: 5
|
|
# - funlen: 24
|
|
- ginkgolinter
|
|
- gocheckcompilerdirectives
|
|
# - gochecknoglobals 31
|
|
# - gochecknoinits 14
|
|
- gochecksumtype
|
|
# - gocognit 5
|
|
- goconst
|
|
# - gocritic 3
|
|
# - gocyclo 1
|
|
# - godot 24
|
|
# - godox 8
|
|
- goheader
|
|
- gomoddirectives
|
|
- gomodguard
|
|
- goprintffuncname
|
|
# - gosec 55
|
|
# - gosmopolitan 5
|
|
- govet
|
|
- grouper
|
|
- iface
|
|
- importas
|
|
# - inamedparam 6
|
|
- ineffassign
|
|
- interfacebloat
|
|
# - intrange 1
|
|
# - ireturn 15
|
|
# - lll 59
|
|
- loggercheck
|
|
- maintidx
|
|
- makezero
|
|
- mirror
|
|
- misspell
|
|
# - mnd 29
|
|
- musttag
|
|
- nakedret
|
|
# - nestif 7
|
|
# - nilerr 2
|
|
# - nilnesserr 2
|
|
# - nilnil 3
|
|
# - nlreturn 149
|
|
- noctx
|
|
# - noinlineerr 81
|
|
- nolintlint
|
|
# - nonamedreturns 2
|
|
- nosprintfhostport
|
|
# - paralleltest 54
|
|
# - perfsprint 14
|
|
# - prealloc 5
|
|
# - predeclared 1
|
|
- promlinter
|
|
# - protogetter 7
|
|
- reassign
|
|
# - recvcheck 3
|
|
# - revive 133
|
|
- rowserrcheck
|
|
- sloglint
|
|
- spancheck
|
|
- sqlclosecheck
|
|
- staticcheck
|
|
- tagalign
|
|
# - tagliatelle 6
|
|
- testableexamples
|
|
# - testifylint 10
|
|
# - testpackage 34
|
|
# - thelper 4
|
|
- tparallel
|
|
- unconvert
|
|
# - unparam 1
|
|
- unused
|
|
- usestdlibvars
|
|
# - usetesting 3
|
|
# - varnamelen 33
|
|
- wastedassign
|
|
- whitespace
|
|
# - wrapcheck 26
|
|
# - wsl 403
|
|
# - wsl_v5 58
|
|
- zerologlint
|
|
settings:
|
|
gomoddirectives:
|
|
replace-allow-list:
|
|
# Keep the k8s.io modules on the v0.34 line, see go.mod.
|
|
- k8s.io/api
|
|
- k8s.io/apimachinery
|
|
- k8s.io/client-go
|
|
exclusions:
|
|
generated: lax
|
|
paths:
|
|
- vendor
|
|
- third_party
|
|
- third_party$
|
|
- builtin$
|
|
- examples$
|
|
issues:
|
|
max-issues-per-linter: 0
|
|
max-same-issues: 0
|
|
formatters:
|
|
enable:
|
|
- gci
|
|
- gofmt
|
|
- gofumpt
|
|
- goimports
|
|
settings:
|
|
gci:
|
|
sections:
|
|
- standard
|
|
- default
|
|
- localmodule
|
|
goimports:
|
|
local-prefixes:
|
|
- k8s.io/node-problem-detector
|
|
exclusions:
|
|
generated: lax
|
|
paths:
|
|
- third_party$
|
|
- builtin$
|
|
- examples$
|