SlideShare a Scribd company logo
Software Composition Analysis
Deep Dive [slightly revised]
Ulisses Albuquerque, OWASP AppSec Day 2018
Application Security Consultant @ PS+C Group, Hobbyist Bitbanger
from legal import
disclaimer
 Opinions are my own, not my employer’s
 Focus on Javascript/npm because its
ecosystem exacerbates the effects of bad
component management practices
 Prone to swearing at times (sorry!)
Donnie Darko Queens Film Theatre
Findings Vulnerabilities and Malware in Open-Source Code at Scale
Findings Vulnerabilities and Malware in Open-Source Code at Scale
How one developer just broke Node, Babel and thousands of projects in 11 lines of JavaScript
Software Composition Analysis Deep Dive
Equifax waited 5 weeks to admit it had doxed 44% of America, did nothing to help us while its execs sold stock
On Aug. 22, the Apache Software
Foundation released software updates to
fix a critical vulnerability in Apache Struts, a
Web application platform used by an
estimated 65 percent of Fortune 100
companies. Unfortunately, computer code
that can be used to exploit the bug has since
been posted online, meaning bad guys now
have precise instructions on how to break into
vulnerable, unpatched servers.
Experts Urge Rapid Patching of ‘Struts’ Bug
OWASP Top 10 2017
Visibility
How can we discover which components are being used in software in an organization?
Application Manifest
Vulnerability Data Sources
Dependency Metadata
Key Players
OWASP
Dependency
Check
 Application: OWASP Juice Shop
 Dependencies managed via
node.js npm
 Vulnerability data sources from
NVD CVEs
 Dependency Artefacts stored
under node_modules
Reading the
report
 Dependencies scanned
 Coordinates
 Evidence count
Between runtime and development dependencies we
have 110 libraries – where did the remaining 1757 came
from?
Transitive/Indirect
Dependencies
Dependencies are not a list, but rather a
graph.
Direct dependencies listed in the application
manifest have dependencies of their own,
recursively.
Dependency resolution is typically resolved at
build time.
NPMGraph
NPMGraph
NPMGraph
Transitive/Indirect
Dependencies
Application manifest is not enough to
determine full dependency resolution tree.
Software composition analysis tools need to
leverage dependency resolution capability
from the platforms they support.
snyk
Supported Languages and Build Tools
SourceClear
Java
Maven
Gradle
Ant
Ruby
Bundler
Javascript
npm
Bower
Yarn
PHP
Composer
Python
pip
Scala
sbt
Objective-C
Cocoa Pods
Go
go get
govendor
Godep
Glide
Trash
snyk.io
node.js
npm
Yarn
Ruby
Bundler
Java
Maven
Gradle
Python
pip
Scala
sbt
Go
dep
govendor
.NET
nuget
PHP
Compose
r
Supported Languages and Build Tools
OWASP
Dependency
Check
Archive
zip
tar
gzip
bzip2
.NET Assemblies
exe
dll
Cmake
CMakeList.txt
cmake
Java
jar
War
Javascript
Package.json
Node Security
Project
Nuspec
Nuspec
OpenSSL
opensslv.h
Ruby
Gemfile.lock
Semantic
Versioning
 Dependency versions might
not be exact
 Version ranges
 Backwards compatibility
 Wildcards
Software Composition Analysis Deep Dive
Temporal Build Dependency Resolution
 Dependency version used will be the latest
one that matches versioning restrictions
 Different versions might have different
transitive dependencies
 Building the same software at different points
in time might produce different dependency
resolution trees!
Vulnerability Data Sources
NVD CVE Feeds
Vendor Advisories
Commit Log Analysis
National Vulnerability Database
Express Security Updates
Commit Log
Analysis
SourceClear claims they use
machine learning over commit
logs for libraries to identify security
fixes and extract vulnerability
information
Dependency
Tree
Vulnerability
Data
Sources
Vulnerable
Dependencies
Software Composition Analysis Deep Dive
Remediation
How do we remove vulnerable dependencies from software?
Software Composition Analysis Deep Dive
Remediation
 Remediation effort is directly
related to dependency
resolution graph complexity
 Number of paths leading
to a vulnerable
dependency
 Versioning restrictions on
transitive dependencies
 Depth of vulnerable
dependency
Software Composition Analysis Deep Dive
Remediation
 Upgrades are often not possible
 No later fixed version available
 Dependency is introduced via multiple paths
and only some offer upgrades
 Upgrades break compatibility
Catch breaking API changes early
Why and How Java Developers Break APIs
Remediation
 When upgrade is not feasible…
 Capture risk
 Set deadline to re-evaluate
 Never whitelist vulnerable dependencies
unless application is being decommissioned
Software Composition Analysis Deep Dive
Software Composition Analysis Deep Dive
Software Composition Analysis Deep Dive
Maintenance
Ensuring existing software is free of vulnerable dependencies
Maintenance
 New vulnerabilities might be
introduced via…
 New or modified
dependencies added to
the application
 New vulnerabilities found
in previously clean
dependencies
Maintenance
 Rebuilding your software periodically does
not guarantee deployed versions are clean
 Temporal build dependency resolution
 Need to correlate SCA scan data, release
tagging and deployment information
Dependency
Resolution
Tree
Vulnerability
Data Sources
Deployed
Versions and
Archival Tags
Software Composition Analysis Deep Dive
Artefact Registries
Restricting access to known vulnerable dependencies to avoid the problem
Artefact
Registries
 Act as middlemen between
public registries and internal
systems
 Proxying/caching
 Store private libraries and
artefacts
 Dependency blacklist
SCM-MANAGER UNIVERSE TOOLS PART 4: SONATYPE NEXUS
Key Players
Software Composition Analysis Deep Dive
Artefact Registries
 Only effective when combined with network controls which restrict access to public repositories
 Prevents builds which include known vulnerable components but gives less visibility to the actual
vulnerabilities associated with them
Github Vulnerable Components Insight
Bonus: snyk ❤️ github
Software Composition Analysis Deep Dive
Software Composition Analysis Deep Dive
TL;DR
 Dependencies – it’s not a list, it’s a rather complicated graph with
multiple paths leading to vulnerable components
 Remediation cost depends on graph complexity, not just on number of
vulnerable components
 You’ll often not be able to fix immediately, but that does not mean you
should whitelist vulnerable components indefinitely
 New vulnerabilities in components will pop up even if you make no
changes to the application code
 No best-of-breed yet – all products lacking in some aspect
Don’t be a stranger!
@urma
ulissesalbuquerque
ulisses dot montenegro at gmail

More Related Content

What's hot (20)

PDF
DevSecOps: What Why and How : Blackhat 2019
NotSoSecure Global Services
 
PDF
A New View of Your Application Security Program with Snyk and ThreadFix
Denim Group
 
PDF
DevSecOps What Why and How
NotSoSecure Global Services
 
PDF
Demystifying DevSecOps
Archana Joshi
 
PDF
Introduction to DevSecOps
Setu Parimi
 
PDF
The State of DevSecOps
DevOps Indonesia
 
PDF
Practical DevSecOps Course - Part 1
Mohammed A. Imran
 
PDF
2019 DevSecOps Reference Architectures
Sonatype
 
PDF
DevSecOps Implementation Journey
DevOps Indonesia
 
PPTX
DevSecOps Training Bootcamp - A Practical DevSecOps Course
Tonex
 
PDF
Cloud-Native Security
VMware Tanzu
 
PPTX
DEVSECOPS.pptx
MohammadSaif904342
 
PDF
Threat Modeling Using STRIDE
Girindro Pringgo Digdo
 
PDF
Api Gateway
KhaqanAshraf
 
PPTX
DevSecOps
Cheah Eng Soon
 
PPTX
Threat modelling with_sample_application
Umut IŞIK
 
PDF
Shift Left Security
gjdevos
 
DevSecOps: What Why and How : Blackhat 2019
NotSoSecure Global Services
 
A New View of Your Application Security Program with Snyk and ThreadFix
Denim Group
 
DevSecOps What Why and How
NotSoSecure Global Services
 
Demystifying DevSecOps
Archana Joshi
 
Introduction to DevSecOps
Setu Parimi
 
The State of DevSecOps
DevOps Indonesia
 
Practical DevSecOps Course - Part 1
Mohammed A. Imran
 
2019 DevSecOps Reference Architectures
Sonatype
 
DevSecOps Implementation Journey
DevOps Indonesia
 
DevSecOps Training Bootcamp - A Practical DevSecOps Course
Tonex
 
Cloud-Native Security
VMware Tanzu
 
DEVSECOPS.pptx
MohammadSaif904342
 
Threat Modeling Using STRIDE
Girindro Pringgo Digdo
 
Api Gateway
KhaqanAshraf
 
DevSecOps
Cheah Eng Soon
 
Threat modelling with_sample_application
Umut IŞIK
 
Shift Left Security
gjdevos
 

Similar to Software Composition Analysis Deep Dive (20)

PDF
FOSDEM 2020 Presentation: Comparing dependency management issues across packa...
Fasten Project
 
PPTX
How to increase the technical health of your software?
Tom Mens
 
PPTX
Embracing DevSecOps: A Changing Security Landscape for the US Government
DJ Schleen
 
PPTX
On the health of the npm packaging ecosystem
Tom Mens
 
PPTX
Comparing dependency issues across software package distributions (FOSDEM 2020)
Tom Mens
 
PDF
Dependency Issues in Open Source Software Package Registries
Tom Mens
 
PDF
Synopsys Security Event Israel Presentation: New AppSec Paradigms with Open S...
Synopsys Software Integrity Group
 
PDF
Fasten Industry Meeting with GitHub about Dependancy Management
Fasten Project
 
PDF
Say No To Dependency Hell
Nicola Pedot
 
PDF
Dependency Health: Removing the Barriers to Keeping Projects in Shape
DevOps.com
 
PDF
Dependency Health: Removing the Barriers to Keeping Projects in Shape
DevOps.com
 
PPTX
Securing Modern Applications: The Data Behind DevSecOps
Eficode
 
PPTX
2019 04-18 -DevSecOps-software supply chain
Cameron Townshend
 
PPTX
Software rotting - DevOpsCon Berlin
Giulio Vian
 
PDF
2019 04-04-dev secops-software supply chain_fst-2
Cameron Townshend
 
PPTX
Say No to the Dependency Hell
Ivan Pashchenko
 
PDF
Secure Software Ecosystem Teqnation 2024
Soroosh Khodami
 
PDF
Infiltrating the Supply Chain Attack: Advanced Payload Delivery and Evasion T...
null - The Open Security Community
 
PDF
All about dependencies
Ixchel Ruiz
 
PPTX
[OWASP Poland Day] Application frameworks' vulnerabilities
OWASP
 
FOSDEM 2020 Presentation: Comparing dependency management issues across packa...
Fasten Project
 
How to increase the technical health of your software?
Tom Mens
 
Embracing DevSecOps: A Changing Security Landscape for the US Government
DJ Schleen
 
On the health of the npm packaging ecosystem
Tom Mens
 
Comparing dependency issues across software package distributions (FOSDEM 2020)
Tom Mens
 
Dependency Issues in Open Source Software Package Registries
Tom Mens
 
Synopsys Security Event Israel Presentation: New AppSec Paradigms with Open S...
Synopsys Software Integrity Group
 
Fasten Industry Meeting with GitHub about Dependancy Management
Fasten Project
 
Say No To Dependency Hell
Nicola Pedot
 
Dependency Health: Removing the Barriers to Keeping Projects in Shape
DevOps.com
 
Dependency Health: Removing the Barriers to Keeping Projects in Shape
DevOps.com
 
Securing Modern Applications: The Data Behind DevSecOps
Eficode
 
