fix: read ignore patterns from workspace member Cargo.toml files#375
fix: read ignore patterns from workspace member Cargo.toml files#375a-oren wants to merge 2 commits intoguacsec:mainfrom
Conversation
ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan Review Summary by QodoRead ignore patterns from workspace member Cargo.toml files
WalkthroughsDescription• Read ignore patterns from workspace member Cargo.toml files • Merge member-level ignores with workspace-level ignores • Add manifestPath field to CargoPackage model • Add comprehensive tests for member ignore pattern detection Diagramflowchart LR
A["Virtual Workspace"] -->|"for each member"| B["getMemberIgnoredDeps"]
B -->|"read member Cargo.toml"| C["Parse ignore patterns"]
C -->|"merge with workspace ignores"| D["Member ignored deps set"]
D -->|"pass to processWorkspaceMember"| E["Process member dependencies"]
File Changes1. src/main/java/io/github/guacsec/trustifyda/providers/CargoProvider.java
|
Code Review by Qodo
1. Member Cargo.toml failures ignored
|
|
|
||
| CargoProvider provider = new CargoProvider(memberCargoToml); | ||
|
|
||
| java.lang.reflect.Method method = |
There was a problem hiding this comment.
Just minor suggestion: we should not use reflection in tests
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 #374
Checklist
Additional information