fix(depguard): mitigate improper usage of openpgp BE-11977 (#1122)

pull/12512/merge
andres-portainer 2025-09-01 14:44:45 -03:00 committed by GitHub
parent 36154e9d33
commit def19be230
1 changed files with 4 additions and 0 deletions

View File

@ -40,12 +40,16 @@ linters:
desc: use github.com/portainer/portainer/pkg/libhttp
- pkg: golang.org/x/crypto
desc: golang.org/x/crypto is not allowed because of FIPS mode
- pkg: github.com/ProtonMail/go-crypto/openpgp
desc: github.com/ProtonMail/go-crypto/openpgp is not allowed because of FIPS mode
forbidigo:
forbid:
- pattern: ^tls\.Config$
msg: Use crypto.CreateTLSConfiguration() instead
- pattern: ^tls\.Config\.(InsecureSkipVerify|MinVersion|MaxVersion|CipherSuites|CurvePreferences)$
msg: Do not set this field directly, use crypto.CreateTLSConfiguration() instead
- pattern: ^object\.(Commit|Tag)\.Verify$
msg: "Not allowed because of FIPS mode"
analyze-types: true
exclusions:
generated: lax