SlideShare a Scribd company logo
Continuous Security Testing in a
DevOps World
About Me
• Stephen de Vries
– CTO Continuum Security
– 70% Security Consultant – 30% Developer
– Author of BDD-Security Project
– (Ex) Co-founder of OWASP Java Project
– @stephendv
Agile:
• Small incremental changes
• Fast feedback from tests
• Fast feedback from users
• Easily adapts to change
• Lower risk of project failure
Bottleneck between “Shippable” and
“Deployed”
Change
Developers
• Value faster incremental changes
• Automated testing
Operations
• Value stability
• Manual processes
• Manual testing
Dev
Ops
Business value:
Faster
Culture Tools
• Systems view
• Accelerate feedback loops
• Trust & Accountability
• Communication
• Version control
• Automated deployment
• Automated Configuration
• Automated testing
Continuous Delivery
Agile
Plan/Code/Build/Test
Continuous Integration
Int. Test Delivery
Continuous Deployment
Deploy
DevOps
Pre-prod ProdDev
• Requirements as stories
• Unit testing
• Automated Functional testing
• Auto. Config + deploy
• Auto. Acceptance testing
• Monitoring
• Easy rollback
The DevOps challenge to security:
• As DevOps we understand the process of built, test and deploy
• We’ve largely automated this process in a delivery pipeline
• We deploy to production multiple times per day
How can we do this securely?
Continuous Security Testing in a Devops World #OWASPHelsinki
• Dead documents
• Reliance on manual processes
• Tools don’t fit the deployment
pipeline
Traditional Security Approach
?
?
How can we provide security at DevOps speed?
Security is not special
Don’t add security…
…make it disappear
What can security learn from Agile/CD/DevOps?
• Security goals must be driven by the business and must be clearly stated
• Collaboration and communication means exposing your processes
• Do it well enough and there is no “them”
“Never send a human to do a machine’s job” – Agent Smith
• Record manual security tests for automation
• Automate scanning process
• Automated tests are the security requirements
First attempt:
@Test
public void change_session_ID_after_login() {
driver.get("http://localhost:9110/ropeytasks/user/login");
Cookie preLoginSessionId = getSessionId("JESSSIONID");
login("bob", "password");
Cookie afterLoginSessionId = getSessionId("JESSSIONID");
assertThat(afterLoginSessionId.getValue(),
not(preLoginSessionId.getValue()));
}
public void login(String u, String p) {
driver.findElement(By.id("username")).clear();
driver.findElement(By.id("username")).sendKeys(u);
driver.findElement(By.id("password")).clear();
driver.findElement(By.id("password")).sendKeys(p);
driver.findElement(By.name("_action_login")).click();
}
• Navigation logic is embedded in the test
• Selenium does not expose HTTP
• Excludes non-developers
Introducing BDD-Security
https://github.com/continuumsecurity/bdd-security
• Tests must be understandable by all stakeholders
• Behaviour Driven Development (BDD): JBehave
• Must be able to automate manual security testing
• Selenium + OWASP ZAP API + Nessus + …
• Must fit into dev workflow and CI/CD pipelines
• Runs in IDE, cmd line
• Runs in Jenkins
• Test results in JUnit wrapper + HTML
• The logic of the security tests should be independent from
navigation code
• Provide a baseline of ready-to-use security tests
Continuous Security Testing in a Devops World #OWASPHelsinki
Getting Started with BDD-Security
Integration with Jenkins
Real world challenges
• Not Anti-CSRF aware
• No difference between test error and test failure
• Test Maintenance
• Do sanity checks along the way
• Try to find generic solution
• E.g.: ISomeBehaviour
• CAPTCHA
• ICaptcha + deathbycaptcha.com
Old way:
New way:
Questions?
Resources:
• https://github.com/continuumsecurity
• OWASP ZAP Pure Java client API
• Resty-Burp RESTful API into Burp Suite
• Nessus Java Client
• SSLTest Java SSL analyser
• Related projects:
• Gauntlt BDD wrapper for sec tools: https://github.com/gauntlt/gauntlt
Thank you
@stephendv
stephendv@continuumsecurity.net

More Related Content

PPTX
Automating security tests for Continuous Integration
PDF
Continuous Security Testing - DevSecCon
PDF
T23 HTML5 Security Testing at Spotify
PDF
Vulnerabilities are bugs, Let's Test For Them!
PPTX
Continuous Security Testing with Devops - OWASP EU 2014
KEY
DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012
PPTX
DevOps & Security: Here & Now
PPTX
SecDevOps: The New Black of IT
Automating security tests for Continuous Integration
Continuous Security Testing - DevSecCon
T23 HTML5 Security Testing at Spotify
Vulnerabilities are bugs, Let's Test For Them!
Continuous Security Testing with Devops - OWASP EU 2014
DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012
DevOps & Security: Here & Now
SecDevOps: The New Black of IT

What's hot (20)

PDF
Automated Security Testing
PDF
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...
PDF
Devops, Secops, Opsec, DevSec *ops *.* ?
PDF
SecDevOps - The Operationalisation of Security
PPTX
Hacker Proof web app using Functional tests
PDF
SecDevOps
PPTX
DevSecCon London 2017: when good containers go bad by Tim Mackey
PDF
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
PDF
DevSecCon London 2017: Hands-on secure software development from design to de...
PPTX
Security & DevOps- Ways To Make Sure Your Apps & Infrastructure Are Secure
PDF
DevSecOps: What Why and How : Blackhat 2019
PPTX
Integrating Security into DevOps
PPTX
DevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly Davidoff
PPTX
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
PDF
DevSecCon Tel Aviv 2018 - Value driven threat modeling by Avi Douglen
PDF
The Seven Habits of Highly Effective Puppet Users - PuppetConf 2014
PPTX
Continuous Delivery
PDF
DevSecOps: Taking a DevOps Approach to Security
PPT
Automating security test using Selenium and OWASP ZAP - Practical DevSecOps
PPTX
DevSecOps
Automated Security Testing
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...
Devops, Secops, Opsec, DevSec *ops *.* ?
SecDevOps - The Operationalisation of Security
Hacker Proof web app using Functional tests
SecDevOps
DevSecCon London 2017: when good containers go bad by Tim Mackey
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
DevSecCon London 2017: Hands-on secure software development from design to de...
Security & DevOps- Ways To Make Sure Your Apps & Infrastructure Are Secure
DevSecOps: What Why and How : Blackhat 2019
Integrating Security into DevOps
DevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly Davidoff
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
DevSecCon Tel Aviv 2018 - Value driven threat modeling by Avi Douglen
The Seven Habits of Highly Effective Puppet Users - PuppetConf 2014
Continuous Delivery
DevSecOps: Taking a DevOps Approach to Security
Automating security test using Selenium and OWASP ZAP - Practical DevSecOps
DevSecOps
Ad

Viewers also liked (19)

PPTX
Continuous and Visible Security Testing with BDD-Security
PDF
AppSec Survey 2.0 Fine-Tuning an AppSec Training Program Based on Data
PDF
Pythonista も ls を読むべきか?
PPTX
The Journey to DevSecOps
PDF
Agile Secure Software Development in a Large Software Development Organisatio...
PDF
Continous Integration of (JS) projects & check-build philosophy
PDF
Rugged DevOps: Bridging Security and DevOps
PPTX
DevOps AppSec Pipeline Velcocity NY 2015
PPTX
Security testautomation
PPTX
Cybersecurity by the numbers
PPTX
Threat Modeling And Analysis
PDF
Building Risk Management into Enterprise Architecture
PDF
Integración contínua con Jenkins
ODP
OWASP WTE - Now in the Cloud!
PDF
Just Enough Threat Modeling
PDF
New Farming Methods in the Epistemological Wasteland of Application Security
PDF
Real World Application Threat Modelling By Example
PPTX
Matt carroll - "Security patching system packages is fun" said no-one ever
PDF
Nick Drage & Fraser Scott - Epic battle devops vs security
Continuous and Visible Security Testing with BDD-Security
AppSec Survey 2.0 Fine-Tuning an AppSec Training Program Based on Data
Pythonista も ls を読むべきか?
The Journey to DevSecOps
Agile Secure Software Development in a Large Software Development Organisatio...
Continous Integration of (JS) projects & check-build philosophy
Rugged DevOps: Bridging Security and DevOps
DevOps AppSec Pipeline Velcocity NY 2015
Security testautomation
Cybersecurity by the numbers
Threat Modeling And Analysis
Building Risk Management into Enterprise Architecture
Integración contínua con Jenkins
OWASP WTE - Now in the Cloud!
Just Enough Threat Modeling
New Farming Methods in the Epistemological Wasteland of Application Security
Real World Application Threat Modelling By Example
Matt carroll - "Security patching system packages is fun" said no-one ever
Nick Drage & Fraser Scott - Epic battle devops vs security
Ad

Similar to Continuous Security Testing in a Devops World #OWASPHelsinki (20)

PPTX
Testing ASP.NET - Progressive.NET
PDF
Intro to Selenium UI Tests with pytest & some useful pytest plugins
PDF
Secure all things with CBSecurity 3
PDF
Owasp tds
PDF
Testing mit Codeception: Full-stack testing PHP framework
PPT
Code review for secure web applications
PPTX
Testing Ext JS and Sencha Touch
PDF
Automated acceptance test
PDF
Secure DevOps: A Puma's Tail
PPTX
Agile methodologies based on BDD and CI by Nikolai Shevchenko
PDF
DevSecOps: Let's Write Security Unit Tests
PDF
Security automation simplified: an intro to DIY security automation
PDF
Your Last manual Assessment
PPTX
Null meet Code Review
PPTX
Software Development in the Age of Breaches
PPTX
Mobile developer is Software developer
PDF
Building security into the pipelines
PPTX
Protractor Tutorial Quality in Agile 2015
PDF
Automated interactive testing for i os
PDF
7.1. SDLC try me to implenment
Testing ASP.NET - Progressive.NET
Intro to Selenium UI Tests with pytest & some useful pytest plugins
Secure all things with CBSecurity 3
Owasp tds
Testing mit Codeception: Full-stack testing PHP framework
Code review for secure web applications
Testing Ext JS and Sencha Touch
Automated acceptance test
Secure DevOps: A Puma's Tail
Agile methodologies based on BDD and CI by Nikolai Shevchenko
DevSecOps: Let's Write Security Unit Tests
Security automation simplified: an intro to DIY security automation
Your Last manual Assessment
Null meet Code Review
Software Development in the Age of Breaches
Mobile developer is Software developer
Building security into the pipelines
Protractor Tutorial Quality in Agile 2015
Automated interactive testing for i os
7.1. SDLC try me to implenment

Recently uploaded (20)

PPTX
QR Codes Qr codecodecodecodecocodedecodecode
PPTX
Funds Management Learning Material for Beg
PPTX
innovation process that make everything different.pptx
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
DOCX
Unit-3 cyber security network security of internet system
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PDF
The Internet -By the Numbers, Sri Lanka Edition
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PDF
Triggering QUIC, presented by Geoff Huston at IETF 123
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PPTX
international classification of diseases ICD-10 review PPT.pptx
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
QR Codes Qr codecodecodecodecocodedecodecode
Funds Management Learning Material for Beg
innovation process that make everything different.pptx
Tenda Login Guide: Access Your Router in 5 Easy Steps
Unit-3 cyber security network security of internet system
RPKI Status Update, presented by Makito Lay at IDNOG 10
Cloud-Scale Log Monitoring _ Datadog.pdf
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
The Internet -By the Numbers, Sri Lanka Edition
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
Triggering QUIC, presented by Geoff Huston at IETF 123
Unit-1 introduction to cyber security discuss about how to secure a system
Slides PPTX World Game (s) Eco Economic Epochs.pptx
The New Creative Director: How AI Tools for Social Media Content Creation Are...
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Decoding a Decade: 10 Years of Applied CTI Discipline
PptxGenJS_Demo_Chart_20250317130215833.pptx
international classification of diseases ICD-10 review PPT.pptx
522797556-Unit-2-Temperature-measurement-1-1.pptx
Design_with_Watersergyerge45hrbgre4top (1).ppt

