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

Add Kubernetes remediation for rule configure_crypto_policy #9266

Merged
merged 1 commit into from
Aug 23, 2022

Conversation

Vincent056
Copy link
Contributor

Added Kubernets auto remediation for rule configure_crypto_policy

Related BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2062530

@github-actions
Copy link

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@jan-cerny jan-cerny changed the title Add Kubernets remediation for rule configure_crypto_policy Add Kubernetes remediation for rule configure_crypto_policy Jul 29, 2022
@jhrozek
Copy link
Collaborator

jhrozek commented Jul 29, 2022

Hi @Vincent056 it seems like the e2e tests are catching some issue here:

     helpers.go:808: Result - Name: e2e-e8-worker-configure-crypto-policy - Status: FAIL - Severity: high
    helpers.go:815: E2E-FAILURE: The expected result for the configure_crypto_policy rule didn't match. Expected 'PASS', Got 'FAIL' 

@marcusburghardt marcusburghardt added the Kubernetes Kubernetes remediation update. label Aug 1, 2022
@Vincent056 Vincent056 force-pushed the configure_crypto branch 2 times, most recently from 6c0e9ae to eb61041 Compare August 5, 2022 18:40
@Vincent056
Copy link
Contributor Author

/retest

Added Kubernets auto remediation for rule configure_crypto_policy
@Vincent056
Copy link
Contributor Author

Remove e2e test, rhcos4-moderate profile has different default variable for var_system_crypto_policy than rhcos4-e8, this makes the first scan fail on rhcos4-e8 but not on rhcos4-moderate.

@codeclimate
Copy link

codeclimate bot commented Aug 9, 2022

Code Climate has analyzed commit e98fb03 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 42.7% (0.0% change).

View more on Code Climate.

@Vincent056
Copy link
Contributor Author

/retest

@openshift-ci
Copy link

openshift-ci bot commented Aug 9, 2022

@Vincent056: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-rhcos4-high e98fb03 link true /test e2e-aws-rhcos4-high
ci/prow/e2e-aws-rhcos4-moderate e98fb03 link true /test e2e-aws-rhcos4-moderate

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@jhrozek
Copy link
Collaborator

jhrozek commented Aug 9, 2022

So now the tests related to your rule are all passing, but here is this failure:

  helpers.go:812: Excluded Rule from counting - Name: e2e-high-master-configure-usbguard-auditbackend
    helpers.go:815: E2E-FAILURE: The expected result for the configure_usbguard_auditbackend rule didn't match. Expected 'PASS', Got 'NOT-APPLICABLE'

Because other rhcos4 rules are passing, I wonder if we have an issue with installing usbguard?
Does the rule pass manually for you?

@Vincent056
Copy link
Contributor Author

So now the tests related to your rule are all passing, but here is this failure:

  helpers.go:812: Excluded Rule from counting - Name: e2e-high-master-configure-usbguard-auditbackend
    helpers.go:815: E2E-FAILURE: The expected result for the configure_usbguard_auditbackend rule didn't match. Expected 'PASS', Got 'NOT-APPLICABLE'

Because other rhcos4 rules are passing, I wonder if we have an issue with installing usbguard? Does the rule pass manually for you?

Yes, this rule passes manually for me

@xiaojiey
Copy link
Collaborator

/bugzilla cc-qa

1 similar comment
@xiaojiey
Copy link
Collaborator

/bugzilla cc-qa

@xiaojiey
Copy link
Collaborator

/label qe-approved

@openshift-ci
Copy link

openshift-ci bot commented Aug 11, 2022

@xiaojiey: The label(s) qe-approved cannot be applied, because the repository doesn't have them.

In response to this:

/label qe-approved

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.

@xiaojiey
Copy link
Collaborator

test cases details could be seen from: https://url.corp.redhat.com/8162b96
@Vincent056 Could you please help to review? Thanks.

@Vincent056
Copy link
Contributor Author

test cases details could be seen from: https://url.corp.redhat.com/8162b96 @Vincent056 Could you please help to review? Thanks.

Thanks for adding the test case, it looks good to me

@jhrozek
Copy link
Collaborator

jhrozek commented Aug 17, 2022

thank you, tested manually. As I said in the other PR, let's add a card and disable the offending test for now

@Vincent056 Vincent056 merged commit ca319bd into ComplianceAsCode:master Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Kubernetes Kubernetes remediation update.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants