Oh gosh. They just look like sawflies. There are some borers that look similar, but they are inside the plant. Those heads, and the shape of the bodies... I suppose if you want to get real technical, lepidoptera have 3 to 5 pairs of prolegs, and sawflies have 6 to 8, but I sure couldn't see them in the photo! LOL
Many sawflies have a peculiar defensive posture: they'll arch their rear end in an attempt to scare the predator away. Many also feed in groups. That's sort of a clue too...for in the future.