Chris Dormani
Chris Dormani

Reputation: 510

How do I supply the path to a Rails application despite being in the root folder?

I am trying to run Brakeman on my code to identify any security vulnerabilities.

I have installed the gem and I am in the root folder of my Rails 4.2.4 application.

However when I try and run Brakeman using:

brakeman –f html -o brakeman.html

I keep getting the following message returned in the terminal:

Please supply the path to a Rails application.

How is this done in a Rails environment for this gem?

Upvotes: 1

Views: 1126

Answers (2)

Justin
Justin

Reputation: 1621

The options you supplied should work just fine, although -f html is redundant when the extension of the output file is .html.

The real root of the issue is using –f (en dash) instead of -f (hyphen). Subtle difference; perhaps due to copy-pasting the command.

Upvotes: 1

Trip
Trip

Reputation: 27114

You can additionally supply the root like so :

brakeman . –f html -o brakeman.html

Albeit, it's strange it's not auto-detecting that. Perhaps because of all the options you chose. I'd also try stripping it down as just performing :

brakeman

.. and see if that can detect that you're in the root.

Upvotes: 2

Related Questions