mirror of
https://github.com/securego/gosec.git
synced 2024-11-05 11:35:51 +00:00
2aad3f02a5
Signed-off-by: Cosmin Cojocar <gcojocar@adobe.com>
22 lines
337 B
Go
22 lines
337 B
Go
package testutils
|
|
|
|
import "github.com/securego/gosec/v2"
|
|
|
|
// SampleCodeG505 - Blocklisted import SHA1
|
|
var SampleCodeG505 = []CodeSample{
|
|
{[]string{`
|
|
package main
|
|
|
|
import (
|
|
"crypto/sha1"
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
for _, arg := range os.Args {
|
|
fmt.Printf("%x - %s\n", sha1.Sum([]byte(arg)), arg)
|
|
}
|
|
}
|
|
`}, 1, gosec.NewConfig()},
|
|
}
|