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

x/vuln: verify replace directives work #60013

Closed
tatianab opened this issue May 5, 2023 · 5 comments
Closed

x/vuln: verify replace directives work #60013

tatianab opened this issue May 5, 2023 · 5 comments
Assignees
Labels
FrozenDueToAge vulncheck or vulndb Issues for the x/vuln or x/vulndb repo
Milestone

Comments

@tatianab
Copy link

tatianab commented May 5, 2023

No description provided.

@tatianab tatianab added the vulncheck or vulndb Issues for the x/vuln or x/vulndb repo label May 5, 2023
@tatianab tatianab added this to the vuln/v0.2.0 milestone May 5, 2023
@bcmills
Copy link
Contributor

bcmills commented May 8, 2023

Note that cmd/go itself does not allow replace directives to be recursive. (Only the directives from the main module are in effect.) Not sure if that changes what you want to do in x/vuln. 🤔

@ianthehat
Copy link

I think this refers to replace directives who's target is replaced by another replace directive in the same go.mod

@bcmills
Copy link
Contributor

bcmills commented May 8, 2023

I don't think those are recursive either. (In theory you could do a path-swap that way, but in practice it shouldn't be possible because the module declarations in the go.mod file won't match.)

@ianthehat
Copy link

Hmm, it lets you declare it, but then does not use it

a go.mod with

replace golang.org/x/text v0.9.0 => golang.org/x/text v0.5.0
replace golang.org/x/text v0.5.0 => golang.org/x/text v0.3.0
require golang.org/x/text v0.9.0

is valid, but will use golang.org/x/text v0.5.0 not golang.org/x/text v0.3.0 according to go list
maybe that should be an error?
Either way, it seems like there is nothing to do for govulncheck

@ianthehat ianthehat changed the title x/vuln: support recursive replace directives x/vuln: verify replace directives work May 18, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/498056 mentions this issue: internal/scan: change replace handling

@golang golang locked and limited conversation to collaborators Jun 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge vulncheck or vulndb Issues for the x/vuln or x/vulndb repo
Projects
None yet
Development

No branches or pull requests

4 participants