vulncheck-example/usedvulndep/module.go

18 lines
509 B
Go

// Usedvulndep is a package that imports golang.org/x/crypto package
// with vulnarability https://pkg.go.dev/vuln/GO-2023-2402 and provides
// function that affected by vulnarability
package usedvulndep
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 FunctionWithVulnarability() error {
var c net.Conn
_, _, _, err := ssh.NewServerConn(c, new(ssh.ServerConfig))
return err
}