Is Fortify-code scan possible with Scala

2019-05-27 04:26发布

Can I use Fortify to scan scala-code or the generated java (jar) files ? I know that I can do the jar option technically but are there any known challenges with respect to the generated java code?

标签: scala fortify
3条回答
在下西门庆
2楼-- · 2019-05-27 04:31

Fortify SCA now officially supports Scala (since December 2017).

Adding this support was a collaborative project between Lightbend and Micro Focus.

I did most of the engineering work on the Lightbend side, writing a compiler plugin that translates Scala code to an intermediate form that Fortify understands. Micro Focus added Scala-specific security rules and made any necessary adjustments to the Fortify back end. (They also made sure that existing Java rules also worked for equivalent Scala code, when appropriate.)

See:

Note that Fortify SCA is commercial software and so is the new Scala plugin. To use them, you must

  • have a Fortify SCA license (or use Fortify on Demand)
  • also be a Lightbend subscriber
查看更多
Rolldiameter
3楼-- · 2019-05-27 04:42

I saw a response from James Roper (Play) to this question. https://groups.google.com/forum/#!topic/play-framework/MtatDozyDjg

Basically he says that any issues that could be found by a static code analysis tool are a mistake in an API and should be fixed. JAVA cannot do this because of backwards compatibility.

查看更多
霸刀☆藐视天下
4楼-- · 2019-05-27 04:51

I have tested scala code using Fortify SCA engine 3.8, 4.21. The Fortify found no issues. If I recall correctly, I saw a lot of warning during translation stage, so I assume that Fortify does not have native parser for the scala code.

查看更多
登录 后发表回答