Skip to content

Commit

Permalink
Merge pull request #542 from kubescape/fix_c0021
Browse files Browse the repository at this point in the history
fix control C-0021 - test failure caused by bad access to LinkedIn. Approved
  • Loading branch information
yuleib authored Nov 20, 2023
2 parents 4b08865 + 295e78f commit c228cff
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions rules/exposed-sensitive-interfaces-v1/raw.rego
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ deny[msga] {

wl_connectedto_service(wl, service) = paths{
count({x | service.spec.selector[x] == wl.metadata.labels[x]}) == count(service.spec.selector)
paths = ["spec.selector.matchLabels", "service.spec.selector"]
paths = ["spec.selector.matchLabels", "spec.selector"]
}

wl_connectedto_service(wl, service) = paths {
wl.spec.selector.matchLabels == service.spec.selector
paths = ["spec.selector.matchLabels", "service.spec.selector"]
paths = ["spec.selector.matchLabels", "spec.selector"]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[{
"alertMessage": "service: my-service is exposed",
"failedPaths": ["spec.selector.matchLabels", "service.spec.selector"],
"failedPaths": ["spec.selector.matchLabels", "spec.selector"],
"fixPaths": [],
"ruleStatus": "",
"packagename": "armo_builtins",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[{
"alertMessage": "service: my-service is exposed",
"failedPaths": ["spec.selector.matchLabels", "service.spec.selector"],
"failedPaths": ["spec.selector.matchLabels", "spec.selector"],
"fixPaths": [],
"ruleStatus": "",
"packagename": "armo_builtins",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"alertMessage": "service: jenkins-service is exposed",
"failedPaths": [
"spec.selector.matchLabels",
"service.spec.selector"
"spec.selector"
],
"fixPaths": [],
"ruleStatus": "",
Expand Down
4 changes: 2 additions & 2 deletions rules/exposed-sensitive-interfaces/raw.rego
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ deny[msga] {

wl_connectedto_service(wl, service) = paths{
count({x | service.spec.selector[x] == wl.metadata.labels[x]}) == count(service.spec.selector)
paths = ["spec.selector.matchLabels", "service.spec.selector"]
paths = ["spec.selector.matchLabels","spec.selector"]
}

wl_connectedto_service(wl, service) = paths {
wl.spec.selector.matchLabels == service.spec.selector
paths = ["spec.selector.matchLabels", "service.spec.selector"]
paths = ["spec.selector.matchLabels", "spec.selector"]
}

0 comments on commit c228cff

Please sign in to comment.