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

Allow --only-files et al. to function with 'leading dot' notation for files #1895

Open
gstokkink opened this issue Dec 18, 2024 · 2 comments

Comments

@gstokkink
Copy link

gstokkink commented Dec 18, 2024

Is your feature request related to a problem? Please describe.

The following works fine:

bundle exec brakeman --only-files foo,bar

The following does not:

bundle exec brakeman --only-files ./foo,./bar

The files are simply skipped.

Describe the solution you'd like

I'd like brakeman to support this kind of notation for files, as a lot of other tools do. This makes automation a lot simpler.

Describe alternatives you've considered

Currently using a shim script in our CI/CD setup to convert all filenames with leading dots to a notation without. This shim script could be discarded if brakeman supported 'leading dot' notation (not sure what the correct term is, relative path prefixed by current dir?).

@presidentbeef
Copy link
Owner

Can you explain a little bit more what you are trying to achieve? 🤔

Are you saying Brakeman is running from the root of the Rails application, but some other tooling is passing in paths starting with ./? Even though those paths are in the current directory?

@gstokkink
Copy link
Author

Yep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants