2024-02-19 08:27:31 +00:00
|
|
|
// Unusedvulndep is a package that imports golang.org/x/crypto package
|
|
|
|
// with vulnarability https://pkg.go.dev/vuln/GO-2023-2402 and provides
|
|
|
|
// function that is not affected by vulnarability
|
2024-02-19 08:46:22 +00:00
|
|
|
package unusedvulndep
|
2024-02-19 08:27:31 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"golang.org/x/crypto/ssh"
|
|
|
|
)
|
|
|
|
|
|
|
|
// FunctionWithVulnarability is a nop function that transitively adds
|
|
|
|
// vulnarable dependency but unvunarable code to a call trace of
|
|
|
|
// your application
|
|
|
|
func FunctionWithoutVulnarability() error {
|
|
|
|
var s ssh.Signer
|
|
|
|
_, err := ssh.NewCertSigner(new(ssh.Certificate), s)
|
|
|
|
return err
|
|
|
|
}
|