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
Copy file name to clipboardExpand all lines: magefile.go
-141Lines changed: 0 additions & 141 deletions
Original file line number
Diff line number
Diff line change
@@ -309,12 +309,6 @@ var (
309
309
ifisSnapshot() {
310
310
tags=append(tags, "snapshot")
311
311
}
312
-
<<<<<<<HEAD
313
-
=======
314
-
ifisFIPS() {
315
-
tags=append(tags, "requirefips")
316
-
}
317
-
>>>>>>>15b8c8a (BumpGoversionto1.25.1 (#5562))
318
312
returnstrings.Join(tags, ",")
319
313
})
320
314
@@ -459,50 +453,11 @@ func (Check) Notice() {
459
453
mg.SerialDeps(mg.F(genNotice))
460
454
}
461
455
462
-
<<<<<<<HEAD
463
456
// genNotice generates the NOTICE.txt
464
457
funcgenNotice() error {
465
458
tags:= []string{}
466
459
outFile:="NOTICE.txt"
467
460
log.Println("Generating NOTICE.txt.")
468
-
=======
469
-
// DetectFIPSCryptoImports will do a best effort attempt to ensure that the imports list for FIPS compatible artifacts does not contain any external crypto libraries.
470
-
// Specifically it will fail if the modules list contains an entry with: "crypto", "gokrb5", or "pbkdf2"
471
-
func (Check) DetectFIPSCryptoImports() error {
472
-
tags:= []string{"requirefips"}
473
-
mods, err:=getModules(tags...)
474
-
iferr!=nil {
475
-
returnerr
476
-
}
477
-
478
-
args:=append([]string{"list", "-m"}, mods...)
479
-
output, err:=sh.Output("go", args...)
480
-
iferr!=nil {
481
-
returnerr
482
-
}
483
-
for _, line:=rangestrings.Split(output, "\n") {
484
-
// keywords are crypto for x/crypto imports, gokrb5 for kerberos, and pbkdf2 for pbkdf2 generation
485
-
for _, keyword:=range []string{"crypto", "gokrb5", "pbkdf2"} {
486
-
ifstrings.Contains(line, keyword) {
487
-
err=errors.Join(err, fmt.Errorf("Detected import %s may implement crypto functionality", line))
488
-
}
489
-
}
490
-
}
491
-
returnerr
492
-
}
493
-
494
-
// genNotice generates the NOTICE.txt or the NOTICE-fips.txt file.
495
-
funcgenNotice(fipsbool) error {
496
-
tags:= []string{}
497
-
outFile:="NOTICE.txt"
498
-
iffips {
499
-
log.Println("Generating NOTICE-fips.txt.")
500
-
tags=append(tags, "requirefips")
501
-
outFile="NOTICE-fips.txt"
502
-
} else {
503
-
log.Println("Generating NOTICE.txt.")
504
-
}
505
-
>>>>>>>15b8c8a (BumpGoversionto1.25.1 (#5562))
506
461
507
462
// Clean up modfile and download all needed files before building NOTICE
0 commit comments