DevSecOps on a Budget: Building a Secure Development Pipeline Without Breaking the Bank

Robbie Thandi (Security Lead · Sonatype)

Security BSides London 2023 · Day 1 · Rookie Track

Overview

In the rapidly evolving landscape of software development, integrating security seamlessly into every stage of the development lifecycle – a practice known as DevSecOps – has become paramount. However, for startups and organizations operating with constrained budgets, the cost of commercial security solutions can be prohibitive, often diverting resources from other critical areas. This talk by Robbie Thandi, Security Lead at Sonatype, directly addresses this challenge, demonstrating how a robust and effective DevSecOps pipeline can be constructed using entirely open-source tools, thereby democratizing advanced security practices.

Watch on YouTube

Visual summary for DevSecOps on a Budget: Building a Secure Development Pipeline Without Breaking the Bank by Robbie Thandi
Visual summary for DevSecOps on a Budget: Building a Secure Development Pipeline Without Breaking the Bank by Robbie Thandi

Key moments

  1. 0:00 Introduction to DevSecOps and talk overview
  2. 3:00 Analyzing the high cost of commercial DevSecOps solutions
  3. 6:00 Implementing local SAST and secret scanning with open source
  4. 8:20 Managing third-party dependencies using open source SCA tools
  5. 11:50 Discussing the missing features and challenges of open source tools
  6. 14:20 Audience Q&A on cost analysis: commercial vs. open source
  7. 15:20 Audience Q&A on continuous threat modeling

DevSecOps on a Budget: Building a Secure Development Pipeline Without Breaking the Bank

Speakers: Robbie Thandi, Security Lead, Sonatype

Conference: BSides London

YouTube: https://www.youtube.com/watch?v=_Kj17kmeP7I

Overview

In the rapidly evolving landscape of software development, integrating security seamlessly into every stage of the development lifecycle – a practice known as DevSecOps – has become paramount. However, for startups and organizations operating with constrained budgets, the cost of commercial security solutions can be prohibitive, often diverting resources from other critical areas. This talk by Robbie Thandi, Security Lead at Sonatype, directly addresses this challenge, demonstrating how a robust and effective DevSecOps pipeline can be constructed using entirely open-source tools, thereby democratizing advanced security practices.

Thandi highlights the critical need for a "shift left" approach to security, advocating for the detection and remediation of vulnerabilities as early as possible in the Software Development Life Cycle (SDLC). This proactive strategy not only significantly reduces the cost and effort associated with fixing issues but also enhances the overall security posture of applications. The presentation meticulously details a practical framework, outlining specific open-source tools and methodologies applicable to the planning, coding, building, and testing phases, offering a compelling alternative to expensive commercial offerings like Snyk, which can cost thousands of dollars annually for a small team.

The core message resonates with any organization striving for enhanced security without breaking the bank. By leveraging the power of the open-source community, teams can implement comprehensive security measures, from threat modeling and secret scanning to static and dynamic analysis, ensuring that security is an integral, rather than an afterthought, component of their development process. While acknowledging the trade-offs inherent in open-source solutions—such as the absence of unified dashboards and dedicated support—Thandi provides a clear roadmap for achieving a high level of security maturity, making enterprise-grade DevSecOps accessible to all.

Background

▶ Watch: Introduction to DevSecOps and talk overview (0:00)

The foundational premise of modern software security is the "shift left" philosophy. This concept advocates for embedding security controls and testing at the earliest possible stages of the SDLC, rather than deferring them until the final testing or deployment phases. Robbie Thandi powerfully illustrates the financial and operational benefits of this approach through real-world examples. He recounts a client project where security checks were neglected during development. Upon project completion, a penetration test identified numerous vulnerabilities, necessitating the re-engagement of the development team to fix issues that would have been significantly cheaper and faster to address had they been caught earlier. This reactive approach resulted in increased costs and delays.

Another common scenario highlighted is the inadvertent exposure of sensitive data, such as an AWS API key, within a Git repository. Such an incident typically triggers a frantic response, requiring a complete rewrite of Git history and immediate key rotation—a time-consuming and disruptive process, even for experienced developers. Thandi argues that if tools like GitLeaks were integrated into the development workflow, such secrets would be detected and blocked at the commit stage, preventing exposure and saving valuable time and resources.

