提交 a3bbd3d4 编写于 作者: J Justin Collins

CheckSQL for models involving constantize

上级 88eb6714
......@@ -153,6 +153,7 @@ class Brakeman::CheckSQL < Brakeman::BaseCheck
# :find,
# s(:arglist, s(:str, "something")))
def constantize_call? result
sexp? result[-1][1] and result[-1][1][0] == :call and result[-1][1][2] == :constantize
call = result[:call]
call? call[1] and call[1][2] == :constantize
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册