testsuite
testsuite copied to clipboard
[Improvement] hardcoded_ip_addresses_in_k8s_runtime_configuration should give more information on failure
Is your feature request related to a problem? Please describe. When hardcoded_ip_address_in_k8s_configuration fails, no description/additional information about exact reason of failure is given:
π¬ Testing: [hardcoded_ip_addresses_in_k8s_runtime_configuration]
βοΈ πFAILED: [hardcoded_ip_addresses_in_k8s_runtime_configuration] Hard-coded IP addresses found in the runtime K8s configuration
Describe the solution you'd like Print out more information (similarly as other tests), for example like in non_root_containers:
π¬ Testing: [non_root_containers]
Failed resource: StatefulSet grafana in test-cnf namespace
Failed resource: Deployment prometheus-thanos in test-cnf namespace
Failed resource: StatefulSet prometheus in test-cnf namespace
Remediation: If your application does not need root privileges, make sure to define runAsNonRoot as true or explicitly set the runAsUser using ID 1000 or higher under the PodSecurityContext or container securityContext. In addition, set an explicit value for runAsGroup using ID 1000 or higher.
βοΈ πFAILED: [non_root_containers] Found containers running with root user or user with root group membership ππ
For hardcoded_ip_addresses_in_k8s_runtime_configuration, print out:
- impacted file
- location in the file, a line with explicit IP, maybe some lines before and after.