syft icon indicating copy to clipboard operation
syft copied to clipboard

fix Windows file paths in local go mod cache

Open willmurphyscode opened this issue 1 year ago • 0 comments

Previously, the file resolver was created from incorrect calls (path.Join instead of filepath.Join) which resulted Go license searches always missing on Windows. Use filepath.* functions when initializing the Go config, and when the unindexed file resolver is being created.

Fixed #2615.

TODOs:

  • [ ] unit tests
  • [ ] audit other configs and go license paths for incorrect path.Join use where filepath is needed
  • [ ] Add Windows CI runner to prevent introduction of this sort of bug in the future (probably separate PRs :) )

willmurphyscode avatar Feb 16 '24 20:02 willmurphyscode