Module 04: Violations and policy management
This module covers how RHACS 5.0 records policy violations across the full application lifecycle, what forensic data is captured at runtime, and how the unified policy engine spans build, deploy, and runtime enforcement. It also covers two 5.0 policy behaviors: file activity monitoring, and init-container evaluation.
Estimated time: 18-22 minutes
Part 1: Violations and forensic data
Know
Context: A violation in RHACS is a record of a specific moment when a policy criterion was met by an object in your cluster — an image, a deployment configuration, or a runtime process. The goal is not to produce a to-do list. It is to give security and platform teams an accurate record of what happened, when, and what to do about it.
Four lifecycle stages for violations:
-
Build time — policy criteria evaluated in CI/CD via
roxctl image checkorroxctl deployment check. When enforcement is enabled, the pipeline fails with remediation guidance. Violations from this stage are not stored on the Violations page. -
Deploy time — policy criteria evaluated when a workload is created or updated. Violations appear on the Violations page and can block deployment through the admission controller.
-
Build and deploy time — the same policy applies in both the CI pipeline and at workload admission, with enforcement configurable for each stage independently.
-
Runtime — policy criteria triggered by observed process activity, network connections, or system calls inside a running container. Violations carry forensic detail for incident response.
Why runtime forensic data matters:
Container runtime incidents are different from VM incidents. The process list is small, the expected behavior is constrained, and the filesystem is immutable by design. When RHACS detects a policy violation at runtime, it captures the full context that incident response needs: the process name, arguments, the UID it ran as, the container ID, and the exact timestamp. That is the "who, what, when, where, and why" of the event in a format security operations teams recognize.
From alert to posture improvement:
A runtime violation is not just something to resolve. It is evidence that a container can behave in a way that should not be possible. The correct long-term response is to remove the capability from the image — not just acknowledge the alert.
Show
What I say:
"The Violations page is the event stream for deploy-time and runtime findings. Build-time failures surface in your CI pipeline instead — they never land here. Let me show you a deploy-time violation and then a runtime violation, because they carry very different information."
What I do:
-
From the left side menu, navigate to Violations.
-
Point to the violations list and the lifecycle filter:
"Every entry here is a specific instance of a policy criterion being met. You can filter by lifecycle stage: Build, Deploy, Build and Deploy, or Runtime. Build-time results appear in CI output; this page is where deploy-time and runtime violations accumulate."
-
Locate a violation for the Fixable Severity at Least Important policy and click it:
"This is a deploy-time violation. It was triggered when a deployment was created with an image containing a fixable, high-severity CVE. The detail view shows the same information that would appear in a CI/CD tool at build time — the CVE, the affected component, the severity, and what version fixes it."
-
Point to the detail fields:
"The information here is consistent across every integration point: the developer sees the same data in their pipeline output, in the Developer Hub, and here in the Violations page. There is no translation layer between what the security team sees and what the developer needs to act on."
-
Navigate back to the Violations list.
-
Filter for the Ubuntu Package Manager Execution policy — type
Ubuntuin the Policy filter bar and select the matching entry:"This is a runtime violation. A package manager executed inside a running container. That is the forensic record."
-
Click on the violation to open the detail view:
"Runtime violations carry a different set of details. You can see the process name, the arguments passed to it, the UID it ran under, the container ID, and the exact timestamp. This is the incident data your security operations team needs to triage the event.
"The team has options to resolve or suppress this notification. But the more important action is on the Policy tab."
-
Click the Policy tab at the top of the violation detail:
"The policy that triggered this violation includes a Guidance section. It tells the development team exactly what to remove from the Dockerfile to prevent this from happening again. A package manager has no legitimate purpose in a container that ships with all its dependencies. Removing it from the image eliminates an entire class of attacker capability in the next build."
What they should notice:
-
Policies span four lifecycle stages — build, deploy, build and deploy, and runtime — but the Violations page stores deploy-time and runtime events
-
Build-time enforcement stops bad images in CI before they are promoted; deploy-time and runtime enforcement catch what reaches the cluster
-
Runtime violations include process-level detail that maps directly to incident response workflows
-
The Guidance section converts a runtime alert into a specific, actionable Dockerfile improvement
|
Presenter tip: The "runtime incident as a learning opportunity" framing resonates strongly with security architects. It reframes alert fatigue — instead of just managing a stream of notifications, teams are using each incident to permanently reduce attack surface in their images. |
Part 2: The built-in policy library
Know
Context: RHACS ships with a library of policies built from Red Hat’s security expertise, interpretations of industry best practices, and mappings to common compliance standards. These policies cover the full lifecycle — from what should never appear in a container image to what should never execute at runtime.
What the policy library provides:
-
Build-time policies that catch vulnerable images and Dockerfile issues in CI before promotion
-
Deploy-time policies that catch misconfigurations and vulnerable images at workload admission
-
Runtime policies that detect behaviors associated with attacker techniques: gaining a foothold, maintaining presence, moving laterally, and exfiltrating data
-
Rationale and guidance built into every policy so the development team understands why a policy exists and exactly what to change
The package manager philosophy:
Package managers like apk, apt, and yum are useful tools in a virtual machine context where software is installed and updated in place. In a container, they have no legitimate purpose — a container image should ship with every dependency it needs at build time. The presence of a package manager is an attack surface: if an attacker gains code execution, they can use it to install arbitrary software inside a running container. RHACS policies targeting package managers reflect a deliberate hardening stance, not an arbitrary restriction.
Policy scope and exceptions:
The unified policy engine makes it straightforward to write policies with appropriate scope. A policy that prevents compiler tools can be scoped to production clusters only, with an exception for development namespaces and CI/CD tooling namespaces. Security gets enforcement where it matters; development teams are not blocked in the environments where those tools are legitimate.
Show
What I say:
"Let me show you what a policy looks like inside RHACS and how the unified engine handles policies that span the build, deploy, and runtime stages without requiring separate tools for each."
What I do:
-
From the left side menu, navigate to Platform Configuration > Policy Management.
-
Point to the policy list:
"This is the full library of built-in policies. They cover build and deploy time — catching misconfigurations and vulnerable images before deployment — and runtime, detecting behaviors that map to known attacker techniques."
-
Locate and click the Alpine Linux Package Manager (apk) in Image policy:
"This is what a policy looks like. Front and center: the Rationale, explaining why this matters, and the Guidance, explaining exactly what to change. Both are written for the development team, not just the security team."
-
Read the Rationale section aloud:
"Package managers in a container image have no legitimate purpose. A container should ship with all of its dependencies. The presence of apk, apt, or yum is an attack surface — it gives an attacker who has gained code execution the ability to install arbitrary software."
-
Point to the Guidance section:
"The guidance tells the developer which Dockerfile command removes the package manager. This is a one-line fix that permanently reduces attack surface in the next image build."
-
Navigate back to the policy list and highlight the lifecycle column:
"Policies are tagged with the lifecycle stages they apply to: Build, Deploy, Build and Deploy, and Runtime. A single policy can span multiple stages — for example, the same CVE check in CI and again at admission. Other security tools require separate policy engines for each stage. RHACS uses one engine for all four."
-
Point to a policy that spans multiple lifecycle stages:
"You can write a single policy that combines criteria across stages — for example, flagging a critical CVE specifically in deployments that are also running as privileged containers. Neither criterion alone is necessarily a block; the combination is. That kind of cross-stage logic is not possible when your vulnerability scanner and your runtime monitor are separate products."
What they should notice:
-
Every policy includes Rationale and Guidance written for developers, not just security reviewers
-
The lifecycle tags show which stage each policy applies to at a glance
-
Cross-lifecycle policy criteria eliminate the need to coordinate between separate tooling
|
Presenter tip: The "we don’t like package managers" line from the script lands well in a technical audience. It is a memorable way to explain the philosophy: containers should be immutable, minimal, and ship with exactly what they need. Package managers are the opposite of that principle. |
Part 3: Policy enforcement and the admission controller
Know
Context: Informing teams about policy violations is the starting point. For high-risk criteria, security teams need a guarantee that non-compliant workloads cannot be deployed — not just notified. RHACS enforcement integrates with the Kubernetes Admission Controller to make that guarantee.
How enforcement works:
-
When a policy is set to enforce at deploy time, RHACS programs the Kubernetes Admission Controller to evaluate incoming deployment requests against the policy
-
A deployment that violates an enforced policy is rejected by the OpenShift API with a clear error message that includes the policy name and remediation guidance
-
There is no proprietary sidecar or custom webhook that could fail and cause an outage — enforcement flows through the same Admission Controller that OpenShift already uses for its own validation
Why this approach matters for platform teams:
-
Developers see a standard OpenShift API failure, not an opaque security tool error that forces them to open a ticket with the security team
-
The rejection message includes exactly what needs to change, so developers can self-serve the fix
-
Enforcement is declarative and auditable — the policy definition is the source of truth for what is and is not allowed to deploy
Build-time enforcement:
Enforcement does not have to wait for deploy time. When integrated with a CI/CD pipeline, RHACS can evaluate images against policies during the build stage using roxctl. A build that includes a CVE that violates an enforced policy fails the pipeline step, preventing the image from being promoted at all.
Show
What I say:
"RHACS is designed to help and inform development teams first. But security teams also need a hard line on certain criteria — things that should never make it to production regardless of circumstances. Let me show you how enforcement works."
What I do:
-
From the Policy Management list, locate the Fixable CVSS >= 7 policy. You can filter for it by typing
fixablein the filter bar (it is typically 20-30 rows down the list). -
Click Actions > Edit in the upper right of the policy.
-
In the left hand navigation of the edit flow, click Policy behavior > Actions:
"By default, most policies are set to Inform — they generate a violation record and optionally send a notification, but they do not block anything. This is the right starting point. Teams need time to understand the landscape before enforcement begins."
-
Point to the Response method options:
"Switching to Inform and Enforce activates the Admission Controller integration. Now, any deployment that includes an image with a fixable CVE scoring 7 or above will be rejected by the OpenShift API."
-
Point to the Configure Enforcement Behavior switches for Build and Deploy:
"You can apply enforcement at Build time — blocking pipeline promotion of a non-compliant image — at Deploy time — blocking the Kubernetes deployment resource from being created — or both. For this policy, enabling both gives you defense in depth: the image cannot be promoted through CI/CD, and even if it somehow reaches the cluster, the deployment cannot be created."
-
Point to the enforcement message behavior:
"When a deployment is rejected, the developer sees a standard OpenShift API error. It includes the policy name and the remediation steps from the Guidance section. They do not need to contact the security team to find out why their deployment failed or what to fix. The information is in the error response."
-
Click Inform and enforce, toggle Build and Deploy enforcement on.
-
Click Review policy from the left hand navigation, then click Save.
What they should notice:
-
Enforcement flows through the Kubernetes Admission Controller — no proprietary infrastructure required
-
Developers receive actionable error messages, not opaque rejections
-
Build and deploy enforcement together create a two-stage gate that catches violations early and prevents any bypass
|
The "programming OpenShift to prevent security risk" framing is effective with platform architects. It positions RHACS enforcement as a natural extension of the Kubernetes API machinery that the cluster already runs, rather than an external system that could conflict with or duplicate OpenShift’s own admission logic. |
|
Important: After the demo, undo the enforcement change on this policy to avoid blocking pipeline runs in subsequent sections. Navigate back to the policy, click Actions > Edit, set the response method back to Inform only, and save. |
|
Transition: Enforcement is the hard line. The next two parts show runtime file activity, then how build and deploy policies treat init containers. |
Part 4: File activity monitoring
Know
Context: Image scanning cannot see a process rewrite a file after the container starts. File activity monitoring records access, modification, and rename operations on paths you choose, including wildcards, and can combine those events with process name, arguments, and UID.
How RHACS records file activity:
-
Collector on each node observes file operations for containers and for host processes
-
Sensor evaluates runtime policies against those events
-
Central stores the match. Deployment events appear on the Violations page. Node events appear on the Nodes tab and through the API and notifiers
What a policy needs:
-
File activity monitoring enabled on the secured cluster
-
A runtime policy with a File Path criterion and an event source of Deployment or Node
-
x86_64 nodes. File activity monitoring does not run on other architectures in this release
This environment already has two policies and a runner that keeps producing a deployment event:
-
fam-basic-deploy-monitoringwatches/etc/passwdfor deployment events.rhacs-fam-exec-runnerin thepaymentsproject execs intovisa-processorand runstouch /etc/passwdabout every 10 minutes -
fam-basic-node-monitoringwatches the same path for host processes
Machine Config Operator writes are not reported as file activity. For the product behavior, see the Configuring file activity monitoring topic.
Show
What I say:
"A container that is supposed to be immutable just changed /etc/passwd. File activity monitoring is the runtime control that catches that, with the process that did it."
What I do:
-
Go to Platform Configuration > Policy Management and search for
fam-basic-deploy-monitoring. -
Open the policy and point to the lifecycle and criteria:
"Lifecycle is Runtime. The event source is Deployment. The file path is
/etc/passwd. That is the criterion. The runner inpaymentstouches that file insidevisa-processor." -
Open
fam-basic-node-monitoring."Same path, event source Node. That one is for a host process, such as a shell on the node, not a container."
-
Go to Violations and filter on the policy name
fam-basic-deploy-monitoring. -
Open a violation and point to the file path, the process, the deployment, and the timestamp.
"This is the same forensic record as a process violation, plus the file that changed. PCI-DSS file-integrity controls map to this event."
-
If the list is empty, trigger one event from the terminal, then refresh Violations:
oc exec -n payments deployment/visa-processor -c visa-processor-sidecar -- touch /etc/passwd -
Open the Nodes tab on Violations and look for
fam-basic-node-monitoring."A plain debug pod is still a deployment event. A node event has to come from a host process. If this tab is empty, stay on the deployment violation. That is the one the audience needs to see."
What they should notice:
-
The policy names a path, not a CVE
-
The violation names the process that touched the file
-
Deployment events and node events are separate policies
|
Presenter tip: |
Part 5: Init container coverage
Know
Context: Init containers run before the application containers and then exit. In earlier RHACS releases, build and deploy policies often ignored them, so a privileged or vulnerable init image never produced a violation. RHACS 5.0 evaluates init container images with the same build and deploy policies as the main containers.
What changed:
-
When a deployment declares init containers, RHACS scans those images for vulnerabilities
-
Build and deploy policies apply to those images. A fixable high CVE or a privileged init container can violate the same policy as the application container
-
The policy Filters step can skip init containers. Teams upgrading from RHACS 4 keep the old behavior on the policies they choose, and leave it off everywhere else
-
Runtime process policies still describe the running application. An init container is gone by the time the application container starts
The useful cases are the ones that look the same in a container list and mean different things to a reviewer:
-
A clean init container that only prepares files, and should stay quiet
-
An init image with a fixable high CVE, which should violate the image policy
-
A privileged init container that is justified, which still violates a privileged-container policy until someone excludes it
-
A privileged init container on a vulnerable image, which should violate both
Show
What I say:
"Init containers are in the policy engine now. The default is to evaluate them. The filter is how you opt a single policy out."
What I do:
-
Go to Platform Configuration > Policy Management and open Fixable CVSS >= 7. Click Actions > Edit.
-
Move through the wizard until you reach Filters.
"Skip init containers is off. With it off, this policy scores the init image and the application image. Turn it on only when an init container is allowed to carry a finding the application container is not."
-
Leave Skip init containers off. Cancel the edit.
"Do not save a skip. This environment is here to show init containers being evaluated, not ignored."
What they should notice:
-
The filter is per policy, not a cluster-wide switch
-
Image and privilege policies are the ones that change. Runtime process policies still watch the application container
-
Opting out is an explicit filter, so the exception is visible in the policy
|
Presenter tip: If you turned on Build or Deploy enforcement for this policy in the previous part, set the response method back to Inform only before you leave Policy Management. An enforced fixable-CVE policy blocks later pipeline runs. |
|
Transition: With violations and policy management covered, we move to the Network Graph — showing how RHACS visualizes observed traffic between deployments and generates Kubernetes Network Policies from the traffic baseline. |