Skip to content
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

[Improvement] hardcoded_ip_addresses_in_k8s_runtime_configuration should give more information on failure #2093

Closed
martin-mat opened this issue Jun 28, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@martin-mat
Copy link
Collaborator

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.
@martin-mat martin-mat added the enhancement New feature or request label Jun 28, 2024
kosstennbl pushed a commit to kosstennbl/cnf-testsuite that referenced this issue Jul 1, 2024
Add information about file location, line numbers and lines themselves
if the hardcoded_ip_addresses_in_k8s_runtime_configuration fails

Refs: cnti-testcatalog#2093
Signed-off-by: Konstantin Yarovoy <konstantin.yarovoy@tietoevry.com>
kosstennbl pushed a commit to kosstennbl/cnf-testsuite that referenced this issue Jul 1, 2024
Add information about file location, line numbers and lines themselves
if the hardcoded_ip_addresses_in_k8s_runtime_configuration fails

Refs: cnti-testcatalog#2093
Signed-off-by: Konstantin Yarovoy <konstantin.yarovoy@tietoevry.com>
kosstennbl pushed a commit to kosstennbl/cnf-testsuite that referenced this issue Jul 2, 2024
Add information about file location, line numbers and lines themselves
if the hardcoded_ip_addresses_in_k8s_runtime_configuration fails

Refs: cnti-testcatalog#2093
Signed-off-by: Konstantin Yarovoy <konstantin.yarovoy@tietoevry.com>
kosstennbl pushed a commit to kosstennbl/cnf-testsuite that referenced this issue Jul 3, 2024
Add information about file location, line numbers and lines themselves
if the hardcoded_ip_addresses_in_k8s_runtime_configuration fails

Refs: cnti-testcatalog#2093
Signed-off-by: Konstantin Yarovoy <konstantin.yarovoy@tietoevry.com>
martin-mat pushed a commit that referenced this issue Jul 3, 2024
Add information about file location, line numbers and lines themselves
if the hardcoded_ip_addresses_in_k8s_runtime_configuration fails

Refs: #2093

Signed-off-by: Konstantin Yarovoy <konstantin.yarovoy@tietoevry.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants