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

Brakeman crashes while printing warning for Ruby EOL 2.6 #1671

Closed
klazuka opened this issue Jan 30, 2022 · 3 comments · Fixed by #1673
Closed

Brakeman crashes while printing warning for Ruby EOL 2.6 #1671

klazuka opened this issue Jan 30, 2022 · 3 comments · Fixed by #1673

Comments

@klazuka
Copy link

klazuka commented Jan 30, 2022

Earlier this morning we started seeing Brakeman crash with error:

gems/brakeman-5.2.0/lib/brakeman/warning.rb:251:in `sprintf': can't convert nil into Integer (TypeError)

I traced the error and found that it crashed while reporting a warning for CheckEOLRuby. The root cause appears to be that the warning symbol :pending_eol_ruby was introduced recently here in #1660, but never had a numeric code registered.

I was able to fix the problem by editing https://github.com/presidentbeef/brakeman/blob/main/lib/brakeman/warning_codes.rb to assign :pending_eol_ruby a numeric code.

@presidentbeef
Copy link
Owner

Ah, embarrassing. I'll get a fix out ASAP.

@presidentbeef
Copy link
Owner

Fixed with 5.2.1. Thanks and apologies!

@klazuka
Copy link
Author

klazuka commented Jan 30, 2022

@presidentbeef no problem. Thanks for the quick fix!

Repository owner locked and limited conversation to collaborators Jun 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants