Handle go-project-modules.json file parsing [gemnasium only] [sbomgen-golang only]
What does this MR do?
This MR adds the ability for the Go parser to handle parsing go-project-modules.json files.
The Go parser intentionally breaks the dependency inversion principle here to
optimize parsing. It assumes that the reader passed in is a file so that
it can match the name to the required parsing logic. Without this, the
parser would have to first attempt to parse a go-project-modules.json file.
If this fails, it would then use the go.sum parser and return an error if one
was encountered. This strategy is sub-optimal because it would result in a
bigger cpu and memory footprint.
Merge Request Stack
This MR is a member of a merge request stack. A merge request stack groups changes that are related.
- Add go toolchain required for go builder [gemna... (!389 - merged)
- Create go builder [gemnasium only] (!390 - merged)
-
Handle go-project-modules.json file parsing [ge... (!391 - merged)
⬅ You are currently viewing this entry - Add golang builder to gemnasium and sbomgen-gol... (!392 - merged)
What are the relevant issue numbers?
Incorrect usage of go.sum in go dependency scan... (gitlab-org/gitlab#321081 - closed)
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer