-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat(go): support dependency graph and show only direct dependencies in the tree #3691
Conversation
modPath := filepath.Join(modDir, "go.mod") | ||
f, err := os.Open(modPath) | ||
if errors.Is(err, fs.ErrNotExist) { | ||
log.Logger.Debugf("go.mod not found: %s", pkgID) |
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.
This log message can be confusing. Users may not be aware that we are scanning $GOPATH/pkg/mod
directory.
Maybe write something like this:
%s doesn't use Go modules
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.
Done 0c3c006
pkg/report/table/vulnerability.go
Outdated
if depth < 1 { | ||
branch := topItem.AddBranch(parent.ID) | ||
addParents(branch, parent, parentMap, ancestors, seen, depth+1) |
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.
looks like it is not possible or am i missing something?
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.
You're right. I wanted to support --dependency-depth
so the depth can be configured. But I eventually changed my mind because it could be too much at the moment. I'll remove it.
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.
Done 02ba0cb
Description
Related PRs
Checklist