DevSecOps: What Why and How?

BlackHat USA 2019

07 August 2019

Video of the talk

Presentation: DevSecOps: What Why and How

AI Generated Summary

AI Generated Content Disclaimer

Note: This summary is AI-generated and may contain inaccuracies, errors, or omissions. If you spot any issues, please contact the site owner for corrections. Errors or omissions are unintended.

DevSecOps: What, Why and How? was presented at Black Hat USA 2019 as an expanded 50-slide edition of the talk. It keeps the core what-why-how frame and adds depth: a stage-by-stage pipeline breakdown, a language-specific tooling matrix, cloud-native DevSecOps across AWS, Azure, and GCP, sample labs for Ruby, PHP, Python, and Node.js, case studies from Fannie Mae and ABN Amro, and a closing section on securing the security toolchain itself.

Summary

The framing slides set the ground rules: the definition of DevSecOps as an effort to strive for “Secure by Default” by integrating security via tools, creating a Security as Code culture, and promoting cross-skilling; the case for urgency, that DevOps moves at rapid pace and traditional security cannot keep up; and the shift-left diagram showing one SQL injection caught at the developer or source code stage costing fewer man-days and no new deployments. A disclaimer added that the tool list is not exhaustive, no tool or vendor is endorsed, and every environment is different so ideas must be tested and validated first.

The pipeline walkthrough then went stage by stage. Pre-commit hooks filter access keys, tokens, and SSH keys on developer workstations using a pure regex approach, useful as defense in depth since developers can circumvent them. IDE security plugins give quick actionable pointers to stop basic security blunders. Secrets management tokenizes credentials otherwise stored in config files. Software composition analysis addresses the fact that the biggest portion of software is now third-party libraries, managed through PIP, NPM, Gems, go get, perl cpan, php packager and more. SAST provides white-box automated testing for low-hanging fruit like SQL injection and XSS, with manual oversight needed for false positives, while DAST adds black and grey-box coverage of deployment-specific issues; comparing DAST and SAST results weeds out false positives.

Production-side stages followed: security in Infrastructure as Code, where the environment is as secure as the base image and base images should be minimal and assessed for inherited vulnerabilities; compliance as code, converting industry standards like PCI DSS, HIPAA, and SOX or org-specific rules into version-controlled test cases; vulnerability management, normalizing report fatigue from multiple tools into a central dashboard integrated with bug tracking; alerting and monitoring to test control effectiveness (when the attack occurred, whether it was blocked, what access was achieved, what data moved); and asset monitoring, since inventories can no longer be static across on-premise and cloud.

The tools slides repeated the categories with open source preferred, and the criteria slide kept the admission bar: API or command line access, 15 minutes maximum execution, containerized or scriptable, minimal licensing limitations, machine-readable output, and configurable false positive handling. New in this edition were pipeline optimization (skip SCA for CSS-only changes, skip SAST for pom.xml or gradle-only changes, fast-track infra scans when IaC has zero changes, run the full pipeline periodically) and a language-specific matrix covering Java, PHP, Python, Ruby/Rails, .NET, and Node.js, followed by lab outlines for Ruby, PHP, Python, and NodeJS.

The cloud section mapped conventional infrastructure to AWS, Azure, and GCP equivalents across source code management, IaC, CI/CD servers, artifact repositories, staging and production servers, monitoring, firewalls, DLP, threat detection, vulnerability scanning, and secrets management, and repeated the cloud threat focus areas including IAM, asset inventory, billing, rogue and shadow admins, and forgotten resources. Culture got expanded treatment through the security champion model and a People, Process, Technology enabler framework, and the case study section brought in Fannie Mae and ABN Amro journeys alongside a negative cloud misconfiguration case. The closing “who watches the watcher” slide warned of DevSecOops, where an attacker controlling security tools or the build chain gains limitless power, and the final takeaways reminded the audience that security is everyone’s responsibility and DevSecOps is not a one size fit all.

Key Themes

