dep-oracle 1.2.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +33 -8
  2. package/dist/action/index.js +630 -16
  3. package/dist/badge-5Z3WAD2B.js +89 -0
  4. package/dist/badge-5Z3WAD2B.js.map +1 -0
  5. package/dist/chunk-32B3QIPY.js +1505 -0
  6. package/dist/chunk-32B3QIPY.js.map +1 -0
  7. package/dist/{chunk-TXSNFX3N.js → chunk-3SHHSWZU.js} +635 -17
  8. package/dist/chunk-3SHHSWZU.js.map +1 -0
  9. package/dist/chunk-7DST6SNA.js +258 -0
  10. package/dist/chunk-7DST6SNA.js.map +1 -0
  11. package/dist/{chunk-VHQCTVCZ.js → chunk-DBORVN6C.js} +361 -2338
  12. package/dist/chunk-DBORVN6C.js.map +1 -0
  13. package/dist/chunk-HX6MGNBD.js +271 -0
  14. package/dist/chunk-HX6MGNBD.js.map +1 -0
  15. package/dist/chunk-IVXGOPRU.js +145 -0
  16. package/dist/chunk-IVXGOPRU.js.map +1 -0
  17. package/dist/chunk-SP3VYPXX.js +218 -0
  18. package/dist/chunk-SP3VYPXX.js.map +1 -0
  19. package/dist/chunk-UMB5MJHL.js +239 -0
  20. package/dist/chunk-UMB5MJHL.js.map +1 -0
  21. package/dist/cli/index.js +414 -19
  22. package/dist/cli/index.js.map +1 -1
  23. package/dist/index.js +9 -84
  24. package/dist/index.js.map +1 -1
  25. package/dist/mcp/server.js +33 -12
  26. package/dist/mcp/server.js.map +1 -1
  27. package/dist/npm-UB54H37N.js +9 -0
  28. package/dist/npm-UB54H37N.js.map +1 -0
  29. package/dist/orchestrator-VOOYKDPT.js +8 -0
  30. package/dist/orchestrator-VOOYKDPT.js.map +1 -0
  31. package/dist/python-U4G2GK4J.js +9 -0
  32. package/dist/python-U4G2GK4J.js.map +1 -0
  33. package/dist/{server-TKLM7YIF.js → server-MLFC2O2B.js} +50 -18
  34. package/dist/server-MLFC2O2B.js.map +1 -0
  35. package/dist/store-Z5UANEBB.js +8 -0
  36. package/dist/store-Z5UANEBB.js.map +1 -0
  37. package/dist/trust-score-YXYDFVPZ.js +8 -0
  38. package/dist/trust-score-YXYDFVPZ.js.map +1 -0
  39. package/package.json +1 -1
  40. package/server.json +2 -2
  41. package/dist/chunk-TXSNFX3N.js.map +0 -1
  42. package/dist/chunk-VHQCTVCZ.js.map +0 -1
  43. package/dist/server-TKLM7YIF.js.map +0 -1
package/README.md CHANGED
@@ -34,8 +34,8 @@
34
34
 
35
35
  ## Why?
36
36
 
