Commit 0fef32a
fix: read ignore patterns from workspace member Cargo.toml files (guacsec#375)
## Description
Previously, ignore patterns (exhortignore / trustify-da-ignore) were
only read from the root Cargo.toml. In a virtual workspace, member
crates have their own Cargo.toml with [dependencies], so ignore comments
there were never detected. This caused the Java client to include
dependencies that should have been ignored at the member level.
Now, when processing each workspace member for stack analysis, its own
Cargo.toml is parsed for ignore patterns and merged with workspace-level
ignores before walking the dependency tree.
**Related issue (if any):** fixes guacsec#374
## Checklist
- [x] I have followed this repository's contributing guidelines.
- [x] I will adhere to the project's code of conduct.
## Additional information
> Anything else?
---------
Co-authored-by: Chao Wang <chaowan@redhat.com>1 parent 203bfb5 commit 0fef32a
3 files changed
Lines changed: 119 additions & 28 deletions
File tree
- src
- main/java/io/github/guacsec/trustifyda/providers
- rust/model
- test/java/io/github/guacsec/trustifyda/providers
Lines changed: 49 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
205 | 206 | | |
206 | | - | |
| 207 | + | |
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
212 | 259 | | |
213 | 260 | | |
214 | 261 | | |
| |||
714 | 761 | | |
715 | 762 | | |
716 | 763 | | |
717 | | - | |
| 764 | + | |
718 | 765 | | |
719 | 766 | | |
720 | 767 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
Lines changed: 69 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
409 | 408 | | |
410 | | - | |
411 | | - | |
412 | 409 | | |
| 410 | + | |
413 | 411 | | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
| 412 | + | |
425 | 413 | | |
426 | 414 | | |
427 | 415 | | |
| |||
627 | 615 | | |
628 | 616 | | |
629 | 617 | | |
630 | | - | |
631 | 618 | | |
| 619 | + | |
632 | 620 | | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
| 621 | + | |
644 | 622 | | |
645 | 623 | | |
646 | 624 | | |
| |||
766 | 744 | | |
767 | 745 | | |
768 | 746 | | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
769 | 812 | | |
0 commit comments