-
Notifications
You must be signed in to change notification settings - Fork 87
New transitive decorator #954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New transitive decorator #954
Conversation
orto17
commented
Nov 5, 2025
- All tests passed. If this feature is not already covered by the tests, I added new tests.
- This pull request is on the dev branch.
- I used gofmt for formatting the code before submitting the pull request.
- Update documentation about new features / new supported technologies
9466cdb to
cba8e0b
Compare
bb75cf7 to
4e3a1f0
Compare
attiasas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
- fix tests
- make sure to validate output before merging
utils/outputwriter/outputcontent.go
Outdated
| if len(path) < 2 { | ||
| continue | ||
| } | ||
| // First element is always a direct dependency | ||
| first := path[0] | ||
| key := fmt.Sprintf("%s:%s", first.Name, first.Version) | ||
| directDeps[key] = first | ||
|
|
||
| for i := 1; i < len(path)-1; i++ { | ||
| component := path[i] | ||
| key := fmt.Sprintf("%s:%s", component.Name, component.Version) | ||
| transitiveDeps[key] = component | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first node in the impact path is the scanned component itself. The second one is the direct dependency, check getDirectComponentsAndImpactPaths in security CLI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also it means that transitive is: if more than 2 in impact path => the impacted component is transitive
attiasas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sure to validate content by running tests on both types of providers for the content you produce
14d5703 to
4c32e05
Compare
