vulncheck-example/novulndep/module.go

17 lines
450 B
Go

// Novulndep is a package that imports golang.org/x/crypto package
// without https://pkg.go.dev/vuln/GO-2023-2402 vulnarability
package novulndep
import (
"net"
"golang.org/x/crypto/ssh"
)
// FunctionWithVulnarability is a nop function that transitively adds
// vulnarable code to a call trace of your application
func FunctionNoVulnarability() error {
var c net.Conn
_, _, _, err := ssh.NewServerConn(c, new(ssh.ServerConfig))
return err
}