Skip to content

Commit

Permalink
Merge pull request #428 from gauravgogia-accurics/master
Browse files Browse the repository at this point in the history
Add policy AC-K8-NS-SE-M-0188 for CVE-2020-8554
  • Loading branch information
Willie authored Dec 11, 2020
2 parents f96af13 + 9f68c60 commit 90e4ea7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "ensurePrivateIP",
"file": "ensurePrivateIP.rego",
"template_args": {
"name": "ensurePrivateIP",
"prefix": "",
"resource_type": "kubernetes_service",
"suffix": ""
},
"severity": "MEDIUM",
"description": "Vulnerable to CVE-2020-8554",
"reference_id": "AC-K8-NS-SE-M-0188",
"category": "Network Security",
"version": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package accurics

{{.prefix}}{{.name}}{{.suffix}}[service.id] {
service := input.{{.resource_type}}[_]
type_check(service.config.spec)
object.get(service.config.spec, "externalIPs", "undefined") != "undefined"
}

type_check(spec) {
spec.type == "ClusterIP"
}

type_check(spec) {
object.get(spec, "type", "undefined") == "undefined"
}

0 comments on commit 90e4ea7

Please sign in to comment.