37
- - **62% of breaches** in 2025 came from supply chain attacks
38
- - The average project has **683 transitive dependencies**
37
+ - Supply chain attacks increased **742% since 2019** ([Sonatype 2024 Report](https://www.sonatype.com/state-of-the-software-supply-chain/introduction))
38
+ - The average npm project pulls in **hundreds of transitive dependencies** — any one could be compromised
39
39
  - `npm audit` only catches **known** CVEs — dep-oracle **predicts** future risks
40
40
  - You audit your code. But do you audit your **trust**?
41
41
 
@@ -162,6 +162,26 @@ Packages that patch vulnerabilities quickly (within 7 days) receive a **+10 bonu
162
162
 
163
163
  If an API is unreachable (GitHub down, no internet, rate limited), dep-oracle doesn't crash. The missing metric weight is redistributed across available metrics. If 3+ metrics are unavailable, a reliability warning is shown.
164
164
 
165
+ ### Blast Radius Methodology
166
+
167
+ The blast radius metric counts how many of your source files directly import a given dependency:
168
+
169
+ 1. Recursively collects all `.js`, `.ts`, `.jsx`, `.tsx`, `.mjs`, `.mts`, `.cjs`, `.cts` files
170
+ 2. Skips `node_modules`, `.git`, `dist`, `build`, `coverage`, and other build directories
171
+ 3. Searches each file for `import ... from 'pkg'`, `require('pkg')`, and dynamic `import('pkg')` patterns
172
+ 4. Reports the count, file paths, and percentage of codebase affected
173
+
174
+ **Current limitations:**
175
+ - Only scans JavaScript/TypeScript import patterns
176
+ - Python `import` statements are not yet analyzed (blast radius returns 0 for Python-only projects)
177
+ - Does not trace re-exports or barrel files — counts direct imports only
178
+
179
+ ### Weight Rationale
180
+
181
+ Weights are based on the principle that **security vulnerabilities and maintainer abandonment** are the strongest predictors of supply chain risk, followed by development activity signals. Weights are fully configurable via `.dep-oraclerc.json` — enterprise teams can adjust to match their specific risk tolerance.
182
+
183
+ When data is unavailable for a metric, the score is pulled toward the midpoint (50) proportionally to the fraction of missing weight, preventing artificial inflation from missing data.
184
+
165
185
  ## Typosquat Detection
166
186
 
167
187
  dep-oracle uses a multi-layer approach to catch typosquatting:
@@ -238,10 +258,13 @@ jobs:
238
258
  runs-on: ubuntu-latest
239
259
  steps:
240
260
  - uses: actions/checkout@v4
241
- - uses: ertugrulakben/dep-oracle-action@v1
261
+ - uses: actions/setup-node@v4
242
262
  with:
243
- threshold: 60
244
- format: sarif
263
+ node-version: '20'
264
+ - name: Run dep-oracle
265
+ run: npx dep-oracle scan --format sarif --min-score 60
266
+ env:
267
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
245
268
  ```
246
269
 
247
270
  ## Configuration
@@ -296,17 +319,19 @@ Or add to `package.json`:
296
319
  | Feature | npm audit | Dependabot | Socket.dev | Snyk | **dep-oracle** |
297
320
  |---------|-----------|------------|------------|------|----------------|
298
321
  | Known CVE scan | Yes | Yes | Yes | Yes | **Yes** |
299
- | Predictive risk | No | No | Partial | No | **Yes** |
322
+ | Predictive risk | No | No | Partial | Partial | **Yes** |
300
323
  | Trust Score (0-100) | No | No | No | No | **Yes** |
301
324
  | Zombie detection | No | No | No | No | **Yes** |
302
- | Blast radius | No | No | No | No | **Yes** |
325
+ | Blast radius | No | Partial | No | No | **Yes** |
303
326
  | Typosquat detection | No | No | Yes | No | **Yes** |
304
327
  | Trend prediction | No | No | No | No | **Yes** |
305
328
  | Migration advisor | No | Partial | No | Partial | **Yes (131 pkgs)** |
306
- | MCP integration | No | No | Yes | Yes | **Yes** |
329
+ | MCP integration | No | No | No | No | **Yes** |
307
330
  | Zero install (npx) | Yes | No | No | No | **Yes** |
308
331
  | Free & open source | Yes | Yes | Freemium | Freemium | **Yes** |
309
332
 
333
+ > **Note:** dep-oracle is not a replacement for Snyk or Socket.dev in enterprise environments. They have dedicated security research teams and CVE databases. dep-oracle focuses on **predictive signals** (trust scores, maintenance health, funding, zombie detection) that complement existing tools.
334
+
310
335
  ## Programmatic API
311
336
 
312
337
  ```typescript