DevSecOps is defined as creating a shared responsibility for security by embedding it directly into the SDLC. The traditional DevOps lifecycle encompasses planning, coding, building, testing, releasing, deploying, operating, and monitoring. Thandi's talk focuses specifically on integrating automated security testing into the initial four stages: planning, coding, building, and testing. This integration is designed to make security an intrinsic part of development, reducing the overhead for developers and facilitating earlier detection and remediation of flaws.

A significant barrier to adopting comprehensive DevSecOps practices, especially for startups and smaller organizations, is the prohibitive cost of commercial solutions. Thandi cites Snyk as an example, noting that their full package can cost $75 per user per month. For a modest 10-developer startup, this translates to an annual expenditure of $9,000. Many startups, with their already tight budgets, struggle to justify such costs, often prioritizing other SaaS products essential for their development cycle. The speaker proposes that the solution lies in harnessing the vast ecosystem of open-source software, which offers a robust and cost-effective alternative to build out these critical security systems. The open-source community provides a wealth of both grassroots, community-driven projects and tools supported by larger companies, making it a powerful resource for budget-conscious teams.

Key Findings

▶ Watch: Implementing local SAST and secret scanning with open source (6:00)

The central finding of Robbie Thandi's presentation is that a comprehensive and effective DevSecOps pipeline can be built and maintained entirely using open-source tools, providing a viable and budget-friendly alternative to expensive commercial solutions. This approach enables organizations, particularly startups and those with limited financial resources, to implement robust security measures across critical stages of the SDLC without incurring significant licensing costs.

Thandi demonstrates that the "shift left" principle, which emphasizes catching vulnerabilities early, can be fully realized through a strategic integration of open-source tools. This methodology not only reduces the financial burden of security but also significantly decreases the time and effort required to fix security flaws, improving overall software quality and resilience.

Specifically, the talk identifies and recommends a suite of open-source tools tailored for each stage of the development lifecycle:

  • Planning Stage: Tools and frameworks such as STRIDE for threat modeling, the OWASP Threat Modeling Cheat Sheet for guidance, and Threat Dragon for diagram generation help teams proactively identify and plan for potential security risks.
  • Coding Stage: Local development environments can be secured with GitLeaks for real-time secret scanning in pre-commit hooks and Semgrep open source for Static Analysis Security Testing (SAST) directly within the Integrated Development Environment (IDE), providing immediate feedback to developers.
  • Build Stage: In the Continuous Integration/Continuous Delivery (CI/CD) pipeline, GitLeaks and Semgrep open source are again leveraged for secret scanning and SAST, respectively. For Software Composition Analysis (SCA), CycloneDX is used to generate a Software Bill of Materials (SBOM), which can then be analyzed by Dependency-Track (for a dashboard interface) or Dep Scan (for command-line integration in GitHub Actions).
  • Testing Stage: Once a build artifact is deployed to a staging environment, OWASP ZAP provides Dynamic Application Security Testing (DAST) capabilities, simulating real-world attacks to uncover vulnerabilities before production.

While acknowledging the substantial cost savings, Thandi also transparently addresses the inherent trade-offs of an open-source-centric approach. These include the lack of a single, integrated dashboard to aggregate findings from disparate tools, increased management overhead due to dealing with multiple, independent components, and reliance on community support rather than guaranteed vendor service level agreements. Despite these challenges, the presentation firmly establishes that the benefits—particularly the accessibility and cost-effectiveness—make open-source DevSecOps a powerful and practical strategy for a wide range of organizations.

Technical Deep Dive

▶ Watch: Managing third-party dependencies using open source SCA tools (8:20)

Robbie Thandi’s technical deep dive systematically unpacks how open-source tools can be integrated into each of the early SDLC stages: Planning, Coding, Build, and Testing. This section provides a granular view of the recommended tools and their application, demonstrating a pragmatic pathway to building a secure development pipeline on a budget.

Planning Stage: Laying the Foundation

The planning stage, while the least automatable, is arguably the most critical for establishing a strong security posture. It involves making foundational technical decisions that ripple through the entire development process. The primary strategy here is threat modeling: analyzing potential threats and devising mitigation plans.

Thandi recommends several open-source resources for this phase:

  • STRIDE: This widely recognized threat modeling framework helps identify different types of attacks by categorizing them into Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, and Elevation of Privilege. By thinking through these categories, teams can systematically identify relevant threats to their system.
  • OWASP Threat Modeling Cheat Sheet: An invaluable guide from the OWASP project, offering practical advice on how to generate effective threat models.
  • Threat Dragon: An open-source tool that facilitates the actual generation and maintenance of threat model diagrams. This visual representation helps teams understand and track potential attack surfaces and mitigation strategies.

