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

Possible issue with --skip-files on folders containing symlinks in 6.2.1 #1866

Open
schinery opened this issue Aug 23, 2024 · 1 comment
Open

Comments

@schinery
Copy link

Background

Brakeman version: 6.2.1
Rails version: 7.1.4
Ruby version: 3.3.4

Issue

I'm using a mono repo with a couple of Rails app and engine shared between them with the code symlinked, so looks like this:

|- app1
|-- engines/my-engine (my-engine is a symlink)
|- app2
|-- engines/my-engine (my-engine is a symlink)
|- my-engine

There are some warnings in the my-engine code, which we are ignored in its own brakeman.ignore file, so when running brakeman in the apps we are using --skip-files /engines/ to ignore checking my-engine again.

Since upgrading to 6.2.1, I'm now seeing warnings for the symlinked engine when running the same brakeman command in the app with the file path in the warnings being File: ../my-engine/app/models/path/to/file.rb.

I can stop the warnings by using --skip-files ../my-engine/ but wanted to check if this is now expected behaviour or is there an issue because the original --skip-files /engines/ should have meant that the symlink wasn't processed.

@presidentbeef
Copy link
Owner

This was not intentional but I'm not sure how to address it. Open to suggestions.

@lubert ?

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