Skip to main content
AI
  • Get started with AI

    • Red Hat AI

      Accelerate the development and deployment of enterprise AI solutions.

    • AI learning hub

      Explore learning materials and tools, organized by task.

    • AI interactive demos

      Click through scenarios with Red Hat AI, including training LLMs and more.

    • AI/ML learning paths

      Expand your Red Hat OpenShift AI knowledge using these learning resources.

    • AI quickstarts

      Focused AI use cases designed for fast deployment on Red Hat AI platforms.

    • No-cost AI training

      Foundational Red Hat AI training.

  • Featured resources

    • Red Hat OpenShift AI
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

Red Hat AI Factory with NVIDIA

Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.

Learn
  • Self-guided

    • Documentation

      Find answers, get step-by-step guidance, and learn how to use Red Hat products.

    • Learning paths

      Explore curated walkthroughs for common development tasks.

    • Guided learning

      Receive custom learning paths powered by our AI assistant.

    • See all learning
  • Hands-on

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

    • Interactive labs

      Learn by doing in these hands-on, browser-based experiences.

    • Interactive demos

      Click through product features in these guided tours.

  • Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics
  • Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
Build
  • Get started

    • Red Hat build of Podman Desktop

      A downloadable, local development hub to experiment with our products and builds.

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

  • Download products

    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products
  • Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset
  • References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
Community
  • Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions
  • Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github
  • Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

Join the Red Hat Developer program

Download Red Hat products and project builds, access support documentation, learning content, and more.

ConsoleDocsSupport Search
New For you

Recommended

We'll recommend resources you may like as you browse. Try these suggestions for now.

  • Product downloads
  • Cheat sheets
  • Red Hat Developer learning portal
  • Developer blog
  • E-books
  • Developer Sandbox
Log in

Get more with a Red Hat Developer account

  • Product downloads
  • Console access
  • Event registration
  • Training & trials
Explore more account benefitsLog in or register

A subscription may be required for some services.

Contact us

Best practices for successful DevSecOps

