Commit b7611e0
feat(python): add PythonUvProvider and PythonProviderFactory for uv package manager support
TC-3855
Add automatic detection and support for Python projects managed by the uv
package manager. When uv.lock is present alongside pyproject.toml, the new
PythonProviderFactory selects PythonUvProvider (using uv pip list/show for
dependency resolution) instead of the pip-based PythonPyprojectProvider.
- Add PythonProviderFactory with Map-based lock file detection pattern
- Add PythonUvProvider with CycloneDX SBOM generation (stack + component)
- Add PyprojectTomlUtils shared utility to deduplicate TOML parsing logic
- Refactor PythonPyprojectProvider to use PyprojectTomlUtils
- Fix PEP 508 extras stripping in getDependencyName (e.g. requests[security])
- Update Ecosystem.resolveProvider() to delegate to PythonProviderFactory
- Add test fixtures and 15 unit tests for the uv provider
- Document uv support, TRUSTIFY_DA_UV_PATH, and CLI examples in README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Assisted-by: Claude Code1 parent 1baa6a8 commit b7611e0
17 files changed
Lines changed: 1296 additions & 49 deletions
File tree
- src
- main/java/io/github/guacsec/trustifyda
- providers
- tools
- utils
- test
- java/io/github/guacsec/trustifyda
- providers
- utils
- resources/tst_manifests/pip
- pip_pyproject_toml_uv_ignore
- pip_pyproject_toml_uv
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| 396 | + | |
396 | 397 | | |
397 | 398 | | |
398 | 399 | | |
| |||
504 | 505 | | |
505 | 506 | | |
506 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
507 | 513 | | |
508 | 514 | | |
509 | 515 | | |
| |||
600 | 606 | | |
601 | 607 | | |
602 | 608 | | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
603 | 617 | | |
604 | 618 | | |
605 | 619 | | |
| |||
683 | 697 | | |
684 | 698 | | |
685 | 699 | | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
686 | 706 | | |
687 | 707 | | |
688 | 708 | | |
| |||
Lines changed: 53 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
Lines changed: 10 additions & 46 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
| |||
342 | 341 | | |
343 | 342 | | |
344 | 343 | | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
| 344 | + | |
351 | 345 | | |
352 | 346 | | |
353 | 347 | | |
354 | 348 | | |
355 | 349 | | |
356 | 350 | | |
357 | 351 | | |
358 | | - | |
359 | | - | |
360 | | - | |
| 352 | + | |
| 353 | + | |
361 | 354 | | |
362 | 355 | | |
363 | 356 | | |
| |||
369 | 362 | | |
370 | 363 | | |
371 | 364 | | |
372 | | - | |
373 | | - | |
374 | | - | |
| 365 | + | |
| 366 | + | |
375 | 367 | | |
376 | 368 | | |
377 | 369 | | |
| |||
383 | 375 | | |
384 | 376 | | |
385 | 377 | | |
386 | | - | |
387 | | - | |
388 | | - | |
| 378 | + | |
| 379 | + | |
389 | 380 | | |
390 | 381 | | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | 382 | | |
397 | 383 | | |
398 | 384 | | |
| |||
414 | 400 | | |
415 | 401 | | |
416 | 402 | | |
417 | | - | |
418 | | - | |
419 | | - | |
| 403 | + | |
420 | 404 | | |
421 | 405 | | |
422 | 406 | | |
423 | 407 | | |
424 | 408 | | |
425 | 409 | | |
426 | 410 | | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
| 411 | + | |
439 | 412 | | |
440 | 413 | | |
441 | 414 | | |
| |||
453 | 426 | | |
454 | 427 | | |
455 | 428 | | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | 429 | | |
466 | 430 | | |
467 | 431 | | |
| |||
0 commit comments