2019 04-18 -DevSecOps-software supply chain
Cameron Townshend
 
Software rotting - DevOpsCon Berlin
Giulio Vian
 
2019 04-04-dev secops-software supply chain_fst-2
Cameron Townshend
 
Say No to the Dependency Hell
Ivan Pashchenko
 
Secure Software Ecosystem Teqnation 2024
Soroosh Khodami
 
Infiltrating the Supply Chain Attack: Advanced Payload Delivery and Evasion T...
null - The Open Security Community
 
All about dependencies
Ixchel Ruiz
 
[OWASP Poland Day] Application frameworks' vulnerabilities
OWASP
 
Ad

More from Ulisses Albuquerque (7)

PPTX
Application Security from the Inside Out
Ulisses Albuquerque
 
PPTX
Speeding Up Secure Software Development
Ulisses Albuquerque
 
PPTX
Better Do What They Told Ya
Ulisses Albuquerque
 
PPTX
Using Online Activity as Digital Fingerprints to Create a Better Spear Phisher
Ulisses Albuquerque
 
PPTX
PCI DSS e Metodologias Ágeis
Ulisses Albuquerque
 
PPTX
SmartTV Security
Ulisses Albuquerque
 
PPTX
ROM Hacking for Fun, Profit & Infinite Lives
Ulisses Albuquerque
 
Application Security from the Inside Out
Ulisses Albuquerque
 
Speeding Up Secure Software Development
Ulisses Albuquerque
 
Better Do What They Told Ya
Ulisses Albuquerque
 
Using Online Activity as Digital Fingerprints to Create a Better Spear Phisher
Ulisses Albuquerque
 
PCI DSS e Metodologias Ágeis
Ulisses Albuquerque
 
SmartTV Security
Ulisses Albuquerque
 
ROM Hacking for Fun, Profit & Infinite Lives
Ulisses Albuquerque
 
Ad

Recently uploaded (20)

PDF
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PDF
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
PDF
Add Background Images to Charts in IBM SPSS Statistics Version 31.pdf
Version 1 Analytics
 
PPTX
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PPTX
iaas vs paas vs saas :choosing your cloud strategy
CloudlayaTechnology
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Smart Doctor Appointment Booking option in odoo.pptx
AxisTechnolabs
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PDF
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
PDF
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
Add Background Images to Charts in IBM SPSS Statistics Version 31.pdf
Version 1 Analytics
 
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
iaas vs paas vs saas :choosing your cloud strategy
CloudlayaTechnology
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Smart Doctor Appointment Booking option in odoo.pptx
AxisTechnolabs
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 

