SAST fails to analyze Scala project: lstat /proc/1/fd/5: no such file or directory
Summary
SAST fails to analyze Scala sbt projects. This error shows up in the log:
lstat /proc/1/fd/5: no such file or directory
Steps to reproduce
- Enable SAST on a Scala sbt project
- Run the pipeline
Example Project
https://gitlab.com/gitlab-org/security-products/tests/scala-sbt
See https://gitlab.com/gitlab-org/security-products/tests/sast/-/jobs/74330511.
What is the current bug behavior?
SAST fails when it should not:
[success] Total time: 35 s, completed Jun 12, 2018 1:18:39 PM
2018/06/12 13:18:39 lstat /proc/1/fd/5: no such file or directory
2018/06/12 13:18:39 Container exited with non zero status code
ERROR: Job failed: exit code 1
What is the expected correct behavior?
Should not fail.
Investigation
The problem only occurs when running find-sec-bugs-sbt:11-0-stable from sast:11-0-stable. Everything works fine when running find-sec-bugs-sbt:11-0-stable directly on the exact same project:
docker run ---rm --volume $PWD:/tmp/code --env CI_PROJECT_DIR=/tmp/code \
registry.gitlab.com/gitlab-org/security-products/analyzers/find-sec-bugs-sbt:11-0-stable
Here are the last lines of the output:
[info] Done compiling.
[success] Total time: 21 s, completed Jun 12, 2018 4:27:02 PM
The following classes needed for analysis were missing:
lambdaDeserialize
apply
Warnings generated: 2
Missing classes: 2
/proc/1/fd/5 is created by signalfd and "can be used to accept signals targeted at the caller".