SlideShare une entreprise Scribd logo
1  sur  26
All You Need To Know about Secure Coding with
Open Source Software
Javier Perez - javierperez.mozello.com
Open Source Software is Mainstream
● Latest Innovations are all Open Source
AI, Machine Learning, Deep Learning, Blockchain, Virtual Assistance,…
● Millions of Open Source Libraries, all programming languages
2
Augmented Reality Virtual RealityAutonomous Cars
What is Open Source Software?
● Source code is publicly available
● Open to collaboration
● Source code available with a license that permits users to freely
run, study, modify and redistribute
OSS
Explosive Grow of Open Source
50M+
Developers Worldwide
2.9M+
* Organizations
100M+
* Repositories
* Source: State of the Octoverse, GitHub, November 2019
44M+
* Repositories Created in
2019
1.3M+
* First Time Contributors in
2019
App Development in Open Source
1.2M +
NPM Modules with 859 new/day
337K +
Maven Central Modules with 144 new/day
265K +
Packagist Modules with 112 new/day
210K +
PyPI Modules with 117 new/day
202K +
NuGet Modules with 153 new/day
159K +
RubyGems Modules with 18 new/day
* Source: Modulecounts as of May 5, 2020
What’s in Open Source Software?
1. Open Source License
2. README
3. Contribution Guidelines
4. Code of Conduct
Roles in Open Source Software
● Maintainer
○ ”Owner” and Administrator, publish code, website, social
media.
● Committer
○ Becoming a Committer in projects like Cordova, Node.js, Linux,
and others is a highly regarded and respected role.
● Contributor
○ Opportunity to learn, join a community and meet people.
Open Source Software Contributions
● Contribute Upstream
● Company Sponsored or Individually
○ Enhancements, Bug Fixes and
Vulnerability Fixes
● Modified code not contributed back
becomes close code
Top Open Source
Projects 2019
Number of
Contributors
Visual Studio Code 19.1K
Azure Docs 14K
Flutter 13K
First Contributions 11.6K
TensorFlow 9.9K
React Native 9.1K
Kubernetes 6.9K
DefinitelyTyped 6.9K
Ansible 6.8K
Home-Assistant 6.3K
* Source: State of the Octoverse, GitHub, November 2019
Open Source Libraries and Dependencies
● Popular Open Source Libraries have many
contributors and they are dependencies for
millions of repositories
● Depending on the Programming Language
Open Source Libraries can have from a few to
1000’s of dependencies
● There are Direct Dependencies and Transitive
Dependencies
Security in Open Source Software
Vulnerability
Vulnerability
Discovered
Vulnerabilities in Open Source Libraries
● Security is about identify Vulnerabilities
● Vulnerable Method in the Library
● Common Vulnerability and Exposures (CVE)
● Common Vulnerability Score System (CVSS)
● Vulnerabilities outside CVE and NVD
Let’s Review a Popular OSS: Angular.JS
● JavaScript Framework that lets you write client-side web applications
and use HTML.
● Over 1,500 direct contributors, 8,971 Commits
Other Popular Projects: Tensorflow
● Newer but with more participation
Other Popular Projects: Kubernetes
Back to Angular.JS: Contributions
● Contributors with hundreds of commits
● Top Committers added 1,438 and 842 commits
Angular.JS: Versions and Vulnerabilities
● 140 versions since Mar 2012
● 22 Vulnerabilities, 139 Versions Affected by Vulnerabilities
● Only one “safe version” the latest 1.7.9
● 6 Critical/High Risk Vulnerabilities
Angular.JS: Versions and Vulnerabilities
● High-Risk Vulnerabilities with Versions affected
Open Source Software Security
● Does you company has this many Developers?
○ ”Given enough eyeballs, all bugs are shallow” - Linus’
Law - Linus Torvalds
● Large Open Source Projects don’t have a Single
Unified Architecture
○ Top developers are contributors
○ It is not the developer’s fault
● Visibility to more Security Champions
● Same security practices used on close software,
i.e. the top 10 OWASP Proactive Controls
Not a Single Unified Architecture
Increased Risk with Reuse of Libraries
Apache Commons IO Library:
Used by:
18,595
artifacts
Apache
Commons
Lang
16,281
ScalaTest
12,779
Spring
Web
5,475
Apache
Log4j Fastjson
Snake
YAML
Hadoop
Common
Zoo
Keeper
Selenium
Java
* Source: MavenRepository.com
More on Open Source Security
● New vulnerabilities are constantly being discovered in
Open Source code
● Most vulnerabilities are unintentional
● Much smaller risk of malicious code being injected
● The smart way to make them public is when you have a fix
(public disclosure)
● More than 98% of public vulnerabilities have a fix
● But you have to keep up with the latest fixes
The Real Risk: Not Lack of Fix, Lack of Speed
● Once a vulnerability is disclosed, exploiting it becomes far easier.
The attacker has the full detail of the vulnerability and how it can be
invoked
● Most attacks exploit known vulnerabilities that have never been
patched despite patches being available
● Symantec predicts that "Through 2020, 99% of vulnerabilities
exploited will continue to be ones known by security and IT
professionals for at least one year"
Salt Framework Vulnerabilities Example
● Open Source Framework used to monitor and update the state of servers
● IBM Cloud, LinkedIn, and eBay, use Salt to configure servers, relay messages
from the "master server" and issue commands to a specific time schedule.
● Two high severity vulnerabilities
○ CVE-2020-11651 (an authentication bypass)
○ CVE-2020-11652 (a directory traversal)
○ When combined, could allow attackers to bypass login procedures and run code on
Salt master servers left exposed on the internet
● Disclosed publicly on April 30 by researchers at F-Secure Labs and SaltStack
had released updated versions that fixed it the previous day.
● Exploits at: LineageOS, Ghost blog platform, Xen Orchestra and most likely
more
Manage your Open Source Usage: SCA
● Visibility of all your Open Source usage
● Visibility of license and vulnerability risk based on policies.
● Vulnerabilities prioritization will reduce significant risk.
● Make SCA scans part of SDLC, and part of CI/CD
● SCA provides insight into remediation and act to prevent security
breaches
● Do not scan once, new vulnerabilities are introduced all the time
Apply What You Have Learned Today
● Keep promoting Open Source, keep promoting innovation in your
organization
● Keep and active inventory of the open source you use
● Detect vulnerabilities from NVD and other sources
● Prioritize fixes: Update vulnerable libraries
● SCA Scan Automation: DevSecOps
THANK YOU!
Javier Perez - javierperez.mozello.com

Contenu connexe

Tendances

[OWASP Poland Day] A study of Electron security
[OWASP Poland Day] A study of Electron security[OWASP Poland Day] A study of Electron security
[OWASP Poland Day] A study of Electron security
OWASP
 

Tendances (20)

UNVEIL: A Large-Scale, Automated Approach to Detecting Ransomware
UNVEIL: A Large-Scale, Automated Approach to Detecting RansomwareUNVEIL: A Large-Scale, Automated Approach to Detecting Ransomware
UNVEIL: A Large-Scale, Automated Approach to Detecting Ransomware
 
Secure application deployment in Apache CloudStack
Secure application deployment in Apache CloudStackSecure application deployment in Apache CloudStack
Secure application deployment in Apache CloudStack
 
OWASP Workshop: Docker Image Security Best Practices by Liran Tal - January 2020
OWASP Workshop: Docker Image Security Best Practices by Liran Tal - January 2020OWASP Workshop: Docker Image Security Best Practices by Liran Tal - January 2020
OWASP Workshop: Docker Image Security Best Practices by Liran Tal - January 2020
 
DevSecCon Tel Aviv 2018 - Integrated Security Testing by Morgan Roman
DevSecCon Tel Aviv 2018 - Integrated Security Testing by Morgan RomanDevSecCon Tel Aviv 2018 - Integrated Security Testing by Morgan Roman
DevSecCon Tel Aviv 2018 - Integrated Security Testing by Morgan Roman
 
Security in the Age of Open Source
Security in the Age of Open SourceSecurity in the Age of Open Source
Security in the Age of Open Source
 
BASIC OVERVIEW OF KALI LINUX
BASIC OVERVIEW OF KALI LINUXBASIC OVERVIEW OF KALI LINUX
BASIC OVERVIEW OF KALI LINUX
 
Stranger Danger - Finding vulnerabilities before they find you - Liran Tal 2021
Stranger Danger - Finding vulnerabilities before they find you - Liran Tal 2021Stranger Danger - Finding vulnerabilities before they find you - Liran Tal 2021
Stranger Danger - Finding vulnerabilities before they find you - Liran Tal 2021
 
Building a DevSecOps Pipeline Around Your Spring Boot Application
Building a DevSecOps Pipeline Around Your Spring Boot ApplicationBuilding a DevSecOps Pipeline Around Your Spring Boot Application
Building a DevSecOps Pipeline Around Your Spring Boot Application
 
The Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote WorldThe Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote World
 
DevSecOps: What Why and How : Blackhat 2019
DevSecOps: What Why and How : Blackhat 2019DevSecOps: What Why and How : Blackhat 2019
DevSecOps: What Why and How : Blackhat 2019
 
Continuous security: Bringing agility to the secure development lifecycle
Continuous security: Bringing agility to the secure development lifecycleContinuous security: Bringing agility to the secure development lifecycle
Continuous security: Bringing agility to the secure development lifecycle
 
[OWASP Poland Day] A study of Electron security
[OWASP Poland Day] A study of Electron security[OWASP Poland Day] A study of Electron security
[OWASP Poland Day] A study of Electron security
 
Node.js Security Done Right - Tips and Tricks They Won't Teach You In School
Node.js Security Done Right - Tips and Tricks They Won't Teach You In SchoolNode.js Security Done Right - Tips and Tricks They Won't Teach You In School
Node.js Security Done Right - Tips and Tricks They Won't Teach You In School
 
Serverless Security: What's Left To Protect
Serverless Security: What's Left To ProtectServerless Security: What's Left To Protect
Serverless Security: What's Left To Protect
 
The Log4Shell Vulnerability – explained: how to stay secure
The Log4Shell Vulnerability – explained: how to stay secureThe Log4Shell Vulnerability – explained: how to stay secure
The Log4Shell Vulnerability – explained: how to stay secure
 
360° Kubernetes Security: From Source Code to K8s Configuration Security
360° Kubernetes Security: From Source Code to K8s Configuration Security360° Kubernetes Security: From Source Code to K8s Configuration Security
360° Kubernetes Security: From Source Code to K8s Configuration Security
 
Secure application deployment in the age of continuous delivery
Secure application deployment in the age of continuous deliverySecure application deployment in the age of continuous delivery
Secure application deployment in the age of continuous delivery
 
September 13, 2016: Security in the Age of Open Source:
September 13, 2016: Security in the Age of Open Source: September 13, 2016: Security in the Age of Open Source:
September 13, 2016: Security in the Age of Open Source:
 
Open Source Software - Please Drink Responsibly
Open Source Software - Please Drink ResponsiblyOpen Source Software - Please Drink Responsibly
Open Source Software - Please Drink Responsibly
 
Linux server penetration testing project
Linux server penetration testing projectLinux server penetration testing project
Linux server penetration testing project
 

Similaire à All You need to Know about Secure Coding with Open Source Software

Open source technology
Open source technologyOpen source technology
Open source technology
aparnaz1
 
Open Source, Sourceforge Projects, & Apache Foundation
Open Source, Sourceforge Projects, & Apache FoundationOpen Source, Sourceforge Projects, & Apache Foundation
Open Source, Sourceforge Projects, & Apache Foundation
Mohammad Kotb
 
