title: "status" is provided extenally to the method and not sanitized beforce use. Why?
body: <p>I use Intellij but I do not know the reason why I always get the following error:</p>
  
  <blockquote>
    <p>"status" is provided externally to the method and not sanitized before use.</p>
  </blockquote>
  
  <p>My method:</p>
  
  <pre><code>...
      public List getActionIdByTypeAndCodeAndStatus(String type, String code, String status) throws Exception {
                  String sql = "select action_id from action where type = '" + type + "' and code = '" + code + "' and status = '" + status + "' ";
                  Query checkWriteLog = entityManager.createNativeQuery(sql);
                  return checkWriteLog.getResultList();
              }
  </code></pre>
  
  <p>The line which throws the error is</p>
  
  <pre><code> Query checkWriteLog = entityManager.createNativeQuery(sql);
  </code></pre>
  
  <p><strong>Question:</strong>
  Do you know the reason? How can I fix it?</p>