Introduction to the DevSecOps Guideline: Rules for Secure Development at the Process Level
Arunas Girdziusas
AI Cyber Tech Expert | Lecturer | Public Speaker | FinTech & Web3 Enthusiast | Blockchain & Crypto Advocate | Cyber Cloud Security | CISO | CTO | DPO
The number of cyber incidents is constantly increasing, which forces companies to respond to growing risks and makes DevSecOps practices mandatory in the development of IT products. At the same time, the clumsy implementation of measures not only does not guarantee the safety of development, but can cause the opposite effect. Let's figure out what and when you need to do to make development safe. The material is based on the webinar "DevSecOps: Organizing Secure Development at the Process Level".
DevOps vs DevSecOps
DevOps is a software development methodology that combines Development and Operations to build a more efficient and faster process for developing and delivering applications. The main goal of DevOps is to establish continuous communication between developers, testers, and administrators to make the product lifecycle seamless. DevSecOps can be considered as an update to the DevOps methodology: the approach does not imply the expansion of the classic DevOps pipeline, but only the integration of security methods into it. At the same time, according to DevSecOps, information security specialists are involved in the development cycle, who ensure that:
According to DevSecOps practices, you need to start thinking about development security at the planning stage of the future product. Otherwise, a situation may arise when, for example, the code is written perfectly, but in the technical design it is possible for users to assign themselves privileged rights, which completely eliminates any further security measures.
Differences Between DevOps and DevSecOps LifecyclesFollowing the DevSecOps methodology provides developers and businesses with a number of benefits.
DevSecOps Guideline
There are several approaches and best practices that define the norms for embedding DevSecOps principles in the development process. One of the basic tomes in this context is the OWASP DevSecOps Guideline , a community-driven guide that explains how to properly build a secure development process and identify any issues early. The main purpose of the rules described in the DevSecOps Guideline is to ensure the security of:
At the same time, each stage needs its own measures and approaches. There are seven stages:
Let's take a closer look at each of them.
Init Stage
Initialization is a stage where there is no code yet, but only the idea of the future product. According to the DevSecOps Guideline, at this stage, it is important to:
At the same time, it is important to understand the following:
Pre-commit stage
The main task in the Pre-commit phase is to check security at the stage when the code has been written but has not yet made it into version control. The DevSecOps Guideline dictates that this requires comprehensive measures.
Commit Stage
A commit is the stage when the code is rolled out to the public and made available to other users (even if the repository is closed and only a limited number of people have access to the code). In fact, at this stage, the code "glows" outward for the first time and can become a target of attackers, so the measures at the commit stage must be appropriate. It is important here:
Continuous Delivery Stage
According to OWASP and community experts, at the Continuous Delivery stage, the main practices for ensuring development security are:
It is worth noting here that ensuring API security in the context of the Continuous Delivery stage, before deployment, is aimed precisely at building a secure API configuration. That is, at this stage, it is necessary to foresee and design:
It is important to carry out such preparation at the Continuous Delivery stage, so that API vulnerability and insecurity problems do not begin to surface at stages when fixing such problems will cost more. In the context of the Misconfiguration assessment, the tasks are reduced to checking configuration files and containers for integrity, debugging, and compliance with risks that "something unnecessary" will get into the deploy — for example, a dirty registry, an outdated container, or even a random file. You shouldn't ignore this stage — you can hope that a successful deployment will confirm the absence of errors, but even a successful launch does not guarantee that problems will not make themselves felt later.
领英推荐
Deploy-CD Stage
From stage to stage, the level of development and the practices used are transformed. Measures for organizing secure development are also being transformed accordingly. Thus, at the deployment stage, the solution of two global arrays of tasks becomes a priority.
Runtime Stage
Even deploying an application and bringing it to the Runtime does not mean that you stop working to create conditions for secure development at the process level. Moreover, at this stage, when there are more potential threats (for example, work with critical and user data begins), the number of necessary measures also increases. According to the DevSecOps Guideline, by the time the application is launched, you must:
It should be understood that building such a layered defense, which is needed at the Runtime stage, requires a certain level of maturity from the company in terms of security and a significant reserve of resources, both financials and the time of specialists.
Governance Stage
In an ideal world, the application comes to the operational stage with a fully developed, configured and automated (in terms of the use of tools) security system. That is, all the measures and approaches described earlier must be implemented, adopted and work correctly. At the Governance stage, practices that are more related to process management are actually added. For example, according to the DevSecOps Guideline, at the management stage, you should:
In fact, the implementation of these measures closes the security loop and makes the entire development path understandable and transparent, and the product resilient to potential threats.
Inference
Creating the conditions for the development of secure applications is a continuous process that does not stop even after being rolled out to production and requires the constant involvement of both developers and other IT specialists. Moreover, the higher the stage of readiness of the product, the more effort must be put into protecting it from internal and external threats, as well as technical failures – measures must be commensurate with the increase in risks. At the same time, the main condition that determines the success of all efforts is the understanding of the importance of secure development at all levels, from the manager to the specialists in the field. Without implementing a culture of secure development, no amount of cost or effort will yield the expected results.
Continuous Integration (CI) and Continuous Deployment/Delivery (CD) are key practices in modern software development that aim to enhance collaboration, streamline development workflows, and deliver high-quality software efficiently.
?? Definitions:
?? Continuous Integration (CI) is a development practice where developers integrate code changes into a shared repository frequently. Each integration triggers automated builds and tests, allowing teams to detect and address integration issues early.
?? Continuous Deployment (CD): Involves automatically deploying every code change that passes the CI pipeline to production, making new features and updates available to users immediately.
?? Continuous Delivery (CD): Similar to continuous deployment but stops short of automatic production deployment. The code is ready for deployment at any time but requires manual approval.
?? CI/CD Pipeline:
A CI/CD pipeline represents the end-to-end process, from code changes to deployment. It typically includes stages like Plan, Code, Build, Test, Release, Deploy, Operate, and Monitor.
?? Benefits:
- Quick Feedback: Immediate detection and correction of code issues for faster development.
- Consistency: Automated processes ensure consistent builds and deployments.
- Speed to Market: Accelerates the delivery of new features and updates.
- Error Reduction: Automation minimizes manual errors in testing and deployment.
- Team Collaboration: Standardized workflows enhance collaboration across teams.
?? Best Practices:
- Automated Testing: Implement comprehensive automated testing for reliable code validation.
- Version Control: Utilize version control systems like Git for code management and collaboration.
- Continuous Integration: Regularly merge code changes into a shared repository to detect integration issues early.
- Incremental Deployments: Roll out updates incrementally to minimize potential impact and identify issues faster.
- Monitoring and Logging: Integrate robust monitoring and logging to detect and address issues in real-time.
Technical Architect & Founder | Expert in Bridging Business and Technology
5 个月Very Informative, Arunas