diff --git a/rules/exposure-to-internet/raw.rego b/rules/exposure-to-internet/raw.rego index 4a6345c47..f8ded1dfc 100644 --- a/rules/exposure-to-internet/raw.rego +++ b/rules/exposure-to-internet/raw.rego @@ -84,6 +84,6 @@ svc_connected_to_ingress(svc, ingress) = result { rule := ingress.spec.rules[i] paths := rule.http.paths[j] svc.metadata.name == paths.backend.service.name - result := [sprintf("ingress.spec.rules[%d].http.paths[%d].backend.service.name", [i,j])] + result := [sprintf("spec.rules[%d].http.paths[%d].backend.service.name", [i,j])] } diff --git a/rules/exposure-to-internet/test/failed_with_ingress/expected.json b/rules/exposure-to-internet/test/failed_with_ingress/expected.json index ea148399e..958f9eaf0 100644 --- a/rules/exposure-to-internet/test/failed_with_ingress/expected.json +++ b/rules/exposure-to-internet/test/failed_with_ingress/expected.json @@ -51,7 +51,7 @@ } }, "failedPaths": [ - "ingress.spec.rules[0].http.paths[0].backend.service.name" + "spec.rules[0].http.paths[0].backend.service.name" ], "fixPaths": null }