News for hackers. Stuff that matters.
Re:Vulnerability Management for Go by Thaxll on Tuesday September 06, 2022 @04:43PM (#32742950)
Why would some people even care or look at go.sum where go.mod is clean and self explanatory?
Re:Vulnerability Management for Go by preseinger on Tuesday September 06, 2022 @07:16PM (#32744395)
Prior to 1.17, go.mod was not a complete representation of the dep graph. More broadly, the problem is that programmers expect dependency management tooling to have a lock file, see go.sum, and assume it's a lock file. This isn't a problem with those programmers, it's a problem with Go modules.
Re:Vulnerability Management for Go by remus on Wednesday September 07, 2022 @03:20AM (#32747522)
> This isn't a problem with those programmers, it's a problem with Go modules.

That seems like a bit of a jump! Maybe there's a better way of building dependency management tooling that doesn't use lock files, it seems strange to tie yourself to this approach just because it's how other tools work.

Re:Vulnerability Management for Go by Thaxll on Wednesday September 07, 2022 @09:38AM (#32750439)
go.mod is the lock file.
Re:Vulnerability Management for Go by preseinger on Thursday September 08, 2022 @03:43PM (#32770997)
It isn't in the traditional sense. There isn't anything in its specification that guarantees the things that most people expect lock files to guarantee.
Re:Vulnerability Management for Go by salmo on Tuesday September 06, 2022 @06:29PM (#32744042)
Well, I do understand that the actual version used there is ambiguous.

Probably the best would be to take the newest from go.sum. That’s what some scanners are doing now.

Filed bugs with 2 vendors over this though.

Re:Vulnerability Management for Go by preseinger on Tuesday September 06, 2022 @07:17PM (#32744398)
The newest from go.sum isn't reliably the version used in the dep graph. The only way to get that information reliably is via go list. Unfortunately.
Re:Vulnerability Management for Go by salmo on Tuesday September 06, 2022 @07:31PM (#32744520)
Oh, you are totally right. I read that in the GitLab issue tracking their version of the problem and totally forgot that’s where they landed.
Re:Vulnerability Management for Go by smoyer on Wednesday September 07, 2022 @09:15AM (#32750130)
Also don't forget that more than one version of a dependency might be compiled into your application!
Re:Vulnerability Management for Go by preseinger on Thursday September 08, 2022 @03:42PM (#32770985)
Only one major version. And go considers different major versions to be different dependencies.
Re:Vulnerability Management for Go by arccy on Wednesday September 07, 2022 @11:02AM (#32751554)
not true for go
Re:Vulnerability Management for Go by kubanczyk on Wednesday September 07, 2022 @05:42AM (#32748517)
For the curious it's:

    go list -m all