Crucially, Thandi emphasizes the importance of developer involvement at this stage. Developers, being the primary code writers, must understand the threats they are protecting against and the rationale behind security measures. Engaging them early fosters buy-in and a shared security responsibility.

Coding Stage: Securing the Local Environment

The coding stage focuses on the developer's local machine, before any code is pushed to a remote repository. The goal is to catch vulnerabilities as early as possible, preventing insecure code from ever entering version control. This involves both developer education and the integration of automated tools directly into development environments.

Key tools for this stage include:

  • GitLeaks: As demonstrated in the talk, GitLeaks is a powerful tool for secret scanning. It can be configured as a pre-commit hook to automatically scan outgoing commits for sensitive information like API keys, database credentials, or private keys. If a secret is detected, the commit is blocked, preventing it from being pushed to a remote repository. This proactive measure saves significant time and effort compared to remediating leaked secrets post-push (which involves Git history rewriting and key rotation).
  • Semgrep open source: This tool provides Static Analysis Security Testing (SAST) capabilities that can be integrated directly into an Integrated Development Environment (IDE). Semgrep scans code for common vulnerabilities and adherence to secure coding guidelines as the developer writes it. It can highlight issues directly in the editor, providing immediate feedback, vulnerability descriptions, and advice on how to fix them. This real-time feedback loop empowers developers to correct flaws before they become entrenched.

Build Stage: Reinforcing Security in the Pipeline

Once code is committed and pushed to a repository, the build stage takes over, typically within a CI/CD pipeline. Here, security checks are enforced at a pipeline level, preventing developers from bypassing local checks (e.g., using --no-verify). These checks are often run on pull request (PR) open to alert the team to any new security issues before they are merged into the main branch.

The build stage incorporates:

  • Secret Scanning: Similar to the coding stage, GitLeaks can be run as part of the CI/CD pipeline to ensure no secrets inadvertently made it past local checks or were introduced by other means.
  • Static Analysis Security Testing (SAST): Semgrep open source is again recommended for SAST within the pipeline. This white-box testing method analyzes source code without executing it, identifying common vulnerabilities. While highly effective for catching "low-hanging fruit," Thandi cautions about the challenges of SAST, particularly the prevalence of false positives and numerous warnings. Effective management of ignores and exclusions is crucial to prevent SAST from becoming a bottleneck and frustrating developers. When used in a GitHub Action, Semgrep open source provides textual output directly in the PR, though it lacks the integrated dashboards of commercial alternatives.
  • Software Composition Analysis (SCA): This is a vital component for managing the security of third-party dependencies and open-source components. SCA tools track and analyze all components brought into a project—including direct and indirect (transitive) dependencies—to identify known vulnerabilities and exploits within them. Thandi illustrates its importance with an example from a Node.js project where a forgotten update to a peer dependency led to the accidental installation of an unmaintained auth package (downloaded 1,500 times, not updated for 11 years), which was only caught in the staging environment.

For implementing SCA with open-source tools, Thandi suggests:

  • CycloneDX: An open standard used to generate a Software Bill of Materials (SBOM). An SBOM is a complete, formally structured list of components, libraries, and modules required to build a given software or product.
  • Dependency-Track: Once an SBOM is generated with CycloneDX, it can be uploaded to Dependency-Track. This tool provides a polished application with a nice dashboard for tracking and analyzing component vulnerabilities. The downside is that it requires pre-installing and managing an instance of Dependency-Track.
  • Dep Scan: For quicker setup and less management overhead, Dep Scan can be run as a GitHub Action. It's easy to configure and continuously checks for vulnerabilities, providing warnings directly in GitHub PRs, though without a dedicated dashboard.

Testing Stage: Dynamic Validation in Staging

The final stage discussed is testing, which targets the build artifact once it has been deployed to a staging or testing environment. The objective here is to simulate real-world threats and attacks that malicious users might attempt in a production environment.

  • Dynamic Application Security Testing (DAST): This method involves testing an application in its running state, typically by sending various inputs and analyzing the responses for security flaws.
  • OWASP ZAP (Zed Attack Proxy): Thandi recommends OWASP ZAP as a leading open-source DAST tool. ZAP can actively scan web applications for vulnerabilities like SQL injection, cross-site scripting (XSS), and broken authentication. It provides alerts and detailed reports on identified issues.

DAST scans are typically more computationally intensive and time-consuming than SAST. Therefore, Thandi suggests that they might not be run on every PR but rather on a less frequent schedule, such as overnight runs, to avoid slowing down the development cycle. It is also best practice to set up a separate environment for DAST to prevent these tests from impacting the performance of the primary staging environment.

By combining these open-source tools across the planning, coding, build, and testing stages, organizations can construct a robust, multi-layered security pipeline that aligns with DevSecOps principles and the "shift left" philosophy, all while adhering to a tight budget.

Demo / Proof of Concept

▶ Watch: Audience Q&A on cost analysis: commercial vs. open source (14:20)

While Robbie Thandi's talk did not feature a live, interactive demo or a dedicated "Proof of Concept" section, he effectively illustrated the functionality and benefits of the discussed open-source tools through a series of conceptual examples and visual aids. These demonstrations showcased how the tools operate and the kind of output developers and security teams can expect.

For instance, to demonstrate the effectiveness of early secret detection, Thandi presented a screenshot of a GitLeaks integration. This visual depicted a scenario where a commit containing an AWS API key was automatically rejected, highlighting how the tool prevents sensitive information from ever reaching a remote repository. This served as a clear example of GitLeaks working in a pre-commit hook on a developer's machine.

Similarly, the integration of Semgrep open source into an IDE was illustrated with a screenshot showing a vulnerability highlighted directly within the code editor. This visual emphasized Semgrep's ability to provide real-time feedback, complete with vulnerability descriptions and suggested fixes, allowing developers to address issues immediately.

In the planning phase, Thandi displayed an example of a Threat Dragon diagram, demonstrating how the tool helps visualize and manage threat models, providing a structured approach to identifying potential security risks. For Software Composition Analysis (SCA), he referenced a detailed dashboard from Dependency-Track, showcasing how an SBOM generated by CycloneDX can be used to track and analyze third-party component vulnerabilities within a polished interface. He also discussed the alternative, Dep Scan, as a command-line tool for GitHub Actions, emphasizing its ease of setup for quick vulnerability checks without a dedicated UI.

Finally, for the testing stage, a screenshot of alerts generated by OWASP ZAP was presented, illustrating the output of Dynamic Application Security Testing (DAST). These alerts provided an example of how ZAP identifies and reports vulnerabilities in a deployed application.

Beyond these visual examples, Thandi also shared a practical, real-world scenario from a project where a Node.js application inadvertently pulled in an unmaintained auth package (downloaded 1,500 times, not updated for 11 years) due to a forgotten peer dependency update. This issue was only caught in the staging environment, underscoring the critical need for robust SCA in the build pipeline. These examples, though not live demos, effectively communicated the capabilities of the open-source tools and the value they bring to a budget-conscious DevSecOps strategy.

Defensive Implications

▶ Watch: Audience Q&A on continuous threat modeling (15:20)

The insights shared by Robbie Thandi offer actionable defensive implications for organizations aiming to bolster their security posture without prohibitive costs. The overarching strategy is to embrace a holistic and "shift left" approach, integrating security throughout the SDLC using open-source tools.

  1. Prioritize Threat Modeling Early and Continuously: Organizations should make threat modeling a mandatory part of their planning phase for new projects and features. Utilizing frameworks like STRIDE and tools like OWASP Threat Modeling Cheat Sheet and Threat Dragon enables teams to proactively identify potential attack vectors and design security controls from the outset. This forward-thinking approach is far more cost-effective than remediating vulnerabilities post-deployment. Threat models should be living documents, updated as the product evolves.
  1. Implement Automated Local Security Checks: Developers should be equipped with and encouraged to use tools that perform security checks on their local machines. Integrating GitLeaks as a pre-commit hook prevents secrets (e.g., API keys, credentials) from ever being pushed to version control, mitigating a common and high-impact security incident. Similarly, embedding Semgrep open source into IDEs provides real-time Static Analysis Security Testing (SAST) feedback, allowing developers to fix vulnerabilities as they write code, drastically reducing the cost of remediation.
  1. Enforce Security in the CI/CD Pipeline: The build stage is a crucial enforcement point. All pull requests should automatically trigger pipeline-level security scans. This includes running GitLeaks for secret scanning and Semgrep open source for SAST to catch issues that might bypass local checks. Furthermore, Software Composition Analysis (SCA) is indispensable. Teams should use CycloneDX to generate an SBOM and then analyze it with tools like Dependency-Track (for comprehensive dashboards) or Dep Scan (for lightweight GitHub Action integration) to identify and manage vulnerabilities in third-party and open-source dependencies. This protects against supply chain attacks and ensures component hygiene.
  1. Conduct Dynamic Testing in Staging Environments: Once applications are deployed to staging, Dynamic Application Security Testing (DAST) should be performed. OWASP ZAP is an excellent open-source choice for simulating real-world attacks against the running application. While DAST can be computationally intensive, scheduling it strategically (e.g., overnight runs) and utilizing separate testing environments minimizes impact on development velocity. This step is crucial for identifying vulnerabilities that only manifest at runtime.
  1. Cultivate a Security-Aware Culture: Technical solutions are only as effective as the people using them. Organizations must invest in educating developers on secure coding practices, the importance of security tools, and the rationale behind security policies. Fostering a shared responsibility for security, as central to DevSecOps, increases developer buy-in and ensures that security becomes an intrinsic part of their workflow, not an impediment.
  1. Understand and Manage Trade-offs: While open-source tools offer significant cost savings, defenders must be aware of the trade-offs: the absence of a single, unified dashboard for all security findings, the increased overhead of managing multiple distinct tools, and reliance on community support rather than dedicated vendor assistance. Teams need to factor in the time and expertise required to integrate, configure, and maintain these tools. For smaller teams, the initial setup effort might be higher, but the long-term savings often outweigh this. For larger organizations, a hybrid approach or considering commercial tools might become more viable as scale increases.

