title: SonarQube vulnerability: Replace this persistent entity with POJO/DTO
body: <pre><code>@PostMapping(&quot;/create&quot;)
  public ResponseEntity&lt;TaskDTO&gt; create(@RequestBody Task task){
      return new ResponseEntity&lt;&gt;(this.service.createTask(task), HttpStatus.CREATED);
  }
  </code></pre>
  <p>So this is part of my task controller, I have put my project into SonarQube and it's telling me this is a security risk. Why does this piece of code cause problems and how would I change this to make it better?</p>