<commit_before>// Module included in the following assemblies:
//
// * security/compliance_operator/compliance-operator-remediation.adoc

[id="filtering-failed-compliance-check-results_{context}"]
= Filters for failed compliance check results

By default, the `ComplianceCheckResult` objects are labeled with several useful labels that allow you to query the checks and decide on the next steps after the results are generated.

List checks that belong to a specific suite:

[source,terminal]
----
$ oc get compliancecheckresults -l compliance.openshift.io/suite=example-compliancesuite
----

List checks that belong to a specific scan:

[source,terminal]
----
$ oc get compliancecheckresults -l compliance.openshift.io/scan=example-compliancescan
----

Not all `ComplianceCheckResult` objects create `ComplianceRemediation` objects. Only `ComplianceCheckResult` objects that can be remediated automatically do. A `ComplianceCheckResult` object has a related remediation if it is labeled with the `compliance.openshift.io/automated-remediation` label. The name of the remediation is the same as the name of the check.

List all failing checks that can be remediated automatically:

[source,terminal]
----
$ oc get compliancecheckresults -l 'compliance.openshift.io/check-status=FAIL,compliance.openshift.io/automated-remmediation'
----

List all failing checks that must be remediated manually:

[source,terminal]
----
$ oc get compliancecheckresults -l 'compliance.openshift.io/check-status=FAIL,!compliance.openshift.io/automated-remediation'
----

The manual remediation steps are typically stored in the `description` attribute in the `ComplianceCheckResult` object.<commit_msg>Fix typo in security compliance module<commit_after>// Module included in the following assemblies:
//
// * security/compliance_operator/compliance-operator-remediation.adoc

[id="filtering-failed-compliance-check-results_{context}"]
= Filters for failed compliance check results

By default, the `ComplianceCheckResult` objects are labeled with several useful labels that allow you to query the checks and decide on the next steps after the results are generated.

List checks that belong to a specific suite:

[source,terminal]
----
$ oc get compliancecheckresults -l compliance.openshift.io/suite=example-compliancesuite
----

List checks that belong to a specific scan:

[source,terminal]
----
$ oc get compliancecheckresults -l compliance.openshift.io/scan=example-compliancescan
----

Not all `ComplianceCheckResult` objects create `ComplianceRemediation` objects. Only `ComplianceCheckResult` objects that can be remediated automatically do. A `ComplianceCheckResult` object has a related remediation if it is labeled with the `compliance.openshift.io/automated-remediation` label. The name of the remediation is the same as the name of the check.

List all failing checks that can be remediated automatically:

[source,terminal]
----
$ oc get compliancecheckresults -l 'compliance.openshift.io/check-status=FAIL,compliance.openshift.io/automated-remediation'
----

List all failing checks that must be remediated manually:

[source,terminal]
----
$ oc get compliancecheckresults -l 'compliance.openshift.io/check-status=FAIL,!compliance.openshift.io/automated-remediation'
----

The manual remediation steps are typically stored in the `description` attribute in the `ComplianceCheckResult` object.
{'fraction_non_alphanumeric': 0.08618654073199528, 'fraction_numerical': 0.0, 'mean_word_length': 5.117328519855596, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6264276', 'n_tokens_mistral': 956, 'n_tokens_neox': 867, 'n_words': 328}