You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Slim comes bundled with a few plugins, one of which is called "Smart Text". It adds a few extra features. Brakeman's slim integration does not enable that plugin, so templates using that syntax fail to parse and cause errors.
Specifically, we are seeing this with lines that start with > character, error message and stack trace shown below.
Other Error
Run Brakeman with --debug to see the full stack trace.
How is the plugin loaded in your code? Just a require "slim/smart" somewhere? 🤔
I see this plugin comes with Slim, so it's not a big deal for Brakeman to also enable it. I'm just wondering if it should be conditionally enabled or if it's safe to always enable.
Yes, for us we have it in the gemfile: gem "slim", "~> 3.0.1", require: ["slim", "slim/smart"]
That's a good question. I think it should probably be optional because it does change how slim interprets the template files, so I think you'd only want brakeman to interpret them the smart way if your app also is. Is there a mechanism to make that a config option for brakeman?
Background
Brakeman version: 5.0
Rails version: 6.0.3.4
Ruby version: 2.5.5p157
Issue
What problem are you seeing?
Slim comes bundled with a few plugins, one of which is called "Smart Text". It adds a few extra features. Brakeman's slim integration does not enable that plugin, so templates using that syntax fail to parse and cause errors.
Specifically, we are seeing this with lines that start with
>
character, error message and stack trace shown below.Other Error
Run Brakeman with
--debug
to see the full stack trace.Stack trace:
The text was updated successfully, but these errors were encountered: