Slide 1

Slide 1 text

Structure and Evolution of Package Dependency Networks Riivo Kikas, Georgios Gousios, Marlon Dumas, Dietmar Pfahl

Slide 2

Slide 2 text

Software reuse • System reuse • Application reuse • Component reuse • Libraries • COTS components • OSS packages through dependency management • Object/Function reuse

Slide 3

Slide 3 text

Dependency management library dependencies

Slide 4

Slide 4 text

Package dependency networks
 csv-parser lists dependencies, among other ndjson ndjson has its own list of dependencies

Slide 5

Slide 5 text

A network of dependency relationships Subset of Rust packages mid-2016

Slide 6

Slide 6 text

How do dependency networks look like? How do dependency networks evolve? How resilient are dependency networks to attacks?

Slide 7

Slide 7 text

How do dependency networks look like? How do dependency networks evolve? How resilient are dependency networks to attacks?

Slide 8

Slide 8 text

How do dependency networks look like? How do dependency networks evolve? How resilient are dependency networks to attacks?

Slide 9

Slide 9 text

Ecosystems studied 254,466 84,987 122,786 62,133 11,037 388,289 147,120 JavaScript Ruby Rust

Slide 10

Slide 10 text

Dependency network construction No versions A C B D E
 A
 0.1 B
 0.3 C
 0.5 E
 0.1 Latest versions A
 0.1 C
 0.4 B
 0.3 C
 0.5 D
 0.2 E
 0.1 All versions

Slide 11

Slide 11 text

A
 0.1 C
 0.4 B
 0.3 D
 0.2 E
 0.1 H
 0.6 G
 0.1 F
 0.1 L
 0.1 J
 0.2.6 K
 0.4 F
 0.2

Slide 12

Slide 12 text

A
 0.1 C
 0.4 B
 0.3 D
 0.2 E
 0.1 H
 0.6 G
 0.1 F
 0.1 L
 0.1 J
 0.2.6 K
 0.4 dependents F
 0.2

Slide 13

Slide 13 text

A
 0.1 C
 0.4 B
 0.3 D
 0.2 E
 0.1 H
 0.6 G
 0.1 F
 0.1 L
 0.1 J
 0.2.6 K
 0.4 dependents transitive dependents F
 0.2

Slide 14

Slide 14 text

A
 0.1 C
 0.4 B
 0.3 D
 0.2 E
 0.1 H
 0.6 G
 0.1 F
 0.1 L
 0.1 J
 0.2.6 K
 0.4 dependents transitive dependents dependencies F
 0.2

Slide 15

Slide 15 text

A
 0.1 C
 0.4 B
 0.3 D
 0.2 E
 0.1 H
 0.6 G
 0.1 F
 0.1 L
 0.1 J
 0.2.6 K
 0.4 dependents transitive dependents dependencies transitive dependencies F
 0.2

Slide 16

Slide 16 text

Static properties
 Mean number of dependents Direct Transitive Ratio JavaScript 1.3 15.5 11.9x Ruby 1.2 6.4 5.3x Rust 1.6 7.4 4.0x

Slide 17

Slide 17 text

Ecosystem growth - Dependents JavaScript/NPM dependents is growing at a tremendous speed Ruby is slowing down

Slide 18

Slide 18 text

Static properties
 Mean number of dependencies Direct Transitive Ratio JavaScript 5.5 54.6 9.9x Ruby 8.7 34.1 3.9x Rust 3 9.3 3.1x

Slide 19

Slide 19 text

Ecosystem growth - Dependencies JavaScript/NPM dependencies is growing at a tremendous speed Ruby is slowing down

Slide 20

Slide 20 text

Vulnerability Fraction of nodes affected by the removal of single package / version 2005 2007 2009 2011 2013 2015 0.000 0.002 0.004 0.006 0.008 0.010 0.012 0.014 9ulnerability rate ASSlicatiRn Pean J6 3ackaJe Pean J6 ASSlicatiRn Pean 5uby 3ackaJe Pean 5uby

Slide 21

Slide 21 text

Targeted attacks Number of transitive dependents for the 5 most “vulnerable” packages > 450k > 300k inherits.js, erubis, rack string_decoder, sigmund, is_array

Slide 22

Slide 22 text

Targeted attacks Number of transitive dependents for the 5 most “vulnerable” packages > 450k > 300k string_decoder, sigmund, is_array 30 LOCs! inherits.js, erubis, rack

Slide 23

Slide 23 text

Targeted attacks Number of transitive dependents for the 5 most “vulnerable” packages > 450k > 300k string_decoder, sigmund, is_array Last Commit: 2012 inherits.js, erubis, rack

Slide 24

Slide 24 text

Ecosystem response to a CVE CVE-2015-3225: DOS via request with large parameter depth

Slide 25

Slide 25 text

What can developers do?

Slide 26

Slide 26 text

What can developers do? • Understand the effect of including a dependency • For small, inherits.js-like packages just re-implement it • Actively monitor vulnerabilities in the transitive closure • More intelligent, integrated tools • Better governance of dependency management practices

Slide 27

Slide 27 text

What can researchers do?

Slide 28

Slide 28 text

What can researchers do? • Better tools: • increase visibility of transitive includes • connect ecosystems to security advisories • dependency health and ecosystem stability ratings • Better analysis: understand which parts of the dependency code are actually used • A semantic versioning system that everybody agrees upon • Qualitative work: How developers approach dependency management? • Replicate in other ecosystems

Slide 29

Slide 29 text

riivo/package-dependency-networks @riivo @gousiosg