The adoption of FOSS workfows in commercial software development: the case of...
The adoption of FOSS workfows in commercial software development: the case of...The adoption of FOSS workfows in commercial software development: the case of...
The adoption of FOSS workfows in commercial software development: the case of...
dmgerman
 
Best practices for using open source software in the enterprise
Best practices for using open source software in the enterpriseBest practices for using open source software in the enterprise
Best practices for using open source software in the enterprise
Marcel de Vries
 

Similaire à All You need to Know about Secure Coding with Open Source Software (20)

Q1 2016 Open Source Security Report: Glibc and Beyond
Q1 2016 Open Source Security Report: Glibc and BeyondQ1 2016 Open Source Security Report: Glibc and Beyond
Q1 2016 Open Source Security Report: Glibc and Beyond
 
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
 
Open Source, Sourceforge Projects, & Apache Foundation
Open Source, Sourceforge Projects, & Apache FoundationOpen Source, Sourceforge Projects, & Apache Foundation
Open Source, Sourceforge Projects, & Apache Foundation
 
Intro to open source - 101 presentation
Intro to open source - 101 presentationIntro to open source - 101 presentation
Intro to open source - 101 presentation
 
Open source technology
Open source technologyOpen source technology
Open source technology
 
Open Source, Sourceforge Projects, & Apache Foundation
Open Source, Sourceforge Projects, & Apache FoundationOpen Source, Sourceforge Projects, & Apache Foundation
Open Source, Sourceforge Projects, & Apache Foundation
 
Open source media
Open source mediaOpen source media
Open source media
 
DockerCon SF 2015: Keynote Day 1
DockerCon SF 2015: Keynote Day 1DockerCon SF 2015: Keynote Day 1
DockerCon SF 2015: Keynote Day 1
 
Open Source Technology
Open Source TechnologyOpen Source Technology
Open Source Technology
 
Securing Container Deployments from Build to Ship to Run - August 2017 - Ranc...
Securing Container Deployments from Build to Ship to Run - August 2017 - Ranc...Securing Container Deployments from Build to Ship to Run - August 2017 - Ranc...
Securing Container Deployments from Build to Ship to Run - August 2017 - Ranc...
 
Asf icfoss-mentoring
Asf icfoss-mentoringAsf icfoss-mentoring
Asf icfoss-mentoring
 
DockerDay2015: Keynote
DockerDay2015: KeynoteDockerDay2015: Keynote
DockerDay2015: Keynote
 
Securing Open Source Code in Enterprise
Securing Open Source Code in EnterpriseSecuring Open Source Code in Enterprise
Securing Open Source Code in Enterprise
 
Open source
Open sourceOpen source
Open source
 
The adoption of FOSS workfows in commercial software development: the case of...
The adoption of FOSS workfows in commercial software development: the case of...The adoption of FOSS workfows in commercial software development: the case of...
The adoption of FOSS workfows in commercial software development: the case of...
 
Donu’t Let Vulnerabilities Create a Hole in Your Organization
Donu’t Let Vulnerabilities Create a Hole in Your OrganizationDonu’t Let Vulnerabilities Create a Hole in Your Organization
Donu’t Let Vulnerabilities Create a Hole in Your Organization
 
Open Source Licenses
Open Source LicensesOpen Source Licenses
Open Source Licenses
 
Best practices for using open source software in the enterprise
Best practices for using open source software in the enterpriseBest practices for using open source software in the enterprise
Best practices for using open source software in the enterprise
 
Winning open source vulnerabilities without loosing your deveopers - Azure De...
Winning open source vulnerabilities without loosing your deveopers - Azure De...Winning open source vulnerabilities without loosing your deveopers - Azure De...
Winning open source vulnerabilities without loosing your deveopers - Azure De...
 
Leverage the power of Open Source in your company
Leverage the power of Open Source in your company Leverage the power of Open Source in your company
Leverage the power of Open Source in your company
 

