Skip to content

Commit

Permalink
Merge pull request #634 from kubescape/feature/service-spec
Browse files Browse the repository at this point in the history
Adding review path for the service
  • Loading branch information
kooomix authored Jul 25, 2024
2 parents 36ec064 + ef079e7 commit 1876df0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions rules/unauthenticated-service/raw.rego
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,18 @@ deny contains msga if {
service_name := service.metadata.name
has_unauthenticated_service(service_name, service.metadata.namespace, service_scan_result)

# Path to the service object
path := "spec"

msga := {
"alertMessage": sprintf("Unauthenticated service %v exposes %v", [service_name, wl.metadata.name]),
"alertScore": 7,
"fixPaths": [],
"reviewPaths": [path],
"reviewPaths": [],
"failedPaths": [],
"packagename": "armo_builtins",
"alertObject": {"k8sApiObjects": [wl]},
"relatedObjects": [
{"object": service},
{"object": service,
"reviewPaths": ["spec"],
},
],
}
}
Expand Down
4 changes: 2 additions & 2 deletions rules/unauthenticated-service/test/fail_service/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
}
}
},
"reviewPaths": null
"reviewPaths": ["spec"]
}
],
"reviewPaths": ["spec"],
"reviewPaths": [],
"ruleStatus": ""
}
]

0 comments on commit 1876df0

Please sign in to comment.