-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transition Xsc to Xray #1046
base: dev
Are you sure you want to change the base?
Transition Xsc to Xray #1046
Conversation
at 🎯 Static Application Security Testing (SAST) VulnerabilityFull descriptionOverviewSSH Keys Past Expiration is a vulnerability that occurs when SSH keys Vulnerable examplepackage main
import (
"golang.org/x/crypto/ssh"
"net"
)
func main() {}
func insecureIgnoreHostKey() {
_ = &ssh.ClientConfig{
User: "username",
Auth: []ssh.AuthMethod{nil},
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
}
} In this example, the Remediationpackage main
import (
"golang.org/x/crypto/ssh"
"net"
)
func main() {}
func secureHostKeyCallback() {
publicKeyBytes, _ := ioutil.ReadFile("allowed_hostkey.pub")
publicKey, _ := ssh.ParsePublicKey(publicKeyBytes)
_ = &ssh.ClientConfig{
User: "username",
Auth: []ssh.AuthMethod{nil},
HostKeyCallback: ssh.FixedHostKey(publicKey),
}
} By using allowed host keys and proper host key verification, we can |
XSC
is not avaliable