You can use the --skip-files
option to ignore specific files, but there is not currently support for skipping entire directories. There is also the inverse option --only-files
which does accept directories. Additionally, there is the --skip-libs
option to skip just the lib
directory. (You should check the output of brakeman --help
for more options.)
However, if you really want to skip an entire directory, you could do something like
ls app/some/dir/ | paste -s -d , - | xargs brakeman --skip-files
If you are using Brakeman as a library, then you can pass the files in :skip_files
:
Brakeman.run(:app_path => "my_app", :skip_files => Dir["my_app/bad/path/*"])