Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.8.0 findsecbugs.sh script errors #460

Closed
BuffaloWill opened this issue Mar 20, 2019 · 2 comments
Closed

1.8.0 findsecbugs.sh script errors #460

BuffaloWill opened this issue Mar 20, 2019 · 2 comments
Assignees
Labels
Milestone

Comments

@BuffaloWill
Copy link

BuffaloWill commented Mar 20, 2019

Environment

FindSecBugs 1.8.0

Component Version
FindSecBugs 1.8.0

Problem

I wanted to test out findsecbugs CLI as discussed in https://github.com/find-sec-bugs/find-sec-bugs/wiki/CLI-Tutorial. I downloaded the 1.8.0 release and ran the code as described:

./findsecbugs.sh [JAR FILE]

./findsecbugs.sh: line 1: $'\r': command not found
./findsecbugs.sh: line 3: $'\r': command not found
Error: Could not find or load main class edu.umd.cs.findbugs.LaunchAppropriateUI
  1. To fix the \r error (I think caused by saving the sh in Windows):
sed -i 's/\r$//' findsecbugs.sh

worked.

  1. Changing line 4 from:
java -cp "$SOURCE/lib/\*:" edu.umd.cs.findbugs.LaunchAppropriateUI -quiet -pluginList lib/findsecbugs-plugin-1.7.1.jar -include include.xml $@

to

java -cp lib/*: edu.umd.cs.findbugs.LaunchAppropriateUI -quiet -pluginList lib/findsecbugs-plugin-1.7.1.jar -include include.xml $@

fixed the path issue. Not sure the proper way this script should be deployed so I took my best guess and put it in the root find-sec-bugs dir. Running from the root dir takes away the need for $SOURCE AFAIK. I think \* will always cause issues.

  • ubuntu 18.04
  • bash 4.4.19

Thank you!

@BuffaloWill BuffaloWill changed the title findsecbugs.sh errors 1.8.0 findsecbugs.sh script errors Mar 20, 2019
@h3xstream
Copy link
Member

You can replace the .sh by this one --> https://github.com/find-sec-bugs/find-sec-bugs/blob/master/cli/findsecbugs.sh

Side note : I am going to do a release this week that will include this fix.

@BuffaloWill
Copy link
Author

Ah cool. Thanks!!

@h3xstream h3xstream added this to the version-1.9.0 milestone Mar 20, 2019
@h3xstream h3xstream added the bug label Mar 20, 2019
@h3xstream h3xstream self-assigned this Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants