SlideShare une entreprise Scribd logo
1  sur  23
If CI/CD have time for
security, so do you
Software development is speeding up; Waterfall to Agile to Continuous
Integration to Continuous Deployment. Do we still have time for security?
Who’s afraid of CI/CD?
• I hear from clients that they don’t have time for security because
they’re using Agile or CI/CD
• Is CI more hostile to security?
• If so, where does security fit?
Tenants of CI/CD
• Fast - Make automation, builds, setups, deploys, fast and automated
• Early - Do experiments, enable A/B testing, reduce sunk costs
• Often - Build and test all the time
• Responsive - Be reactive to your customers, know your changes won’t break the
app
This is not new!
Originally discussed in Grady Booch’s book
“Object Oriented Design” in 1991 pg. 209
CI/CD in a nutshell
• From Thoughtworks (http://www.thoughtworks.com/continuous-integration)
• Check in frequently
• Don’t check in broken code
• Don’t check in untested code
• Don’t check in when the build is broken
• Don’t go home after checking in until the system builds
Detect errors quickly
• Make changes all the time
• Build and run your tests quickly
• Trust your tests and know you didn’t break anything critical
• (You do have tests for everything critical, right?)
• Integrate quickly and often so you know where things break, when
you break them!
MartinFowler.com/bliki/FeatureBranch.html
Where does security fit?
• Fast - Make automation, builds, setups, deploys, fast and
automated
• Make security fast, automate, match security
testing to time available
• Early - Do experiments, enable A/B testing, reduce sunk
costs
• Get security into epics, stories, Threat Model, use
Training
• Often - Build and test all the time
• Don’t let security issues through, this breaks the build
• Responsive - Be reactive to your customers, know your changes won’t break the app
• Respond to security issues from your customers and team
Fast
• Security can’t hold back integration (deploys, testing, etc.)
• Match security assessments to time available
• Static Analysis on dev’s machines, during commit and integration
• Automated scanning on integration and test deployment
• Manual Penetration testing on major changes or periodically
(monthly, quarterly)
• Ask users about security
• Get security into stories, epics, requirements, use cases & misuse
cases
• Perform Threat Modeling and Threat Exercises so the team
understands attack surface and assets
• Train the team so they can participate in meaningful security
discussions
Early
Early - Threat Modeling
• Can help prioritize what to focus on and what to protect
• Helps ask the right questions
• Get everybody on the same page
• Align and prioritize assets and components
• Enumerates roles and attackers
Often
• In CI/CD “everything happens all the time” so too must security
• Don’t break the build
• Add security automation at every layer to help identify breaking builds
• Don’t introduce new security vulnerabilities!
• Trust the tools and training
• For God’s sake don’t introduce vulnerabilities that have been previously
fixed/reported
• Write regression tests for each issue that you can
Responsive
• Respond to security threats quickly
• Understand what an attack looks like and plug
the hole quickly
• Disclosure!
Listen to and respond to security researcher keep
them in the loop and fix the issue fast
more info at:
http://blog.securityinnovation.com/blog/2014/06/the-importance-of-vulnerability-disclosure-programs-and-bug-bounties.html
Frustratingly Fast and Responsive
• We deliver vulnerability information as we find it
• With one client using CI/CD we were getting fixes for our issues in
sub 1hr time
• They were also pushing out new features, and other bug fixes
• Screenshots on vulns as well as repro steps and videos were
paramount
Architect for security
• To go fast, it must be habit
• Centralize security components
• Reduce the likelihood of side effects
when changing code
• Increases confidence in fix
• Decreases downtime due to bugs and integration
• Fix an issue once, don’t see it again
Good initial candidates
• Some components to be centralized
• Input validation
• Authentication/authorization
• Data access (SQL and non-sql)
• Encoding
• Encryption
• Key Business Logic
• Code Complete (2nd Edition) still holds up amazingly well
http://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670
Automation
• You must know what you’re doing won’t break your build or
deployment
• Automation is key - if it can be automated, it should be
• Build Fast (near real-time) static analysis on dev’s machines to
help identify basic issues early
• SQLi detection (string concatenation)
• XSS detection (failure to encode on output)
• Command injection (concatenation/dangerous functions)
• Remote Code Execution (dangerous functions, known insecure libraries)
What does Security Testing look like?
• If you have the tools use automated testing (web app scanner)
as frequently as it will allow
• Scan at least monthly, weekly is better, daily is better still
• Pay attention to your results, consider them breaking the
build
• Tune your automation to reduce all false positives
• Do a rapid (manual) assessment frequently (monthly/quarterly), document new code and
focus testing on new components
• Do a deep (manual) assessment when appropriately (quarterly/annually), this will test
everything
What Does Work in Agile
• Allows you to react quickly to security vulnerabilities
• Tighten the feedback loop between you and your users
• React to vulnerabilities in your software and 3rd party software
• Quickly cut out vulnerable systems if necessary
• Have confidence in your solutions (with automated testing in place)
What Doesn't
• Cowboy coders with a license to check in and deploy
• Mistakes happen, checks aren’t always performed
• Code may be deployed for weeks or
months before a deep analysis is
performed
• Gives the Audit teams heart attacks
"Debugging is twice as hard as writing the code in the
first place. Therefore, if you write the code as cleverly
as possible, you are, by definition, not smart enough to
debug it." --Brian Kernighan
Story Time!
• One client checked in debug code which disabled CC# filtering
• Was discovered when a customer reported they could see their entire CC# instead of **** ****
**** 1234
• Fixed quickly, hours after discovery
• A test case was added to their suite and the issue hasn’t arisen again
• However! The numbers were stored in logs
• Luckily the developer who was at fault remembered this and the logs were flushed
• Another test case was added to check for this
Conclusions
• There is always time for security
• You can match your security tasks to the time you have available
• Trusting your developers to “do the right thing” isn’t as scary as you
might think
• Amazingly people react well when you trust them!
Contact me!
Kevin Poniatowski
Senior Security Instructor
Security Innovation
kponiatowski@securityinnovation.com
https://securityinnovation.com

Contenu connexe

Dernier

How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 

Dernier (20)

How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

If ci/cd teams have time for security, so do you

  • 1. If CI/CD have time for security, so do you Software development is speeding up; Waterfall to Agile to Continuous Integration to Continuous Deployment. Do we still have time for security?
  • 2. Who’s afraid of CI/CD? • I hear from clients that they don’t have time for security because they’re using Agile or CI/CD • Is CI more hostile to security? • If so, where does security fit?
  • 3. Tenants of CI/CD • Fast - Make automation, builds, setups, deploys, fast and automated • Early - Do experiments, enable A/B testing, reduce sunk costs • Often - Build and test all the time • Responsive - Be reactive to your customers, know your changes won’t break the app This is not new! Originally discussed in Grady Booch’s book “Object Oriented Design” in 1991 pg. 209
  • 4. CI/CD in a nutshell • From Thoughtworks (http://www.thoughtworks.com/continuous-integration) • Check in frequently • Don’t check in broken code • Don’t check in untested code • Don’t check in when the build is broken • Don’t go home after checking in until the system builds
  • 5. Detect errors quickly • Make changes all the time • Build and run your tests quickly • Trust your tests and know you didn’t break anything critical • (You do have tests for everything critical, right?) • Integrate quickly and often so you know where things break, when you break them! MartinFowler.com/bliki/FeatureBranch.html
  • 6. Where does security fit? • Fast - Make automation, builds, setups, deploys, fast and automated • Make security fast, automate, match security testing to time available • Early - Do experiments, enable A/B testing, reduce sunk costs • Get security into epics, stories, Threat Model, use Training • Often - Build and test all the time • Don’t let security issues through, this breaks the build • Responsive - Be reactive to your customers, know your changes won’t break the app • Respond to security issues from your customers and team
  • 7. Fast • Security can’t hold back integration (deploys, testing, etc.) • Match security assessments to time available • Static Analysis on dev’s machines, during commit and integration • Automated scanning on integration and test deployment • Manual Penetration testing on major changes or periodically (monthly, quarterly)
  • 8. • Ask users about security • Get security into stories, epics, requirements, use cases & misuse cases • Perform Threat Modeling and Threat Exercises so the team understands attack surface and assets • Train the team so they can participate in meaningful security discussions Early
  • 9. Early - Threat Modeling • Can help prioritize what to focus on and what to protect • Helps ask the right questions • Get everybody on the same page • Align and prioritize assets and components • Enumerates roles and attackers
  • 10. Often • In CI/CD “everything happens all the time” so too must security • Don’t break the build • Add security automation at every layer to help identify breaking builds • Don’t introduce new security vulnerabilities! • Trust the tools and training • For God’s sake don’t introduce vulnerabilities that have been previously fixed/reported • Write regression tests for each issue that you can
  • 11. Responsive • Respond to security threats quickly • Understand what an attack looks like and plug the hole quickly • Disclosure! Listen to and respond to security researcher keep them in the loop and fix the issue fast more info at: http://blog.securityinnovation.com/blog/2014/06/the-importance-of-vulnerability-disclosure-programs-and-bug-bounties.html
  • 12. Frustratingly Fast and Responsive • We deliver vulnerability information as we find it • With one client using CI/CD we were getting fixes for our issues in sub 1hr time • They were also pushing out new features, and other bug fixes • Screenshots on vulns as well as repro steps and videos were paramount
  • 13.
  • 14.
  • 15. Architect for security • To go fast, it must be habit • Centralize security components • Reduce the likelihood of side effects when changing code • Increases confidence in fix • Decreases downtime due to bugs and integration • Fix an issue once, don’t see it again
  • 16. Good initial candidates • Some components to be centralized • Input validation • Authentication/authorization • Data access (SQL and non-sql) • Encoding • Encryption • Key Business Logic • Code Complete (2nd Edition) still holds up amazingly well http://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670
  • 17. Automation • You must know what you’re doing won’t break your build or deployment • Automation is key - if it can be automated, it should be • Build Fast (near real-time) static analysis on dev’s machines to help identify basic issues early • SQLi detection (string concatenation) • XSS detection (failure to encode on output) • Command injection (concatenation/dangerous functions) • Remote Code Execution (dangerous functions, known insecure libraries)
  • 18. What does Security Testing look like? • If you have the tools use automated testing (web app scanner) as frequently as it will allow • Scan at least monthly, weekly is better, daily is better still • Pay attention to your results, consider them breaking the build • Tune your automation to reduce all false positives • Do a rapid (manual) assessment frequently (monthly/quarterly), document new code and focus testing on new components • Do a deep (manual) assessment when appropriately (quarterly/annually), this will test everything
  • 19. What Does Work in Agile • Allows you to react quickly to security vulnerabilities • Tighten the feedback loop between you and your users • React to vulnerabilities in your software and 3rd party software • Quickly cut out vulnerable systems if necessary • Have confidence in your solutions (with automated testing in place)
  • 20. What Doesn't • Cowboy coders with a license to check in and deploy • Mistakes happen, checks aren’t always performed • Code may be deployed for weeks or months before a deep analysis is performed • Gives the Audit teams heart attacks "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian Kernighan
  • 21. Story Time! • One client checked in debug code which disabled CC# filtering • Was discovered when a customer reported they could see their entire CC# instead of **** **** **** 1234 • Fixed quickly, hours after discovery • A test case was added to their suite and the issue hasn’t arisen again • However! The numbers were stored in logs • Luckily the developer who was at fault remembered this and the logs were flushed • Another test case was added to check for this
  • 22. Conclusions • There is always time for security • You can match your security tasks to the time you have available • Trusting your developers to “do the right thing” isn’t as scary as you might think • Amazingly people react well when you trust them!
  • 23. Contact me! Kevin Poniatowski Senior Security Instructor Security Innovation kponiatowski@securityinnovation.com https://securityinnovation.com

Notes de l'éditeur

  1.      The reason for the title of the talk is not to talk about CI necessarily, although we will, but rather to help construct the most seemingly hostile process or environment to security and show how we can use new techniques to build secure software. Why is security so important?? Yes security is like insurance, you are paying for something you hope you will never use
  2. Allows you to be much more responsive to your customers’ security needs Having tests for everything critical is like asking if you have backups Get fixes in in hours not days, weeks, or months Gotta find the errors before the bad guys do.
  3. static code analysis tools plugin to development environment false sense of security Pen testing is expensive, but your app will be tested, just not by you.
  4. Users actually care about security Talking about security early gets everybody on the same page Simply asking the question “does this have security implications?” can be useful Define Attack Surface: Inputs, functionality Threat Modeling slide coming next
  5. define assets, roles, permissions create activity matrix brainstorm potential attacks find potential issues and prioritize defensive techniques
  6. If your build breaks, fix it immediately. Don’t wait to get told by the security team that it’s important. Security is another aspect of quality. Don’t be “that guy”
  7. If you call researchers “irresponsible” after they wait for patch, you invite other researchers to release w/ no notice, because why bother?
  8. centralize logging. All developers must be on the same page concerning what events and details to log. other components are talked about next slide
  9. If you’re looking for somewhere to start Code Complete is great to understand practices, architectures, paradigms, and principles for building solid code
  10. If he hadn’t remembered full CC# data could have been stored in logs for a long time, resulting in an information leak of PCI data