You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add mage target and buildkite step to flag crypto imports for FIPS builds (#5534) (#5558)
* Add mage target and buildkite step to flag crypto imports for FIPS builds
* Rename file
(cherry picked from commit f44372c)
Co-authored-by: Michel Laterman <[email protected]>
// DetectFIPSCryptoImports will do a best effort attempt to ensure that the imports list for FIPS compatible artifacts does not contain any external crypto libraries.
487
+
// Specifically it will fail if the modules list contains an entry with: "crypto", "gokrb5", or "pbkdf2"
488
+
func (Check) DetectFIPSCryptoImports() error {
489
+
tags:= []string{"requirefips", "ms_tls13kdf"}
490
+
mods, err:=getModules(tags...)
491
+
iferr!=nil {
492
+
returnerr
493
+
}
494
+
495
+
args:=append([]string{"list", "-m"}, mods...)
496
+
output, err:=sh.Output("go", args...)
497
+
iferr!=nil {
498
+
returnerr
499
+
}
500
+
for_, line:=rangestrings.Split(output, "\n") {
501
+
// keywords are crypto for x/crypto imports, gokrb5 for kerberos, and pbkdf2 for pbkdf2 generation
0 commit comments