-
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
Add implementations for new API: config profile with repository context #1054
base: dev
Are you sure you want to change the base?
Add implementations for new API: config profile with repository context #1054
Conversation
eranturgeman
commented
Dec 10, 2024
- All tests passed. If this feature is not already covered by the tests, I added new tests.
- All static analysis checks passed.
- This pull request is on the dev branch.
- I used gofmt for formatting the code before submitting the pull request.
…e GetConfigProfile -> GetConfigProfileByName
…profile_repos (will not include repository info)
…dd-config-profile-with-repo-api
tests/xsc_test.go
Outdated
if err != nil { | ||
t.Skip(err) | ||
} | ||
err = clientUtils.ValidateMinimumVersion(clientUtils.Xsc, currentXrayVersion, minXscVersion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the last variable here should be minXrayVersion?
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 |