osv-scanner icon indicating copy to clipboard operation
osv-scanner copied to clipboard

Support for Scala SBT

Open LironJit opened this issue 10 months ago • 6 comments

Hi :) Curious if SBT is anywhere on the roadmap, It'd be super awesome if we could scan build.sbt files for dependency vulnerabilities using osv-scanner! Thanks in advance!

LironJit avatar Apr 16 '24 10:04 LironJit

Hi, thanks for this request.

I don't believe any of us are familiar with Scala or were aware of SBT before. Is there a specific canonical package manager for Scala? Or is this just Maven?

Contributions are also very welcome :)

oliverchang avatar Apr 16 '24 17:04 oliverchang

Hi @oliverchang, thanks for your quick response!

SBT is indeed the primary build tool for Scala projects, similar to Maven or Gradle for Java It uses a file called build.sbt to define dependencies. This file is essential for dependency management in Scala projects and can be scanned for vulnerabilities Unlike Maven, which uses XML, SBT's build files are Scala code

Here's a link to how dependencies are typically mentioned in the build.sbt file - https://github.com/sbt/sbt-native-packager/blob/master/build.sbt#L16-L26

LironJit avatar Apr 18 '24 09:04 LironJit

Thanks for the response! My question wasn't phrased well since Maven is a bit of an overloaded term -- it refers to both a package repository protocol and an overall build system/tool.

Do the dependencies specified inside build.sbt refer to packages inside a Maven repository? Or are there SBT specific repositories for dependencies? It sounds like if they refer to Maven packages, we just need to extract "ecosystem": "Maven" packages from them?

Contributions are also very welcome, if you are able to help with creating a PR for this!

oliverchang avatar Apr 23 '24 02:04 oliverchang

This issue has not had any activity for 60 days and will be automatically closed in two weeks

github-actions[bot] avatar Jul 18 '24 18:07 github-actions[bot]

Automatically closing stale issue

github-actions[bot] avatar Aug 01 '24 19:08 github-actions[bot]

This issue has not had any activity for 60 days and will be automatically closed in two weeks

See https://github.com/google/osv-scanner/blob/main/CONTRIBUTING.md for how to contribute a PR if you're interested in helping out.

github-actions[bot] avatar Sep 30 '24 23:09 github-actions[bot]

Automatically closing stale issue

github-actions[bot] avatar Oct 14 '24 23:10 github-actions[bot]