-
Notifications
You must be signed in to change notification settings - Fork 706
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
Remove kubernetes hardcoded solution for templated service_debug rules #11370
Conversation
Hi @CoreyCook8. Thanks for your PR. I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
👋 Could I get some eyes on here when someone has a chance? 🙏 |
Hey @rhmdnd could I get some 👀 on this one when you have a chance please? 🙏 |
/test |
@rhmdnd: The
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test e2e-aws-rhcos4-high |
Thanks for the patch @CoreyCook8. Testing this rule against a dev cluster and I noticed the default result changed since 1ce0c75 landed. Running e2e tests to see what the outcome is of this patch with those changes. |
Based on the e2e results - this appears to be failing because the autofs package isn't installed. #11546 should fix the e2e issues, but we might need to validate a different way to make sure the remediation still works (installing autofs manually). |
@CoreyCook8: The
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest |
/test |
@rhmdnd: The
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test 4.15-e2e-aws-rhcos4-high |
1 similar comment
/test 4.15-e2e-aws-rhcos4-high |
/test e2e-aws-rhcos4-high |
Hey @rhmdnd looks like we are passing the tests now |
@CoreyCook8 looks like some of the build tests are hung up. @Mab879 should we just rekick these? |
Any way I can help rekick those? |
Sorry, I just saw this. First time contributors need approval for the CI to run. I just gave the approval. @rhmdnd you should be able to do this as well. |
🤖 A k8s content image for this PR is available at: Click here to see how to deploy itIf you alread have Compliance Operator deployed: Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and: |
@rhmdnd looks good to go? |
@CoreyCook8 Hi, sorry for the delay, the changes look good to me. But could you please remove the $ git rebase --onto master 49de0664014309054881de12e2b73993951849ce~1 a710b6f5fbfa6ad22145c283505d2ec5148c1238
$ git checkout -B patch-1 HEAD |
…-shell_disabled/kubernetes directory Remove unnecessary kubernetes file
…bled/kubernetes directory
👋 @yuumasato Look alright now? |
/test e2e-aws-rhcos4-high |
Code Climate has analyzed commit 2ebd379 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 59.3% (0.0% change). View more on Code Climate. |
Description:
service_debug-shell_disabled and service_autofs_disabled have hardcoded remediations for the Kubernetes lang but templates exist for these rules.
Also, updates the jinja macro to reflect masking the service/socket.
Prior to this change there are two different fixes created for ignition and kubernetes
After this change, the kubernetes lang takes the templated version and the two fixes are identical.
Rationale:
There is no need to create hardcoded remediation files for these since the template files exist.
Also, when using the OpenShift Compliance Operator, the fix used for this depends on the ordering of these fixes. In my case, the kubernetes fix was before the ignition fix in the list. This caused the compliance operator to apply the kubernetes fix which failed to mask the service.
If the rule is going to check for the services to be masked, then all of the available remediations should mask the service.