Software Composition Analysis Deep Dive

  • 1. Software Composition Analysis Deep Dive [slightly revised] Ulisses Albuquerque, OWASP AppSec Day 2018 Application Security Consultant @ PS+C Group, Hobbyist Bitbanger
  • 2. from legal import disclaimer  Opinions are my own, not my employer’s  Focus on Javascript/npm because its ecosystem exacerbates the effects of bad component management practices  Prone to swearing at times (sorry!) Donnie Darko Queens Film Theatre
  • 3. Findings Vulnerabilities and Malware in Open-Source Code at Scale
  • 4. Findings Vulnerabilities and Malware in Open-Source Code at Scale
  • 5. How one developer just broke Node, Babel and thousands of projects in 11 lines of JavaScript
  • 7. Equifax waited 5 weeks to admit it had doxed 44% of America, did nothing to help us while its execs sold stock
  • 8. On Aug. 22, the Apache Software Foundation released software updates to fix a critical vulnerability in Apache Struts, a Web application platform used by an estimated 65 percent of Fortune 100 companies. Unfortunately, computer code that can be used to exploit the bug has since been posted online, meaning bad guys now have precise instructions on how to break into vulnerable, unpatched servers. Experts Urge Rapid Patching of ‘Struts’ Bug
  • 10. Visibility How can we discover which components are being used in software in an organization?
  • 11. Application Manifest Vulnerability Data Sources Dependency Metadata
  • 13. OWASP Dependency Check  Application: OWASP Juice Shop  Dependencies managed via node.js npm  Vulnerability data sources from NVD CVEs  Dependency Artefacts stored under node_modules
  • 14. Reading the report  Dependencies scanned  Coordinates  Evidence count
  • 15. Between runtime and development dependencies we have 110 libraries – where did the remaining 1757 came from?
  • 16. Transitive/Indirect Dependencies Dependencies are not a list, but rather a graph. Direct dependencies listed in the application manifest have dependencies of their own, recursively. Dependency resolution is typically resolved at build time.
  • 20. Transitive/Indirect Dependencies Application manifest is not enough to determine full dependency resolution tree. Software composition analysis tools need to leverage dependency resolution capability from the platforms they support.
  • 21. snyk
  • 22. Supported Languages and Build Tools SourceClear Java Maven Gradle Ant Ruby Bundler Javascript npm Bower Yarn PHP Composer Python pip Scala sbt Objective-C Cocoa Pods Go go get govendor Godep Glide Trash snyk.io node.js npm Yarn Ruby Bundler Java Maven Gradle Python pip Scala sbt Go dep govendor .NET nuget PHP Compose r
  • 23. Supported Languages and Build Tools OWASP Dependency Check Archive zip tar gzip bzip2 .NET Assemblies exe dll Cmake CMakeList.txt cmake Java jar War Javascript Package.json Node Security Project Nuspec Nuspec OpenSSL opensslv.h Ruby Gemfile.lock
  • 24. Semantic Versioning  Dependency versions might not be exact  Version ranges  Backwards compatibility  Wildcards
  • 26. Temporal Build Dependency Resolution  Dependency version used will be the latest one that matches versioning restrictions  Different versions might have different transitive dependencies  Building the same software at different points in time might produce different dependency resolution trees!
  • 27. Vulnerability Data Sources NVD CVE Feeds Vendor Advisories Commit Log Analysis
  • 30. Commit Log Analysis SourceClear claims they use machine learning over commit logs for libraries to identify security fixes and extract vulnerability information
  • 33. Remediation How do we remove vulnerable dependencies from software?
  • 35. Remediation  Remediation effort is directly related to dependency resolution graph complexity  Number of paths leading to a vulnerable dependency  Versioning restrictions on transitive dependencies  Depth of vulnerable dependency
  • 37. Remediation  Upgrades are often not possible  No later fixed version available  Dependency is introduced via multiple paths and only some offer upgrades  Upgrades break compatibility Catch breaking API changes early
  • 38. Why and How Java Developers Break APIs
  • 39. Remediation  When upgrade is not feasible…  Capture risk  Set deadline to re-evaluate  Never whitelist vulnerable dependencies unless application is being decommissioned
  • 43. Maintenance Ensuring existing software is free of vulnerable dependencies
  • 44. Maintenance  New vulnerabilities might be introduced via…  New or modified dependencies added to the application  New vulnerabilities found in previously clean dependencies
  • 45. Maintenance  Rebuilding your software periodically does not guarantee deployed versions are clean  Temporal build dependency resolution  Need to correlate SCA scan data, release tagging and deployment information Dependency Resolution Tree Vulnerability Data Sources Deployed Versions and Archival Tags
  • 47. Artefact Registries Restricting access to known vulnerable dependencies to avoid the problem
  • 48. Artefact Registries  Act as middlemen between public registries and internal systems  Proxying/caching  Store private libraries and artefacts  Dependency blacklist SCM-MANAGER UNIVERSE TOOLS PART 4: SONATYPE NEXUS
  • 51. Artefact Registries  Only effective when combined with network controls which restrict access to public repositories  Prevents builds which include known vulnerable components but gives less visibility to the actual vulnerabilities associated with them
  • 52. Github Vulnerable Components Insight Bonus: snyk ❤️ github
  • 55. TL;DR  Dependencies – it’s not a list, it’s a rather complicated graph with multiple paths leading to vulnerable components  Remediation cost depends on graph complexity, not just on number of vulnerable components  You’ll often not be able to fix immediately, but that does not mean you should whitelist vulnerable components indefinitely  New vulnerabilities in components will pop up even if you make no changes to the application code  No best-of-breed yet – all products lacking in some aspect
  • 56. Don’t be a stranger! @urma ulissesalbuquerque ulisses dot montenegro at gmail

