gomod: Update transitive dependencies (with security vulnerabilities) #22487
Replies: 14 comments 5 replies
|
Important note: Unless the go version directive in If you run
After running whichever command is applicable, you can assume that parsing go.mod will tell you about all transitive dependencies, and that the (This matters because there are many projects out there that maintain support for old go versions, so their version directive will be old if not absent entirely!) |
|
I would prefer if we could (a) support updating the directive in |
|
I don't think it's appropriate for Renovate to raise the go version directive, especially not by default, because that would cause problems for the many projects that maintain support for older versions of go.
Bumping the go version directive would be a disruptive change for any of those that are libraries with downstream users, so it's not safe to do by default. However, ignoring security issues in transitive dependencies is also a surprising foot-gun. I believe updating insecure transitive dependencies should be in the default/base config.
Scratch that, just noticed a better way! (Still posting it because I think there should be some recorded notes about why bumping the go version directive is not a good thing.) Don't parse Caution: If you run |
|
I disagree that Renovate should not offer to update the go.mod directive. Proposing upgrades is what Renovate does, especially when versions are end of life. Our goal would be to support semantics like: "Keep my libraries bumped to support non-EOL go versions, and nothing more". Don't forget that users of Renovate have a choice about whether to accept an update, or to suppress it by default to be listed in the Dependency Dashboard for creation on demand. We are also not going to do this:
Our parsing is now JS/TS-based, and "shelling out" to CLI tools like |
In light of that constraint, having Renovate bump to 1.17 and then presuming the go.mod to be complete (per behavior of 1.17) seems fine. I think you would have to be manually modifying
This means supporting pre-1.17 until go 1.19 is out.
Good point! I do think that in light of the library situation, some caution is probably warranted with regards to automerge. People may not be expecting adding the I think it would be important that the PR for the update to go1.17 include clear messaging about why the bump is necessary in order to allow Renovate to monitor indirect dependencies. Using Previewing what subsequent indirect dependency updates would be opened (akin to the preview in the onboarding PR) would be nice. |
|
What are the next steps to get this moved beyond "status: Requirements" to something that might get implemented? |
|
I think this discussion ballooned into something that's difficult to mark as ready. Perhaps better to narrow requirements - possibly in a separate feature request - that Renovate update indirect dependencies, as this would be the starting point. |
Is this not actionable? |
|
No. |
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
|
Can I ask why
is not actionable? If someone would like to allow update only vulnerable packages both direct and indirect I would assume that: would work. But it doesn't. I was unpleasantly surprised that there is such a gap in the renovate. What would be the problem with also considering indirect dependencies for vulnerabilities? |
|
Using the original reproduction repository and the right config, this seems to now work: renovate-reproductions/22487#4 What it doesn't support is only vulnerability fixes for transitive. In other words you need to turn on all transitive updates. |
|
The |
Uh oh!
There was an error while loading. Please reload this page.
What would you like Renovate to be able to do?
Renovate should update dependencies with security vulnerabilities even if they have the
// indirectcomment ingo.mod.The current behavior of totally ignoring dependencies that have the
// indirectcomment means that in this reproduction:https://github.com/eriksw/renovate-gomod-insecure-transitive
Renovate should have opened a PR to update
github.com/tidwall/gjsonper CVE-2021-42836.This is followup to #9578 (comment)
If you have any ideas on how this should be implemented, please tell us here.
Consider reverting #4650 in favor of something like what was proposed in #4586 (comment)
Is this a feature you are interested in implementing yourself?
Maybe
All reactions