NPM Ecosystem Network Analysis Cyber Security

NPM Supply Chain Risk Analysis

This project maps structural risks and critical dependencies in the NPM package ecosystem using topological network analysis methods. The dashboard below contains all analysis charts and raw datasets.

Network Statistics

1,529 Nodes (Packages)
3,133 Edges (Dependencies)
2.05 Average Degree
0.001341 Network Density

1. Network Structure and Topology

🌐 Full Network Structure (Top 1000 + Dependencies)

πŸ“ˆ Degree Distributions (Log-Log)

2. Risk and Criticality Analysis

⚠️ Top 20 Composite Risk Score (BRS)

πŸ“‰ Cascade Impact (Robustness)

🚨 Top 20 Critical Packages (Risk Score)

Package Risk Score In-Degree Betweenness
es-abstract0.48180.01110.0017
@babel/helper-plugin-utils0.40300.07200.0000
@babel/preset-env0.40290.00200.0000
postcss-preset-env0.31980.00070.0000
@babel/types0.29170.02090.0001
@babel/traverse0.28370.01310.0001
send0.26090.00130.0000
@babel/core0.25940.00790.0001
browserslist0.25620.01050.0002
supports-color0.25450.00130.0000
resolve0.25340.00460.0000
fill-range0.25240.00070.0001
jest-snapshot0.24230.00390.0004
postcss-value-parser0.24090.02550.0000
to-regex-range0.24050.00070.0000
fs.realpath0.23990.00000.0000
finalhandler0.23820.00070.0000
@jest/types0.23730.01700.0002
yargs0.23590.00070.0000
get-intrinsic0.23540.01440.0003

πŸ’₯ Top 20 Cascade Impact (Network Damage)

Package Cascade Impact Risk Score
workbox-build20.00000.1972
react-scripts16.00000.2334
postcss-preset-env14.00000.3198
regexpu-core8.00000.2061
eslint8.00000.1917
@babel/types7.00000.2917
@babel/helper-plugin-utils7.00000.4030
cssnano-preset-default6.00000.2142
source-map-resolve6.00000.1925
webpack-dev-server5.00000.2304
sax5.00000.1938
browserslist4.00000.2562
yargs4.00000.2359
extglob3.00000.1994
snapdragon3.00000.2077
@jest/types3.00000.2373
jest-snapshot3.00000.2423
fill-range3.00000.2524
resolve3.00000.2534
postcss3.00000.1902

3. Centrality Metrics

πŸ”„ Metric Correlations

πŸ”— Top 20 Most Depended-upon Packages (In-Degree)

Package In-Degree Out-Degree Risk Score
@babel/helper-plugin-utils0.07200.00000.4030
call-bound0.02680.00130.1153
postcss-value-parser0.02550.00000.2409
call-bind0.02360.00260.1835
@types/node0.02230.00070.1336
debug0.02230.00070.1468
es-errors0.02160.00000.0750
@babel/types0.02090.00130.2917
define-properties0.01900.00200.0923
chalk0.01830.00000.1196
@csstools/css-tokenizer0.01830.00000.0641
@csstools/css-parser-algorithms0.01770.00000.0618
@jest/types0.01700.00460.2373
@csstools/utilities0.01510.00000.0523
jest-util0.01440.00390.1726
get-intrinsic0.01440.00650.2354
postcss-selector-parser0.01370.00130.1894
graceful-fs0.01370.00000.0980
es-object-atoms0.01310.00070.0507
@babel/traverse0.01310.00460.2837

πŸ“¦ Top 20 Most Dependent Packages (Out-Degree)

Package Out-Degree In-Degree Risk Score
@babel/preset-env0.04580.00200.4029
postcss-preset-env0.04520.00070.3198
es-abstract0.03530.01110.4818
react-scripts0.03140.00000.2334
workbox-build0.02420.00070.1972
eslint0.02230.00070.1917
cssnano-preset-default0.01960.00070.2142
express0.01830.00070.1827
webpack-dev-server0.01830.00070.2304
@jest/core0.01830.00130.2171
webpack0.01640.00070.0917
jest-config0.01570.00130.1792
react-dev-utils0.01570.00070.1546
@jest/reporters0.01510.00070.1970
jest-runner0.01440.00130.1691
jest-runtime0.01440.00260.2197
jest-snapshot0.01370.00390.2423
jsdom0.01310.00070.1787
jest-circus0.01310.00070.1273
eslint-plugin-import0.01240.00070.1179

πŸŒ‰ Top 20 Bridges (Betweenness Centrality)

Package Betweenness In-Degree Risk Score
es-abstract0.00170.01110.4818
jest-snapshot0.00040.00390.2423
which-builtin-type0.00040.00070.1190
call-bind0.00030.02360.1835
get-intrinsic0.00030.01440.2354
jest-runtime0.00030.00260.2197
array-includes0.00030.00260.1534
jsdom0.00030.00070.1787
jest-message-util0.00030.00650.1878
reflect.getprototypeof0.00030.00130.0877
array.prototype.flat0.00020.00130.1205
jest-watcher0.00020.00200.1538
@jest/types0.00020.01700.2373
side-channel0.00020.00260.1572
browserslist0.00020.01050.2562
typed-array-length0.00020.00070.0754
object.assign0.00020.00260.1174
typed-array-byte-offset0.00020.00070.0677
@jest/fake-timers0.00020.00260.1683
@babel/core0.00010.00790.2594

🌍 Top 20 Ecosystem Critical (Dependents Count)

Package Dependents Count In-Degree Risk Score
supports-color5,765,2000.00130.2545
fs.realpath5,532,2570.00000.2399
fill-range5,461,7920.00070.2524
to-regex-range5,300,4960.00070.2405
fsevents5,289,3510.00070.2316
resolve5,229,4280.00460.2534
statuses5,106,0180.00260.2305
setprototypeof5,068,6820.00070.2221
unpipe5,053,6040.00070.2214
fresh5,019,8550.00130.2222
send4,993,6610.00130.2609
serve-static4,975,5610.00070.2323
fast-deep-equal4,968,9050.00260.2246
fast-json-stable-stringify4,957,5510.00200.2218
utils-merge4,948,6380.00000.2146
finalhandler4,946,5230.00070.2382
readdirp4,905,4600.00070.2150
yargs4,893,6850.00070.2359
camelcase4,809,6860.00330.2199
uri-js4,745,4350.00000.2094

Datasets and Reports

The table below lists all data files produced as a result of the analysis.

File Name Description Format Download
risk_scores.csv Composite Risk Scores (BRS) and ranking of all packages. CSV Download
impact_scores.csv Cascade impact simulation results. CSV Download
gephi_nodes.csv Node list for Gephi. CSV Download
gephi_edges.csv Edge list for Gephi. CSV Download
package_risk_scores.csv Simplified list of packages and their risk scores. CSV Download
Readme.md Full analysis report in Markdown format. Markdown Download

Documentation & Research

πŸ“š Literature Review

A comprehensive review of academic studies on NPM ecosystem security, threat taxonomies, and network analysis.

  • Threat Taxonomies (Backstabber’s Knife Collection)
  • NPM Network Topology (Small-world, Scale-free)
  • Dependency Resolution & Propagation
  • Detection Pipelines (Amalfi, Cerebro, OSCAR)

πŸ”¬ Methodology

Details on how the NPM supply chain network is modeled and the Composite Risk Score (CRS) calculation.

  • Data Collection (Top 1000 packages)
  • Centrality Metrics (In-Degree, Out-Degree, Betweenness)
  • Composite Risk Score Formula
  • Robustness & Cascade Analysis

πŸ›‘οΈ Security Landscape

An overview of active threats and attack vectors in the NPM ecosystem.

  • Shrinkwrapped Clones
  • Typosquatting
  • Dependency Confusion
  • Account Takeover & Worms

πŸ› Case Study: Shai-Hulud

A deep dive into the "Shai-Hulud" wormable malware attack that targeted the NPM ecosystem in 2025.

  • First Wave: Reconnaissance
  • Second Wave: Autonomous Worm
  • Comparative Technical Analysis
  • Topological Risk Implications