Plus de Javier Perez

Plus de Javier Perez (6)

Open Source Security and ChatGPT-Published.pdf
Open Source Security and ChatGPT-Published.pdfOpen Source Security and ChatGPT-Published.pdf
Open Source Security and ChatGPT-Published.pdf
 
All Things Open 2022 - State of OSS Security & Support
All Things Open 2022 - State of OSS Security & SupportAll Things Open 2022 - State of OSS Security & Support
All Things Open 2022 - State of OSS Security & Support
 
Open Source North - State of OSS in Organizations
Open Source North - State of OSS in OrganizationsOpen Source North - State of OSS in Organizations
Open Source North - State of OSS in Organizations
 
Open source and AI keynote
Open source and AI keynoteOpen source and AI keynote
Open source and AI keynote
 
SacHacks Keynote Open Source Software and IBM Z
SacHacks Keynote Open Source Software and IBM ZSacHacks Keynote Open Source Software and IBM Z
SacHacks Keynote Open Source Software and IBM Z
 
Guide to open source
Guide to open source Guide to open source
Guide to open source
 

Dernier

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
anilsa9823
 

Dernier (20)

HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 

All You need to Know about Secure Coding with Open Source Software

  • 1. All You Need To Know about Secure Coding with Open Source Software Javier Perez - javierperez.mozello.com
  • 2. Open Source Software is Mainstream ● Latest Innovations are all Open Source AI, Machine Learning, Deep Learning, Blockchain, Virtual Assistance,… ● Millions of Open Source Libraries, all programming languages 2 Augmented Reality Virtual RealityAutonomous Cars
  • 3. What is Open Source Software? ● Source code is publicly available ● Open to collaboration ● Source code available with a license that permits users to freely run, study, modify and redistribute OSS
  • 4. Explosive Grow of Open Source 50M+ Developers Worldwide 2.9M+ * Organizations 100M+ * Repositories * Source: State of the Octoverse, GitHub, November 2019 44M+ * Repositories Created in 2019 1.3M+ * First Time Contributors in 2019
  • 5. App Development in Open Source 1.2M + NPM Modules with 859 new/day 337K + Maven Central Modules with 144 new/day 265K + Packagist Modules with 112 new/day 210K + PyPI Modules with 117 new/day 202K + NuGet Modules with 153 new/day 159K + RubyGems Modules with 18 new/day * Source: Modulecounts as of May 5, 2020
  • 6. What’s in Open Source Software? 1. Open Source License 2. README 3. Contribution Guidelines 4. Code of Conduct
  • 7. Roles in Open Source Software ● Maintainer ○ ”Owner” and Administrator, publish code, website, social media. ● Committer ○ Becoming a Committer in projects like Cordova, Node.js, Linux, and others is a highly regarded and respected role. ● Contributor ○ Opportunity to learn, join a community and meet people.
  • 8. Open Source Software Contributions ● Contribute Upstream ● Company Sponsored or Individually ○ Enhancements, Bug Fixes and Vulnerability Fixes ● Modified code not contributed back becomes close code Top Open Source Projects 2019 Number of Contributors Visual Studio Code 19.1K Azure Docs 14K Flutter 13K First Contributions 11.6K TensorFlow 9.9K React Native 9.1K Kubernetes 6.9K DefinitelyTyped 6.9K Ansible 6.8K Home-Assistant 6.3K * Source: State of the Octoverse, GitHub, November 2019
  • 9. Open Source Libraries and Dependencies ● Popular Open Source Libraries have many contributors and they are dependencies for millions of repositories ● Depending on the Programming Language Open Source Libraries can have from a few to 1000’s of dependencies ● There are Direct Dependencies and Transitive Dependencies
  • 10. Security in Open Source Software
  • 11. Vulnerability Vulnerability Discovered Vulnerabilities in Open Source Libraries ● Security is about identify Vulnerabilities ● Vulnerable Method in the Library ● Common Vulnerability and Exposures (CVE) ● Common Vulnerability Score System (CVSS) ● Vulnerabilities outside CVE and NVD
  • 12. Let’s Review a Popular OSS: Angular.JS ● JavaScript Framework that lets you write client-side web applications and use HTML. ● Over 1,500 direct contributors, 8,971 Commits
  • 13. Other Popular Projects: Tensorflow ● Newer but with more participation
  • 15. Back to Angular.JS: Contributions ● Contributors with hundreds of commits ● Top Committers added 1,438 and 842 commits
  • 16. Angular.JS: Versions and Vulnerabilities ● 140 versions since Mar 2012 ● 22 Vulnerabilities, 139 Versions Affected by Vulnerabilities ● Only one “safe version” the latest 1.7.9 ● 6 Critical/High Risk Vulnerabilities
  • 17. Angular.JS: Versions and Vulnerabilities ● High-Risk Vulnerabilities with Versions affected
  • 18. Open Source Software Security ● Does you company has this many Developers? ○ ”Given enough eyeballs, all bugs are shallow” - Linus’ Law - Linus Torvalds ● Large Open Source Projects don’t have a Single Unified Architecture ○ Top developers are contributors ○ It is not the developer’s fault ● Visibility to more Security Champions ● Same security practices used on close software, i.e. the top 10 OWASP Proactive Controls
  • 19. Not a Single Unified Architecture
  • 20. Increased Risk with Reuse of Libraries Apache Commons IO Library: Used by: 18,595 artifacts Apache Commons Lang 16,281 ScalaTest 12,779 Spring Web 5,475 Apache Log4j Fastjson Snake YAML Hadoop Common Zoo Keeper Selenium Java * Source: MavenRepository.com
  • 21. More on Open Source Security ● New vulnerabilities are constantly being discovered in Open Source code ● Most vulnerabilities are unintentional ● Much smaller risk of malicious code being injected ● The smart way to make them public is when you have a fix (public disclosure) ● More than 98% of public vulnerabilities have a fix ● But you have to keep up with the latest fixes
  • 22. The Real Risk: Not Lack of Fix, Lack of Speed ● Once a vulnerability is disclosed, exploiting it becomes far easier. The attacker has the full detail of the vulnerability and how it can be invoked ● Most attacks exploit known vulnerabilities that have never been patched despite patches being available ● Symantec predicts that "Through 2020, 99% of vulnerabilities exploited will continue to be ones known by security and IT professionals for at least one year"
  • 23. Salt Framework Vulnerabilities Example ● Open Source Framework used to monitor and update the state of servers ● IBM Cloud, LinkedIn, and eBay, use Salt to configure servers, relay messages from the "master server" and issue commands to a specific time schedule. ● Two high severity vulnerabilities ○ CVE-2020-11651 (an authentication bypass) ○ CVE-2020-11652 (a directory traversal) ○ When combined, could allow attackers to bypass login procedures and run code on Salt master servers left exposed on the internet ● Disclosed publicly on April 30 by researchers at F-Secure Labs and SaltStack had released updated versions that fixed it the previous day. ● Exploits at: LineageOS, Ghost blog platform, Xen Orchestra and most likely more
  • 24. Manage your Open Source Usage: SCA ● Visibility of all your Open Source usage ● Visibility of license and vulnerability risk based on policies. ● Vulnerabilities prioritization will reduce significant risk. ● Make SCA scans part of SDLC, and part of CI/CD ● SCA provides insight into remediation and act to prevent security breaches ● Do not scan once, new vulnerabilities are introduced all the time
  • 25. Apply What You Have Learned Today ● Keep promoting Open Source, keep promoting innovation in your organization ● Keep and active inventory of the open source you use ● Detect vulnerabilities from NVD and other sources ● Prioritize fixes: Update vulnerable libraries ● SCA Scan Automation: DevSecOps
  • 26. THANK YOU! Javier Perez - javierperez.mozello.com