Notable Points

  1. Definition slide: integrate security via tools, create a Security as Code culture, promote cross-skilling, all serving “Secure by Default”.
  2. Shift-left economics: one SQL injection found at the developer or source code stage means fewer man-day effort and no new deployments, caught through automated source code review.
  3. Pipeline stages: pre-commit hooks (regex filtering of access keys, tokens, SSH keys, defense in depth since developers can circumvent them), IDE plugins, secrets management, SAST and SCA pre-build, DAST post-build, manual web application pentesting in QA/staging, then IaC security, compliance as code, alerting and monitoring, and vulnerability management.
  4. SCA rationale: the biggest portion of software is now third-party libraries, managed by PIP, NPM, Gems, go get, perl cpan, php packager and more.
  5. SAST is white-box and catches low-hanging fruit like SQL injection and Cross-Site Scripting but needs manual oversight for false positives; DAST is black/grey-box for deployment-specific issues, and comparing DAST and SAST results weeds out false positives.
  6. Infrastructure and compliance: Docker and K8s environments are as secure as their base images, which should be minimal and assessed for inherited vulnerabilities; compliance as code turns PCI DSS, HIPAA, SOX, or org-specific rules into version-controlled test cases.
  7. Alerting and monitoring tests control effectiveness: when the attack occurred, whether it was blocked, what access level was achieved, and what data moved in and out; asset inventory cannot stay static with rapid provisioning on-premise and in cloud.
  8. Named tools: Git Hound and truffleHog (pre-commit hooks), CAT.net (IDE plugins), Keywhiz (secret management), ThreatSpec and Microsoft Threat Modeling Tool (threat modeling), Retire.js (SCA), Docker Bench for Security (infrastructure scan); preference given to open-source tools with no endorsement.
  9. Pipeline criteria: API or command line access, execution start to final output in 15 minutes max, containerized or scriptable, minimal licensing limitations (parallel scans or threads), machine-readable output (no stdout, yes to JSON/XML), configurable against false negatives and false positives.
  10. Optimization and language matrix: CSS-only changes skip SCA, pom.xml or gradle-only changes skip SAST, zero IaC changes skip or fast-track the infra scan, full pipeline still runs periodically; the matrix included FindSecBugs for Java, graudit for PHP, Bandit for Python, Brakeman for Ruby/Rails, DotNet Security Guard for .NET, and NodeJsScan with npm-check for Node, with SCA matches like OWASP Dependency-Check, Safety, Bundler-Audit, DotNET Retire, SafeNuGet, Retire.js, and ClearlyDefined.
  11. Cloud-native mapping across AWS, Azure, and GCP covered source code management, IaC, CI/CD servers, artifact repositories, staging and production servers, monitoring and alerts, firewalls, DLP, threat detection, vulnerability scanning, and secrets management, with cloud focus areas including IAM, asset inventory, billing, security groups, permissions, rogue and shadow admins, and forgotten resources.
  12. Closing arguments: Fannie Mae and ABN Amro case studies plus a negative cloud misconfiguration case; DevSecOops means an attacker controlling security tools or the build chain has limitless power, so apply secure configuration and patching policy to the toolchain; labs were sketched for Ruby, PHP, Python, and NodeJS; the enabler framework split into People (relationships, nurturing security-conscious individuals, solutions over blame), Process (security from the design or ideation phase, fix by priority, programmable controls, smooth governed feedback), and Technology (templatize per language and platform, adopt security to the DevOps flow), with champions one per team, internal bug bounties, and sponsored cross-skilling; security is everyone’s responsibility and mileage will vary.

Notable Quotes

“DevOps moves at rapid pace, traditional security just can’t keep up”

“We don’t write software’s, we build on frameworks”

“Biggest portion of software is now third party libraries”

“Environment is as secure as the base image”

“DevSecOops: If attacker controls security tools / build chain It has limitless power”

“Risk Acceptance Documentation should be the worst case scenario not your first bet”

“Security is everyone responsibility”

Social chatter