By implementing these defensive strategies, organizations can build a robust, cost-effective, and proactive security pipeline, significantly reducing their attack surface and enhancing their overall resilience against cyber threats.

Key Takeaways

  • Shift Left for Cost-Effectiveness: Implementing security measures early in the Software Development Life Cycle (SDLC) drastically reduces the cost and effort of fixing vulnerabilities compared to detecting them later.
  • Open Source Enables Budget-Friendly DevSecOps: A comprehensive DevSecOps pipeline, including threat modeling, secret scanning, SAST, SCA, and DAST, can be built entirely using open-source tools, making advanced security accessible to budget-constrained teams.
  • Automate Security at Every Stage: Integrate tools like GitLeaks, Semgrep open source, CycloneDX, Dependency-Track/Dep Scan, and OWASP ZAP into planning, coding, build, and testing phases to automate vulnerability detection and enforcement.
  • Threat Modeling is Foundational: Proactive threat identification using frameworks like STRIDE and tools like Threat Dragon is crucial for designing secure systems from the ground up, with developer involvement being key.
  • Acknowledge and Manage Open Source Trade-offs: While free, open-source solutions often lack integrated dashboards, require managing multiple dependencies, and rely on community support, necessitating careful planning and resource allocation for integration and maintenance.
  • Protect Against Supply Chain Risks: Software Composition Analysis (SCA) using SBOMs (e.g., CycloneDX) and analysis tools (e.g., Dependency-Track) is vital for tracking and securing third-party dependencies, mitigating critical software supply chain vulnerabilities.

About the Speaker(s)

Robbie Thandi is a Security Lead at Sonatype, a company specializing in software supply chain automation and intelligence. In his role, Thandi focuses on the rapid deployment of DevSecOps environments for various short-term projects. Additionally, he heads up the security initiatives for Sonatype during his off-project time, demonstrating a deep commitment to internal security posture. His experience includes working with numerous startups in a consulting capacity, giving him firsthand insight into the budget constraints and unique challenges faced by smaller organizations when it comes to implementing robust security solutions. Thandi's expertise lies in practical, cost-effective security strategies that empower development teams to integrate security seamlessly into their workflows.

Reviews

Dr. Zero (Offensive Security Researcher) — WEAK

This is a 101-level AppSec primer that strings together GitLeaks, Semgrep, and OWASP ZAP and calls it a presentation. It’s competent for a junior audience, but it’s essentially an oral reading of a 2019 Medium post. If your development team doesn't already know to scan for secrets in pre-commit, you need an intervention, not a conference talk.

Heather Calloway (CISO) — SOLID

This is a competent, well-executed primer on building a baseline DevSecOps pipeline using free tools like Semgrep and GitLeaks. It is a highly practical survival guide for cash-strapped startups, though enterprise leaders must weigh the hidden headcount costs of managing fragmented infrastructure.

→ Top-rated talks at Security BSides London 2023

All talks from Security BSides London 2023