golang / vscode-go

Go extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=golang.Go
Other
3.78k stars 727 forks source link

govulncheck: adjust support to handle relative paths #3393

Open zpavlinovic opened 1 month ago

zpavlinovic commented 1 month ago

As of v1.1.0, govulncheck JSON paths are relative to their enclosing module, rather than being absolute as earlier. This change was done to increase portability and to not leak information about the user filesystem.

If vscode-go starts using govulncheck@v1.1.0 or newer, the chances are the relative paths will break things. However, each path is relative to their enclosing module (including stdlib) and the module information is available in JSON. This should be sufficient to compute absolute paths on the local machine.

hyangah commented 1 month ago

This should be done before x/vuln dependency upgrade in gopls.