Openshift Devsecops
An openshift devsecops workflow secures containers by adding role checks and build scans into delivery pipelines. Teams set up strict rules that control who can deploy apps or read cluster secrets. Most teams start by assigning default cluster roles to developers and automation tools. When those roles are too broad, a single leaked key can expose every namespace. Attackers or careless scripts can then read sensitive data or alter running workloads. How an openshift devsecops workflow uses role
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
An openshift devsecops workflow secures containers by adding role checks and build scans into delivery pipelines. Teams set up strict rules that control who can deploy apps or read cluster secrets. Most teams start by assigning default cluster roles to developers and automation tools. When those roles are too broad, a single leaked key can expose every namespace. Attackers or careless scripts can then read sensitive data or alter running workloads.
How an openshift devsecops workflow uses role rules
OpenShift builds its permission model on standard Kubernetes role-based access control. This system uses a dedicated authorization API group on the API server. Every rule in this model is additive, which means there are no deny rules. You start with zero permissions and add specific verbs for specific resource types.
A standard Role sets permissions inside one single namespace. If a team needs rules for cluster-wide items like nodes, they use a ClusterRole. A ClusterRole can also apply rules to namespaced resources across all namespaces at once. To give these rules to a user or pipeline, you create a binding.
A RoleBinding grants permissions inside one namespace by linking subjects to a Role. A RoleBinding can also reference a shared ClusterRole while keeping the scope inside one namespace. In contrast, a ClusterRoleBinding grants permissions across the entire cluster at once. Good pipelines rely on namespace-scoped bindings so build jobs only touch their own projects.
Some API requests target a subresource rather than a top-level object. For example, reading pod logs or running commands inside a container uses subresources. In role rules, you write these targets with a slash between the resource and subresource. Engineers must grant the log or exec subresource before a user can debug a pod.
Where native cluster roles fall short in production
Native roles and bindings do a great job deciding who can talk to the API. They keep build pipelines inside their own namespaces and block unauthorized users from reading secrets. This setup stops most broad privilege mistakes before code ever reaches a production node.
OpenShift RBAC + DevSecOps Pipeline Design: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Still, native role checks stop working the moment an interactive session starts. Once a role grants the pod exec subresource, the API server steps out of the way. The cluster knows a developer opened a shell, but it does not check individual commands. If that container holds database keys, the user can run queries and dump raw tables.
Standard role rules also cannot rewrite sensitive fields like emails, phone numbers, or card numbers. A user with exec rights sees whatever raw data the container can reach. Also, static role bindings stay active until an admin removes them. Teams need a way to inspect commands in flight and mask sensitive fields in results.
Add request guardrails and response masking beside Kubernetes
Cluster roles and service accounts govern who reaches the Kubernetes API. Still, a broad role or agent can delete workloads or print sensitive values from ConfigMaps and logs. In practice, hoop.dev runs beside the API server as a sidecar for your Kubernetes API and checks every request and response alongside RBAC.
With hoop.dev Kubernetes controls, guardrails can allow listing Secret names while refusing reads of Secret data before execution. Data masking redacts matched keys in returned JSON responses and log streams in memory. Furthermore, hoop.dev holds SOC 2 Type II and is MIT licensed on GitHub.
Frequently asked questions
How do you block a specific action in Kubernetes RBAC?
Kubernetes permissions are additive and do not support deny rules. To block an action, you must remove the role binding that grants that verb.
Should CI/CD pipelines use a RoleBinding or a ClusterRoleBinding?
Pipelines should almost always use a RoleBinding scoped to their target namespace. A ClusterRoleBinding gives the pipeline access to every namespace across the whole cluster.
Why can a developer view pods but not open a shell inside them?
Viewing pods only requires read rights on the top-level pod resource. Opening a shell requires explicit permission on the pod exec subresource in their role.
Related guides
In this post