where($tainted, 'John')->first(); // ruleid: laravel-sql-injection $titles = DB::table('users')->pluck($tainted); // ruleid: laravel-sql-injection DB::table('users')->orderBy($tainted); // ruleid: laravel-sql-injection $price = DB::table('orders')->max($tainted); // ruleid: laravel-sql-injection $query = DB::table('users')->select($tainted); // ok: laravel-sql-injection $user = DB::table('users')->where('name', $tainted)->first(); // https://laravel.com/docs/8.x/queries // Raw statements will be injected into the query as strings, so you should be extremely careful to avoid creating SQL injection vulnerabilities. // ruleid: laravel-sql-injection $users = DB::table('users')->select(DB::raw($tainted)); // ruleid: laravel-sql-injection $orders = DB::table('orders')->selectRaw($tainted); // ruleid: laravel-sql-injection $orders = DB::table('orders')->whereRaw($tainted); // ok: laravel-sql-injection $orders = DB::table('orders')->selectRaw('price * ? as price_with_tax', [$tainted]);