Skip to content

Instantly share code, notes, and snippets.

@ammario
Created August 23, 2023 14:13
Show Gist options
  • Save ammario/1f2209cfe02baef71bacbfd9d59319a2 to your computer and use it in GitHub Desktop.
Save ammario/1f2209cfe02baef71bacbfd9d59319a2 to your computer and use it in GitHub Desktop.
sarif example
{
"version": "2.1.0",
"$schema": "https://json.schemastore.org/sarif-2.1.0-rtm.5.json",
"runs": [
{
"tool": {
"driver": {
"informationUri": "https://jfrog.com/xray/",
"name": "JFrog Xray",
"rules": [
{
"id": "XRAY-521544",
"shortDescription": null,
"help": {
"markdown": "The go command may generate unexpected code at build time when using cgo. This may result in unexpected behavior when running a go program which uses cgo. This may occur when running an untrusted module which contains directories with newline characters in their names. Modules which are retrieved using the go command, i.e. via \"go get\", are not affected (modules retrieved using GOPATH-mode, i.e. GO111MODULE=off, may be affected)."
},
"properties": {
"security-severity": "9.8"
}
},
{
"id": "XRAY-521542",
"shortDescription": null,
"help": {
"markdown": "The go command may execute arbitrary code at build time when using cgo. This may occur when running \"go get\" on a malicious module, or when running any other command which builds untrusted code. This is can by triggered by linker flags, specified via a \"#cgo LDFLAGS\" directive. The arguments for a number of flags which are non-optional are incorrectly considered optional, allowing disallowed flags to be smuggled through the LDFLAGS sanitization. This affects usage of both the gc and gccgo compilers."
},
"properties": {
"security-severity": "9.8"
}
},
{
"id": "XRAY-521541",
"shortDescription": null,
"help": {
"markdown": "The go command may execute arbitrary code at build time when using cgo. This may occur when running \"go get\" on a malicious module, or when running any other command which builds untrusted code. This is can by triggered by linker flags, specified via a \"#cgo LDFLAGS\" directive. Flags containing embedded spaces are mishandled, allowing disallowed flags to be smuggled through the LDFLAGS sanitization by including them in the argument of another flag. This only affects usage of the gccgo compiler."
},
"properties": {
"security-severity": "9.8"
}
},
{
"id": "XRAY-122380",
"shortDescription": null,
"help": {
"markdown": "This affects all versions of package github.com/u-root/u-root/pkg/cpio. It is vulnerable to leading, non-leading relative path traversal attacks and symlink based (relative and absolute) path traversal attacks in cpio file extraction."
},
"properties": {
"security-severity": "7.5"
}
},
{
"id": "XRAY-521543",
"shortDescription": null,
"help": {
"markdown": "On Unix platforms, the Go runtime does not behave differently when a binary is run with the setuid/setgid bits. This can be dangerous in certain cases, such as when dumping memory state, or assuming the status of standard i/o file descriptors. If a setuid/setgid binary is executed with standard I/O file descriptors closed, opening any files can result in unexpected content being read or written with elevated privileges. Similarly, if a setuid/setgid program is terminated, either via panic or signal, it may leak the contents of its registers."
},
"properties": {
"security-severity": "7.8"
}
},
{
"id": "XRAY-523140",
"shortDescription": null,
"help": {
"markdown": "The HTTP/1 client does not fully validate the contents of the Host header. A maliciously crafted Host header can inject additional headers or entire requests. With fix, the HTTP/1 client now refuses to send requests containing an invalid Request.Host or Request.URL.Host value."
},
"properties": {
"security-severity": "6.5"
}
},
{
"id": "XRAY-527218",
"shortDescription": null,
"help": {
"markdown": "Extremely large RSA keys in certificate chains can cause a client/server to expend significant CPU time verifying signatures. With fix, the size of RSA keys transmitted during handshakes is restricted to \u003c= 8192 bits. Based on a survey of publicly trusted RSA keys, there are currently only three certificates in circulation with keys larger than this, and all three appear to be test certificates that are not actively deployed. It is possible there are larger keys in use in private PKIs, but we target the web PKI, so causing breakage here in the interests of increasing the default safety of users of crypto/tls seems reasonable."
},
"properties": {
"security-severity": "5.3"
}
}
]
}
},
"results": [
{
"ruleId": "XRAY-521544",
"ruleIndex": 0,
"message": {
"text": "[CVE-2023-29402] Upgrade github.com/golang/go:v1.20.4 to [1.19.10]"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "go.mod"
}
}
}
]
},
{
"ruleId": "XRAY-521542",
"ruleIndex": 1,
"message": {
"text": "[CVE-2023-29404] Upgrade github.com/golang/go:v1.20.4 to [1.19.10]"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "go.mod"
}
}
}
]
},
{
"ruleId": "XRAY-521541",
"ruleIndex": 2,
"message": {
"text": "[CVE-2023-29405] Upgrade github.com/golang/go:v1.20.4 to [1.19.10]"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "go.mod"
}
}
}
]
},
{
"ruleId": "XRAY-122380",
"ruleIndex": 3,
"message": {
"text": "[CVE-2020-7666] github.com/u-root/u-root:v0.11.0"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "go.mod"
}
}
}
]
},
{
"ruleId": "XRAY-521543",
"ruleIndex": 4,
"message": {
"text": "[CVE-2023-29403] Upgrade github.com/golang/go:v1.20.4 to [1.19.10]"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "go.mod"
}
}
}
]
},
{
"ruleId": "XRAY-523140",
"ruleIndex": 5,
"message": {
"text": "[CVE-2023-29406] Upgrade github.com/golang/go:v1.20.4 to [1.19.10]"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "go.mod"
}
}
}
]
},
{
"ruleId": "XRAY-527218",
"ruleIndex": 6,
"message": {
"text": "[CVE-2023-29409] Upgrade github.com/golang/go:v1.20.4 to [1.19.10]"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "go.mod"
}
}
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment