Select Page
by

Shashank Srivastava

|
last updated on July 26, 2023
Share

Security practices and principles of software development life cycle forms the basis of building a secure DevOps culture around continuous delivery using Spinnaker. Spinnaker is a powerful open-source continuous delivery platform that enables organizations to automate and streamline their software delivery processes.

This blog provides insights into two aspects of secure DevOps culture (and secured software delivery), one, the theory (that lays the foundation of setting up a practice) and second, the applied best practices using tools (wherever screenshots are provided in the blog below). 

The key aspects to building a secure DevOps culture with Spinnaker are:

Emphasize Security Awareness

Fostering a culture of security awareness within any organization starts with educating developers, operations teams, and other stakeholders about the importance of security in the software development process. Encourage everyone to take responsibility for security and understand the potential risks and vulnerabilities.

Security is not an afterthought instead it is part of everyday work and associated activities. 

A security-aware organization has security handbooks and associated internal certifications, which is mandatory for each employee. 

Implement and Integrate Secure Development Practices in your CI/CD process

There are certain security elements for coders or development teams, which they should care about. As secure coding best practices these elements include (but are not limited to):

  • Authorization mechanism
  • Authentication
  • Input validation
  • Output encoding

Also, the use of Secret Managers is very important. With extensions and plugins Spinnaker provides a secure way to use credentials, API keys, and other sensitive information required during the CI/CD workflow. This helps protect sensitive data and reduces the risk of accidental exposure. Some of the commonly used secret managers are Vault, Bitnami, Kubernetes Secrets or those offered by public cloud providers like AWS, Azure, or GCP. 

Refer this documentation in case you intend to implement and integrate Vault with Spinnaker

Integrate Security Testing within CI/CD pipelines

The use of tools like static application security testing (SAST), dynamic application security testing (DAST) and software composition analysis (SCA) are key to integrating security testing into your CI/CD pipelines. These tools can help identify vulnerabilities, code flaws, and open-source dependencies with known security issues. 

Out-of-the-box tool support for security scans and analysis for Spinnaker
Out-of-the-box tool support for security scans and analysis for Spinnaker

Integrating and automating security testing within your CI/CD pipelines ensures that security is continuously evaluated throughout the development process.

I highly recommend integrating security code analysis tools into your CI/CD pipeline to catch potential vulnerabilities early in the development process. Examples of such tools include jFrog Xray and Sonarqube.

Custom stage in a Spinnaker pipeline for static code analysis using Sonarqube
Custom stage in a Spinnaker pipeline for static code analysis using Sonarqube
Output of the Sonarqube custom stage in Spinnaker pipeline, post static code analysis
Output of the Sonarqube custom stage in Spinnaker pipeline, post static code analysis

The integration and automation of such analysis would result in significant acceleration in your software release process and you’ll be able to ship better software faster!

Leverage Infrastructure as Code (IaC)

Infrastructure as code (IaC) tools like Terraform or AWS CloudFormation seamlessly integrate with Spinnaker. You may want to use these tools to define, manage and provision your infrastructure in a repeatable, consistent and especially in an automated manner. Apply security best practices in your infrastructure code, such as secure network configurations, encryption, and least privilege access controls. This can particularly be done using configurations as a part of the infra provisioning stage within a CI/CD pipeline using Spinnaker.

Inbuilt Terraform custom stages for ready-use
Inbuilt Terraform custom stages for ready-use

I highly recommend to version control your infrastructure code to track changes and enable rollbacks if necessary. These configurations can be stored in Git and can be version controlled and audited as well. In case you have add-ons for audits, you can pull up audit reports to check who did what. You may even orchestrate a policy besides or before infra stage to bring in more governance into the workflow, in case you are using a policy agent on top of Spinnaker.

The policy agent gives you the flexibility of automating compliances, for example: Separation of duties – SOX. 

Implement Secured Advance Deployment Strategies

Various deployment strategies, including blue-green deployments, canary deployments, and rolling updates or progressive deployments are supported by Spinnaker, out of the box . You may want to choose deployment strategies that minimize downtime, eliminate end-user experience impact and provide a safety net for rollback if any issues arise. 

I highly recommend validating the deployment configurations security and ensuring proper security measures, such as encryption and access controls, are in place for your application and infrastructure. Again, these can be part of configurations stored in Git and parameterized in specific custom stages being used for infra provisioning, deployments, or rollbacks. 

Canary Deployment and along with Automated Canary Analysis for deployment verification
Canary Deployment and along with Automated Canary Analysis for deployment verification

Monitor and Respond to Security Events

This is mostly done post infra provisioning and deployment. To detect and respond to security events effectively you may have to implement robust monitoring, logging and notification mechanisms . You may want to use tools like:

  • Intrusion detection systems (IDS), 
  • Security information and event management (SIEM), 
  • Centralized log management platforms. 

Configure alerts and notifications for security incidents and establish incident response procedures to address any security breaches or vulnerabilities promptly. Upon a specific notification, you may either want to trigger a specific pipeline or automate a specific job using a custom stage within a pipeline. 

Continuous Learning and Improvement

Transformation doesn’t happen overnight, it’s a continuous process! Foster a culture of continuous learning and improvement by conducting regular security training, workshops, and knowledge-sharing sessions.

Encourage developers and operations teams to stay updated on the latest security practices, emerging threats, and industry trends. Encourage collaboration and feedback loops between security, development, and operations teams to improve overall security posture.

Automate Security Controls

Spinnaker has the capability to automate and seamlessly orchestrate security controls.

I highly recommend using features like deployment pipelines, triggers, and automated testing to enforce security policies, conduct vulnerability scans, and validate compliance requirements. 

Vast library of inbuilt automated Triggers for Spinnaker pipelines
Sample security policy for enforcing compliance and governance as a policy gate in Spinnaker pipeline
Sample security policy for enforcing compliance and governance as a policy gate in Spinnaker pipeline
Vast library of security and compliance specific policies for Spinnaker pipelines
Vast library of security and compliance specific policies for Spinnaker pipelines

Security control automation reduces the risk of human error and ensures consistency and repeatability across deployments and any such processes.

Security Governance, Compliance, Visibility and Audits

This  requires a combination of some of the above mentioned capabilities. Establish security governance processes to ensure compliance with relevant regulations, standards, and industry best practices. 

Regularly assess and audit your security practices to identify any gaps or vulnerabilities. Implement security controls that align with your organization’s security policies and industry-specific requirements. For example, highly regulated industries like Financial Services or Banks have specific mandates on security from the governing authorities. Some of these mandates directly impact the software delivery workflow or the CI/CD pipelines.

Policy Audit Dashboard for Spinnaker
Policy Audit Dashboard for Spinnaker
Visibility and Insights Dashboard for Spinnaker

Please refer to this post for specific examples and ways to achieve security governance and compliance. 

Collaboration and Communication

Collaboration and transparent communication between security teams, developers, and operations teams is the key to efficient transformation and improvement. 

Encourage cross-functional teams and enable them to work together to address security challenges. 

Contact our CI/CD or Spinnaker expert to learn more!

About OpsMx

Founded with the vision of “delivering software without human intervention,” OpsMx enables customers to transform and automate their software delivery processes. OpsMx builds on open-source Spinnaker and Argo with services and software that helps DevOps teams SHIP BETTER SOFTWARE FASTER.

Shashank Srivastava

As a Country Manager, Sales & Marketing (ROW) at OpsMx, Shashank is responsible for revenue for Europe, Middle East and Asia Pacific. He is also responsible for Product Marketing and Strategic Partnerships. Shashank brings in over 20 years of experience in selling and marketing technology / software solutions. Over these years he has led teams for marketing, sales, business development and field operations. He has successfully driven several strategic initiatives within startup environments.

Link

0 Comments

Submit a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.