Continuous Security Testing in a Devops World #OWASPHelsinki

  • 1. Continuous Security Testing in a DevOps World
  • 2. About Me • Stephen de Vries – CTO Continuum Security – 70% Security Consultant – 30% Developer – Author of BDD-Security Project – (Ex) Co-founder of OWASP Java Project – @stephendv
  • 3. Agile: • Small incremental changes • Fast feedback from tests • Fast feedback from users • Easily adapts to change • Lower risk of project failure Bottleneck between “Shippable” and “Deployed”
  • 4. Change Developers • Value faster incremental changes • Automated testing Operations • Value stability • Manual processes • Manual testing
  • 5. Dev Ops Business value: Faster Culture Tools • Systems view • Accelerate feedback loops • Trust & Accountability • Communication • Version control • Automated deployment • Automated Configuration • Automated testing
  • 6. Continuous Delivery Agile Plan/Code/Build/Test Continuous Integration Int. Test Delivery Continuous Deployment Deploy DevOps Pre-prod ProdDev • Requirements as stories • Unit testing • Automated Functional testing • Auto. Config + deploy • Auto. Acceptance testing • Monitoring • Easy rollback
  • 7. The DevOps challenge to security: • As DevOps we understand the process of built, test and deploy • We’ve largely automated this process in a delivery pipeline • We deploy to production multiple times per day How can we do this securely?
  • 9. • Dead documents • Reliance on manual processes • Tools don’t fit the deployment pipeline Traditional Security Approach ? ?
  • 10. How can we provide security at DevOps speed?
  • 11. Security is not special Don’t add security… …make it disappear
  • 12. What can security learn from Agile/CD/DevOps? • Security goals must be driven by the business and must be clearly stated • Collaboration and communication means exposing your processes • Do it well enough and there is no “them” “Never send a human to do a machine’s job” – Agent Smith • Record manual security tests for automation • Automate scanning process • Automated tests are the security requirements
  • 14. @Test public void change_session_ID_after_login() { driver.get("http://localhost:9110/ropeytasks/user/login"); Cookie preLoginSessionId = getSessionId("JESSSIONID"); login("bob", "password"); Cookie afterLoginSessionId = getSessionId("JESSSIONID"); assertThat(afterLoginSessionId.getValue(), not(preLoginSessionId.getValue())); } public void login(String u, String p) { driver.findElement(By.id("username")).clear(); driver.findElement(By.id("username")).sendKeys(u); driver.findElement(By.id("password")).clear(); driver.findElement(By.id("password")).sendKeys(p); driver.findElement(By.name("_action_login")).click(); } • Navigation logic is embedded in the test • Selenium does not expose HTTP • Excludes non-developers
  • 16. • Tests must be understandable by all stakeholders • Behaviour Driven Development (BDD): JBehave • Must be able to automate manual security testing • Selenium + OWASP ZAP API + Nessus + … • Must fit into dev workflow and CI/CD pipelines • Runs in IDE, cmd line • Runs in Jenkins • Test results in JUnit wrapper + HTML • The logic of the security tests should be independent from navigation code • Provide a baseline of ready-to-use security tests
  • 18. Getting Started with BDD-Security
  • 20. Real world challenges • Not Anti-CSRF aware • No difference between test error and test failure • Test Maintenance • Do sanity checks along the way • Try to find generic solution • E.g.: ISomeBehaviour • CAPTCHA • ICaptcha + deathbycaptcha.com
  • 24. Resources: • https://github.com/continuumsecurity • OWASP ZAP Pure Java client API • Resty-Burp RESTful API into Burp Suite • Nessus Java Client • SSLTest Java SSL analyser • Related projects: • Gauntlt BDD wrapper for sec tools: https://github.com/gauntlt/gauntlt

Editor's Notes

  • #3: The most notable things are that after 9 years dedicated to security, I now consider myself a developer 50% of the time.But before we get there, let’s put this brave new devops world into perspective.
  • #4: The first place to start talking about a devops world is Agile, becaue it was with agile that..Because of manual processes in getting that shippable product tested in a staging environment and finally deployed into live.Bottleneck is there because of the processes in place during testing and deployment.
  • #5: Operations want a stable environment and a stable product and because of their reliance on manual configuration, migration and testing.
  • #6: Take the same agile culture in dev and apply it to operations.Break down the wall between dev and ops, and have our devs participate in the testing and deployment process; and we can have operations adopting automation and dev tools.
  • #7: As you ramp up from just Agile to Continuous Deployment, the amount of DevOps you’re doing needs to increase.Continuous delivery goes one step further than continuous integration in that you have a deliverable product. At the end of a Continuous delivery cycle you have a shippable product that can be delivered to staging environment or to user acceptance test environment. Devops starts becoming important when you move from CI to CD, because you need to delivery a working product in a realistic environment.
  • #8: We both understand what we need to delivery, and how to deliver it. In fact we understand it so well, that we’ve automated the delivery processes.
  • #9: The answer of a traditional security team, would be more along the lines of a continuous annoyment model.Answering no to everything:You can’t have security testing at the same tempo as you have deploysAnd you definitely can’t deploy to prod without security testing
  • #12: For me the most important realisation when moving from security to development is that security is not special.It is an emergent property of software, just like scalability and performance.When you want to build a scalable and performant application you have to think about those two requirements from the start. And security is no different.The same way you don’t add performance or scalability to an application, shouldn’t be adding security.
  • #13: And we don’t have to start from zero.Security can definitely learn a lot about how QA and acceptance tests are automated.Write both functional and non-functional security requirements as stories.Collaboration means exposing your internal processes
  • #15: We have recorded 2 distinct artifacts here: Our intention, AND the steps to verify that our intention has been implemented.Problems with this approach: Navigation logic is tightly coupled to the security test. Selenium does not allow you to inspect HTTP layer. Excludes non-developers.
  • #16: These limitations were what inspired the BDD-Security framework
  • #20: Because the framework is based on other standard technologies, it integrates quite easily with jenkins
  • #21: Sanity checking, show session management tests.