Editor's Notes

  • #4: This chart was blatantly copied from Mark Curphey’s keynote for Hack in Box; link to original slide deck included – please watch that, it is great to grasp the open source component space challenges
  • #5: Open source party code makes up to 90% of the code in modern applications, yet there is usually very little visibility outside of development teams on what goes in
  • #6: left-pad was removed because its developer received an order to change the name of one of his modules, kik; he refused, and the company reached out to npm claiming brand infringement; the developer became enraged and removed ALL of his published modules – more than 250 of them
  • #7: Unless you were living under a rock in 2017, you heard about the Equifax breach; it even triggered an official response from the Apache Struts project; if you were at Nina’s talk you already header enough about this stuff
  • #8: Then Equifax happened, and the reason this is relevant to our story if because Equifax was breached through a vulnerable library, Apache Struts
  • #9: The vulnerability in question is CVE-2017-5638, and is quite trivial to exploit -- unfortunately
  • #10: OWASP has raised the risk involved in using vulnerable components for some time now
  • #12: Obtaining visibility on vulnerable components is the first step; we do this by comparing application dependency manifests, artefacts and vulnerability data sources
  • #13: NOT AN EXHAUSTIVE LIST, but the stuff I have the most experience with; these tools are more focused on identifying vulnerabilities in applications via their manifest files/builds – we will talk about artefact registries later
  • #14: OWASP Dependency Check scanning OWASP Juice Shop, report is output to files, not to screen, and aside from HTML is mostly meant for machine consumption; OWASP Dependency Check does not provide much advice in terms of remediation
  • #15: Lots of information here which might seem counter-intuitive at first sight; let’s start with the number of dependencies identified
  • #16: Dependencies in npm manifest files are stored as JSON documents inside package.json files; similar patterns exist for most dependency management solutions, such as Maven, Rubygems or pip – all manifest files are machine-parsable
  • #17: Introduce the idea of transitive dependencies, mentioning that libraries have dependencies of their own
  • #18: Bunyan is a logging framework with few dependencies of its own; still, it relies on 4 direct dependencies of its own, which in turn add another 4 transitive dependencies
  • #19: Jsonwebtoken is a more complex library and has a larger number of direct dependencies; our dependency resolution tree is now deeper and has multiple paths to some of the nodes, like safe-buffer, which is required by 3 different transitive dependencies
  • #20: Explain the discrepancy in the numbers reported by npmgraph vs dependency check by explaining that it assumes the package is published in npm and fails to find metadata related to it
  • #21: Software composition analysis needs to plug to dependency/package management solution used in build
  • #22: Snyk reports vulnerable dependencies AND vulnerable paths, because the same dependency might be introduced to our dependency resolution tree via multiple paths; this will affect our remediation, but we will get to that later in this presentation
  • #23: These are all the languages and dependency management/build tools supported by snyk and sourceclear; because different dependency management platforms often have different backend systems and index dependencies in slightly incompatible ways, SCA must understand how to extract the relevant information – at the very least the library/package name and version – there is no such thing as “language support” by itself, it must be linked to a dependency management tool
  • #24: OWASP Dependency Check is all over the place, but it mostly relies on finding files which match supported file extensions and attaches itself to that; it can also be executed via plugins to ant, Maven, Gradle and Jenkins
  • #25: Semantic versioning adds yet another dimension to the problem – instead of explicitly stating static versions in manifest files, developers can use ranges or wildcards, and the dependency resolution tool will try to find a version that meets the requirements at build time
  • #26: Our manifest specifies version 4.16.0 or anything else that’s backwards compatible with that; after npm install we get 4.16.4; because transitive dependencies might also be affect across versions of the direct dependency, we might end up with a completely different dependency tree depending on the version that actually got installed; npm BY DEFAULT will use semantic versioning when the developer does not provide a strict match criteria when adding a dependency
  • #28: CVE feeds use CPE to match dependencies against known vulnerable versions; vendor advisories are more accurate but require massaging and collecting data from all involved parties; commit log analysis is done by Sourceclear and uses machine learning to parse commit log messages and help identify changes to open source library repositories which might indicate a security fix
  • #29: CVE data is free and publicly available but often not very precise and unless the vendor has a nicely structured vulnerability reporting process, a security bug in their code might not produce a CVE
  • #30: At least 3 versions have vulnerabilities which do not seem to have CVEs linked to them; the ones that do have actually reference other packages – nodejs or serve-static
  • #32: We match all the dependencies in the dependency tree against the vulnerability data sources; if a match is found, we know one of the nodes in our dependency resolution tree is vulnerable and we need to fix that
  • #33: Sourceclear dashboard showing all vulnerabilities for the OWASP Juice Shop project; notice that most of the reported vulnerabilities do not have CVEs associated with them and come from SourceClear proprietary’s vulnerability feeds which include vendor data and machine learning on commit log analysis; Sourceclear also has the unique feature of filtering results by direct dependencies (i.e., the ones we can remediate directly) and the libraries that have vulnerable code actually being called by the application (the “vulnerable methods” checkbox) – this means Sourceclear will do some static analysis of the code
  • #35: Despite all the complexities mentioned in the previous slides, remediation is often surprisingly easy and fast – as long as the updated packages do not break functional requirements, but you should have unit and integration tests for that… right?
  • #36: [email protected] is vulnerable, and it can be reached from [email protected] from 6 different paths – our ability to fix the issue depends on removing each of those 6 different injection paths; thankfully, express does a proper job of keeping itself free of vulnerable dependencies of its own, and we fix the problem by just upgrading express itself
  • #37: On a real world application with more dependencies changing one node might impact tens of other nodes, and remediation might introduce breaking changes; once again, if we have automated testing we might feel comfortable upgrading and checking if the later versions break functionality
  • #39: Not really a security-focused paper but provides some great insight on why developers break compatibility in their APIs in the Java ecosystem, which tends to be one of the most conservatives ecosystems; things move much faster in the dynamically typed language space (Ruby, Python, Javascript)
  • #40: Never blindly accept the risk linked to a vulnerable dependency; later vulnerabilities might be found in the same library, and what might seem like an acceptable risk today might not be tomorrow, particularly as we shift towards more iterative development models and the risk profile of applications change over time; aside from snyk, none of the existing SCA tools seem to do this properly…
  • #41: Snyk has the best workflow solution for this; it will by default only allow whitelist/risk acceptance for 30 days, and will start to return the same vulnerability again once that deadline is up; it will also ask for a reason
  • #42: Even better, if snyk finds out there is a fix for a vulnerable dependency it scanned in the past, it will proactively email the project owner and let them know they can now fix their software
  • #43: Even better than that, if your project is open source, snyk will automatically create a pull request with fixes for your vulnerable dependencies
  • #45: Even after you’ve done all the work of ensure your software has no vulnerable dependencies, new ones might be found regardless of any changes you made to the application
  • #46: If we rebuild the software to find new vulnerabilities, we might end up with a different set of dependencies than the ones that are actually deployed, because semantic versioning means we get affected by temporal build dependency resolution; we need to constantly compare the manifest information we have for deployed versions of the application against updated vulnerability data source data
  • #47: If we are using SaaS offerings, they can do the heavy lifting for us – whenever a new vulnerability is found, they can retroactively revisit all of the scanned application data we have and tell us about it
  • #49: Artefact registries can do a lot more than just filter content, and their capabilities in that space are rather limited without the support of plugins/components
  • #51: Nexus Firewall can identify resources which sit in the registry and are known to be vulnerable, preventing them from being used in builds