title: Scan a rails app's code for SQL injection vulnerabilities?
body: <p>How can I scan a rails app's code for patterns that may be SQL injection points?</p>
  <p>For example, it should find any of the patterns listed here: <a href="https://rails-sqli.org/" rel="nofollow noreferrer">https://rails-sqli.org/</a></p>
  <p>As a specific example, if this was in the app's code, a scanner should find it and flag it as an SQL injection point.</p>
  <pre class="lang-rb prettyprint-override"><code>User.find_by params[:id]
  </code></pre>
  <h3>What I've tried</h3>
  <p>I tried brakeman (<code>brakeman -f html -o report.html</code>) to check for all of these:</p>
  <pre><code>BasicAuth, BasicAuthTimingAttack, CSRFTokenForgeryCVE, ContentTag, CookieSerialization, CreateWith, CrossSiteScripting, DefaultRoutes, Deserialize, DetailedExceptions, DigestDoS, DynamicFinders, EscapeFunction, Evaluation, Execute, FileAccess, FileDisclosure, FilterSkipping, ForgerySetting, HeaderDoS, I18nXSS, JRubyXML, JSONEncoding, JSONEntityEscape, JSONParsing, LinkTo, LinkToHref, MailTo, MassAssignment, MimeTypeDoS, ModelAttrAccessible, ModelAttributes, ModelSerialize, NestedAttributes, NestedAttributesBypass, NumberToCurrency, PageCachingCVE, PermitAttributes, QuoteTableName, Redirect, RegexDoS, Render, RenderDoS, RenderInline, ResponseSplitting, RouteDoS, SQL, SQLCVEs, SSLVerify, SafeBufferManipulation, SanitizeMethods, SelectTag, SelectVulnerability, Send, SendFile, SessionManipulation, SessionSettings, SimpleFormat, SingleQuotes, SkipBeforeFilter, SprocketsPathTraversal, StripTags, SymbolDoSCVE, TemplateInjection, TranslateBug, UnsafeReflection, ValidationRegex, WithoutProtection, XMLDoS, YAMLParsing
  </code></pre>
  <h3>Question</h3>
  <p>Is there a way to quickly and easily scan some code for potential SQL injection vulnerabilities?</p>