-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compliance report results percentage give incorrect results #3179
Labels
kind/bug
Categorizes issue or PR as related to a bug.
priority/critical-urgent
Highest priority. Must be actively worked on as someone's top priority right now.
target/kubernetes
Issues relating to kubernetes cluster scanning
Comments
chen-keinan
added
kind/bug
Categorizes issue or PR as related to a bug.
priority/backlog
Higher priority than priority/awaiting-more-evidence.
target/kubernetes
Issues relating to kubernetes cluster scanning
labels
Nov 15, 2022
itaysk
added
priority/critical-urgent
Highest priority. Must be actively worked on as someone's top priority right now.
and removed
priority/backlog
Higher priority than priority/awaiting-more-evidence.
labels
Nov 15, 2022
As immediate solution we will progress with option one , short term solution:
{
"ID": "0001",
"Title": "nsa",
"SummaryControls": [
{
"ID": "1.0",
"Name": "Non-root containers",
"Severity": "MEDIUM",
"TotalFail": 11
},
{
"ID": "1.1",
"Name": "Immutable container file systems",
"Severity": "LOW",
"TotalFail": 9
},
{
"ID": "1.2",
"Name": "Preventing privileged containers",
"Severity": "HIGH",
"TotalFail": 1
},
{
"ID": "1.3",
"Name": "Share containers process namespaces",
"Severity": "HIGH",
"TotalFail": 0
},
{
"ID": "1.4",
"Name": "Share host process namespaces",
"Severity": "HIGH",
"TotalFail": 6
},
{
"ID": "1.5",
"Name": "Use the host network",
"Severity": "HIGH",
"TotalFail": 0
},
{
"ID": "1.6",
"Name": "Run with root privileges or with root group membership",
"Severity": "LOW",
"TotalFail": 0
},
{
"ID": "1.7",
"Name": "Restricts escalation to root privileges",
"Severity": "MEDIUM",
"TotalFail": 11
},
{
"ID": "1.8",
"Name": "Sets the SELinux context of the container",
"Severity": "MEDIUM",
"TotalFail": 0
},
{
"ID": "1.9",
"Name": "Restrict a container's access to resources with AppArmor",
"Severity": "MEDIUM",
"TotalFail": 13
},
{
"ID": "1.10",
"Name": "Sets the seccomp profile used to sandbox containers.",
"Severity": "LOW",
"TotalFail": 13
},
{
"ID": "1.11",
"Name": "Protecting Pod service account tokens",
"Severity": "MEDIUM",
"TotalFail": 1
},
{
"ID": "1.12",
"Name": "Namespace kube-system should not be used by users",
"Severity": "MEDIUM",
"TotalFail": 4
},
{
"ID": "2.0",
"Name": "Pod and/or namespace Selectors usage",
"Severity": "MEDIUM",
"TotalFail": 0
},
{
"ID": "3.0",
"Name": "Use CNI plugin that supports NetworkPolicy API",
"Severity": "CRITICAL"
},
{
"ID": "4.0",
"Name": "Use ResourceQuota policies to limit resources",
"Severity": "MEDIUM",
"TotalFail": 0
},
{
"ID": "4.1",
"Name": "Use LimitRange policies to limit resources",
"Severity": "MEDIUM",
"TotalFail": 0
},
{
"ID": "5.0",
"Name": "Control plan disable insecure port",
"Severity": "CRITICAL"
},
{
"ID": "5.1",
"Name": "Encrypt etcd communication",
"Severity": "CRITICAL",
"TotalFail": 0
},
{
"ID": "6.0",
"Name": "Ensure kube config file permission",
"Severity": "CRITICAL",
"TotalFail": 0
},
{
"ID": "6.1",
"Name": "Check that encryption resource has been set",
"Severity": "CRITICAL",
"TotalFail": 1
},
{
"ID": "6.2",
"Name": "Check encryption provider",
"Severity": "CRITICAL",
"TotalFail": 0
},
{
"ID": "7.0",
"Name": "Make sure anonymous-auth is unset",
"Severity": "CRITICAL",
"TotalFail": 1
},
{
"ID": "7.1",
"Name": "Make sure -authorization-mode=RBAC",
"Severity": "CRITICAL",
"TotalFail": 0
},
{
"ID": "8.0",
"Name": "Audit policy is configure",
"Severity": "HIGH",
"TotalFail": 0
},
{
"ID": "8.1",
"Name": "Audit log path is configure",
"Severity": "MEDIUM",
"TotalFail": 1
},
{
"ID": "8.2",
"Name": "Audit log aging",
"Severity": "MEDIUM",
"TotalFail": 1
}
]
} |
This was referenced Nov 15, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind/bug
Categorizes issue or PR as related to a bug.
priority/critical-urgent
Highest priority. Must be actively worked on as someone's top priority right now.
target/kubernetes
Issues relating to kubernetes cluster scanning
Description
The compliance report results percentage incorrect give results.
The
rego
checks are basing on thedefsec
validation engine to run k8s policies on k8s resources.As for today the
defsec
validation engine do not know how to execute specific policy on a specific resource.For example :
A rego policy how validate
NetworkPolicy
resource should run only onNetworkPolicy
however today the engine execute it also onworkloads
which result with status ofPASS
Proposed solutions:
short terms:
trivy
: replaceCompliance
withStatus
(PASS / FAIL
) and show only one of two states on each the controlPASS or FAIL
Long term (right solution):
defsec
: add additional fields on each rego policy metadata ,Group
,Version
,Name
andNamespace
(optional) the rego engine will validate if the input match these new metadata fields and if match found the check will no be executedThe text was updated successfully, but these errors were encountered: