sbt dependency scanning shouldn't list the project itself as a dependency

Summary

Reports generated for sbt projects by gemnasium-maven list the project itself as a dependency. This is unlike other package managers and frameworks.

Example Project

Expectation: https://gitlab.com/gitlab-org/security-products/analyzers/gemnasium-maven/-/blob/master/qa/expect/scala-sbt/gl-dependency-scanning-report.json#L2695

Project: https://gitlab.com/gitlab-org/security-products/tests/scala-sbt

What is the current bug behavior?

Project in which build.sbt exists is listed as a dependency in the dependency scanning report.

What is the expected correct behavior?

Project shouldn't be listed.

Relevant logs and/or screenshots

https://gitlab.com/gitlab-org/security-products/analyzers/gemnasium-maven/-/blob/master/qa/expect/scala-sbt/gl-dependency-scanning-report.json#L2695

Possible fixes

Find top-level package when parsing the dot file graph and remove.

Implementation plan

Update gemnasium sbt parser to remove the first node in the parsed dot graph via g.RemoveNode(0): https://gitlab.com/gitlab-org/security-products/analyzers/gemnasium/-/blob/master/scanner/parser/sbt/sbt.go#L63

Edited by Igor Frenkel