Description
Rule: ocp4-audit-log-forwarding-enabled (applications/openshift/api-server/audit_log_forwarding_enabled)
it appears the check is expected to evaluate every pipeline in every
ClusterLogForwarder object and PASS if audit appears in the inputRefs
of any pipeline.
Suspected issue
In my test cluster, I have a single ClusterLogForwarder object with two
pipelines:
apiVersion: observability.openshift.io/v1
kind: ClusterLogForwarder
metadata:
name: instance
namespace: openshift-logging
spec:
pipelines:
- name: app-logs
inputRefs:
- application
outputRefs:
- app-sink
- name: audit-logs
inputRefs:
- audit
outputRefs:
- siem-sink
Only the second pipeline (audit-logs) references audit in inputRefs.
The first pipeline does not.
Expected behavior
The rule should evaluate to PASS, since at least one pipeline
(audit-logs) forwards audit logs.
Actual behavior
If it evaluates as FAIL, this suggests the underlying OVAL/CEL check may only
be inspecting the first pipeline entry (e.g. .spec.pipelines[0].inputRefs)
rather than iterating over the full pipelines[] array, which would be a
false negative for any CLF object where the audit pipeline is not first in
the list.
After I removed my first pipleline entry, the check passed.
Description
Rule:
ocp4-audit-log-forwarding-enabled(applications/openshift/api-server/audit_log_forwarding_enabled)it appears the check is expected to evaluate every pipeline in every
ClusterLogForwarder object and PASS if
auditappears in theinputRefsof any pipeline.
Suspected issue
In my test cluster, I have a single ClusterLogForwarder object with two
pipelines:
Only the second pipeline (
audit-logs) referencesauditininputRefs.The first pipeline does not.
Expected behavior
The rule should evaluate to PASS, since at least one pipeline
(
audit-logs) forwards audit logs.Actual behavior
If it evaluates as FAIL, this suggests the underlying OVAL/CEL check may only
be inspecting the first pipeline entry (e.g.
.spec.pipelines[0].inputRefs)rather than iterating over the full
pipelines[]array, which would be afalse negative for any CLF object where the audit pipeline is not first in
the list.
After I removed my first pipleline entry, the check passed.