jenkinsci / fortify-plugin

Fortify Jenkins plugin
https://plugins.jenkins.io/fortify
Other
23 stars 30 forks source link

Translate maven project locally on Jenkins/Ubuntu doesn't find sourceanalyzer #20

Closed mathiaskinzler closed 3 years ago

mathiaskinzler commented 4 years ago

However, it says "Found executable: /opt/jenkins/fortify/Fortify_SCA_and_Apps_19.1.2/bin/sourceanalyzer" also (see below), so FORTIFY_HOME is set properly. Since this is a post-build step, there is no good way to set a path or alias. Note that I snipped off some project-specific names for clarity.

It is possible to work around this by adding an alias in e.g. /usr/bin but that is not feeling like a good approach in linux.

16:32:08 Fortify Jenkins plugin v 20.1.33 16:32:08 Launching Fortify SCA translate command 16:32:08 Found executable: /opt/jenkins/fortify/Fortify_SCA_and_Apps_19.1.2/bin/sourceanalyzer 16:32:08 Running Maven 3 translation 16:32:08 Found executable: /usr/bin/mvn 16:32:08 [] $ /opt/jenkins/fortify/Fortify_SCA_and_Apps_19.1.2/bin/sourceanalyzer -Dcom.fortify.sca.ProjectRoot=/var/lib/jenkins/workspace//.fortify -b -debug -verbose /usr/bin/mvn -f /pom.xml 16:32:09 Fortify Static Code Analyzer 19.1.2.0007 (using JRE 1.8.0_181) 16:32:11 [INFO] Scanning for projects...

16:32:12 [INFO] Executing Command: /bin/sh -c cd /var/lib/jenkins/workspace/ && sourceanalyzer -Xmx91168317850 -Xss16M @/var/lib/jenkins/workspace//target/fortify/sca-translate--pom.txt 16:32:12 [ERROR] Command exited with code 127. 16:32:12 /bin/sh: 1: sourceanalyzer: not found
vrulevskyi commented 3 years ago

Hi @mathiaskinzler, the issue has been fixed in a new Fortify Jenkins plugin release v20.2.34. Please, check it out. In case if you need further help, please, reopen this issue or create another one. Closing the issue in this regard.