My Scammer Boss Gave Me the Same CDD Contract After My First One Ended

I'm wondering if it's illegal for my boss to make me sign the same CDD contract right after my first one ended. He gave me some weird excuse, saying I need to go through 2 to 3 CDD contracts before getting a CDI. He didn’t even give me a raise—not just me, but two of my coworkers as well. This feels like a huge red flag. What should I do? Should I resign and look for another job? My friend, with less experience, earns almost double my salary.