Skip to content
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

Guided Remediation: Add manifest resolution #757

Merged
merged 5 commits into from
Jan 22, 2024

Conversation

michaelkedar
Copy link
Member

Starting to make guided remediation public #352 🎉

This PR has the code used to resolve the dependency graph of a manifest (i.e. a package.json) using the deps.dev resolvers and find vulnerabilities within it.

Doesn't include the code to actually parse/write package.json files - will probably add that in the next PR.

Much of this has been reviewed internally already, but I've made some significant changes/refactoring to dependency_chain.go and the computeVulns() function in resolve.go, so please take a more careful look at those.

@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0d45974) 79.67% compared to head (4f7a3c0) 79.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #757      +/-   ##
==========================================
+ Coverage   79.67%   79.72%   +0.04%     
==========================================
  Files          89       89              
  Lines        6145     6145              
==========================================
+ Hits         4896     4899       +3     
+ Misses       1045     1043       -2     
+ Partials      204      203       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

go.mod Outdated Show resolved Hide resolved
Copy link
Contributor

@cuixq cuixq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Copy link
Collaborator

@another-rex another-rex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's a good way to test this manually before we get automated tests?

internal/resolution/client/depsdev_client.go Outdated Show resolved Hide resolved
internal/resolution/client/depsdev_client.go Show resolved Hide resolved
internal/resolution/datasource/depsdev_api.go Show resolved Hide resolved
@oliverchang
Copy link
Collaborator

What's a good way to test this manually before we get automated tests?

Re tests, it would be easiest to run the internal version for now. Check with @michaelkedar on this.

@michaelkedar
Copy link
Member Author

Yeah, manually testing this as-is would be clumsy - you have to manually fill in the Manifest struct.

@michaelkedar michaelkedar merged commit fc3fa41 into google:main Jan 22, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants