vulncheck-example/novulndep/module.go

18 lines
450 B
Go
Raw Normal View History

2024-02-19 09:56:56 +00:00
// 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
}