June 15, 2022
Ajmal Kohgadai Andy Oram
Related topics:
DevOpsDevSecOpsKubernetes
Related products:
Red Hat OpenShift

    In a recent Red Hat survey, summarized by our 2022 State of Kubernetes security report, a broad majority of the more than 300 correspondents reported that they are incorporating security into DevOps processes and pipelines, a practice called DevSecOps.

    This article draws on the report as well as a Red Hat white paper, How to automate DevSecOps in Red Hat OpenShift, to show the rate of DevSecOps adoption and the factors that we believe make it work well.

    The popularity of DevSecOps

    Securing containers and Kubernetes often requires multiple teams to collaborate across the application lifecycle. As applications move from dev and test to production runtime environments, new security use cases arise requiring different skill sets and responsibilities. At the build stage, for example, developers are often the primary guardians of security, ensuring that container images adhere to security best practices and catching fixable vulnerabilities early. The runtime phase introduces new attack vectors requiring a different set of security controls, such as identifying anomalous process execution indicative of a breach.

    To better understand the delineation of security responsibility, we asked survey respondents, "What role at your organization is most responsible for container and Kubernetes security?" Nearly two-thirds of the more than 300 respondents said that it was the role of DevOps (43%) or DevSecOps (19%). DevOps and DevSecOps are both roles that bridge different functions, which further underscores the need to collaborate across teams to properly protect containerized applications in Kubernetes.

    The responses show that modern organizations are well along the way to incorporating security into their DevOps pipelines. Only 16% of respondents assign primary responsibility to their security team, another 16% to operations, and 6% to developers.

    One surprise finding was how few respondents assign responsibility to the central IT security team for Kubernetes security. One way to explain the low percentage is by looking at what motivates container and Kubernetes adoption. Developers and DevOps teams are often the first to adopt container technologies, limiting them to the dev and test stages. This is done outside the purview of central IT governance (a workaround also known as shadow IT). To bridge the gap between the official security team and the developers, security tooling for container and Kubernetes must facilitate close collaboration among different teams—from developers to DevOps to operators to security—instead of perpetuating team isolation that can plague organizations with slow roll-outs and security vulnerabilities.

    Best practices for DevSecOps

    In the following subsections, we present suggestions for each of the three most common DevOps stages: build, deploy, and runtime.

    Build stage

    Here, your goal is to catch issues early so they don't become blockers later in the development life cycle:

    • Use a trusted, enterprise-grade private image registry and limit access.
    • Use minimalist base images.
    • Update base images and their dependencies when new versions are available.
    • Remove exploitable and nonessential software such as:
      • Package managers (apt, yum, apk)
      • Network tools and clients (curl, wget, netcat)
      • Unix shells, compilers, and debuggers
    • Scan the image registry regularly for known operating system, application, and language vulnerabilities.
    • Integrate image scanners with CI tools and build vulnerability awareness early, especially when there are severe policy violations.
    • Follow best practices for sensitive data:
      • Do not use secrets in a risky manner.
      • Do not store secrets unencrypted.
      • Do not use secrets as environmental variables.
      • Understand where and how secrets are being used to remove unnecessary exposure.
    • Make sure that builds break if they exceed the security risk threshold. This would include builds that:
      • Contain high severity, fixable vulnerabilities.
      • Have not been scanned recently, or at all.
      • Contain misconfigurations missed by a scanner, such as identity configurations or environment variables.

    Deploy stage

    This stage should automate a DevSecOps feedback loop and prioritize remediation:

    • Combine security-relevant data from the build stage with the deployment configuration to determine the security risk of each deployment, including:
      • Image vulnerabilities
      • Access to secrets, storage, etc.
      • Privileges and capabilities
      • Workload isolation, network exposure, and blast radius
    • Use a secrets management tool to protect sensitive data. Assess the privileges used by containers to keep them to a minimum viable set of capabilities.
    • Avoid deployments without resource limits unless absolutely necessary.
    • Annotate deployments with the name, email alias, or chat channel of the team responsible for the application.
    • Block risky deployments and alert the correct team for automated and streamlined remediation.

    Runtime stage

    By this stage, the pressing need is to prevent, detect, and contain runtime attacks:

    • Implement dynamic scanning to detect vulnerabilities in running containers.
    • Use behavioral baselining and process allow-listing to identify unusual runtime activity, such as:
      • Privilege escalation
      • Unauthorized network flows
      • Cryptomining
      • Malicious process execution or other exploits
    • Mitigate threats with Kubernetes-native controls:
      • Scaling to zero
      • Killing pods and restarting

    Further best practices

    We also recommend the following general practices:

    • Private, internal registries often offer greater security capabilities. Choose a registry that offers advanced access control and built-in vulnerability scanning.
    • Use trusted content. To start with, use resilient, minimalist base images to build your containers.
    • The security of your continuous integration (CI) build infrastructure is as important as your production environment. Implement security as code using CI/CD. Limit administrative access and allow only required network ingress.

    Conclusion

    Tools such as image scanners and registries can provide governance to projects and detect vulnerabilities. However, reducing risk from misconfigurations (such as when your containers run with root privileges) and runtime incidents requires processes and best practices that implement DevSecOps across the full application life cycle.

    Organizations experience security incidents across all phases: build, deploy, and runtime. Implementing and automating DevSecOps provides developer-friendly guardrails that can decrease user error at the build and deploy stages and protect workloads at runtime.

    Last updated: March 12, 2026

    Recent Posts

    • A day in the life of an NVIDIA H100 on Red Hat OpenShift 5

    • Migrate BuildConfigs to builds for Red Hat OpenShift with one plug-in install

    • Run Red Hat Enterprise Linux CoreOS on NVIDIA BlueField DPUs

    • Agent harness engineering: Separating model capabilities from enforcement

    • What's new for developers in Red Hat Enterprise Linux 10.3 and 9.9

    What’s up next?

    Getting GitOps e-book card

    Learn how to navigate the complex world of modern container-based software development and distribution with Getting GitOps: A Practical Platform with OpenShift, Argo CD, and Tekton.

    Download the e-book
    Red Hat Developers logo

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    Red Hat Developer

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility
    Ask AI