-
Notifications
You must be signed in to change notification settings - Fork 6
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? #60
Conversation
424e6cf
to
d7bc9e3
Compare
3e12481
to
dca824f
Compare
c64bb76
to
7b50ae5
Compare
doesn't work |
0ce75c6
to
eaa1510
Compare
3b65779
to
77b3119
Compare
|
||
class Thing < ActiveRecord::Base | ||
def inject(params) | ||
Thing.first.where((((("username = '" + params[:user][:name]) + "' AND password = '") + params[:user][:password]) + "'")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] Detected user input used to manually construct a SQL string. This is usually bad practice because manual construction could accidentally result in a SQL injection. An attacker could use a SQL injection to steal or modify contents of the database. Instead, use a parameterized query which is available by default in most database engines. Alternatively, consider using an object-relational mapper (ORM) such as ActiveRecord which will protect your queries.
Source: https://semgrep.dev/r/ruby.rails.security.injection.tainted-sql-string.tainted-sql-string
Cc @brave/sec-team @thypon @bcaller
Q: Can we have brakeman running even if the project is not a having proper |
|
||
class Thing < ActiveRecord::Base | ||
def inject(params) | ||
Thing.first.where((((("username = '" + params[:user][:name]) + "' AND password = '") + params[:user][:password]) + "'")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[brakeman] :Possible SQL injection
Source: https://brakemanscanner.org/docs/warning_types/sql_injection/
Cc @brave/sec-team @thypon @bcaller
|
||
class Thing < ActiveRecord::Base | ||
def inject(params) | ||
Thing.first.where((((("username = '" + params[:user][:name]) + "' AND password = '") + params[:user][:password]) + "'")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[brakeman] Possible SQL injection
Source: https://brakemanscanner.org/docs/warning_types/sql_injection/
Cc @brave/sec-team @thypon @bcaller
No need for gemfile
Closes #55