For instance, the footage on Perseverance's landing was also all from off-the-shelf hardware. The Ingenuity helicopter is also largely off-the-shelf gear, it uses a plain old Snapdragon 801 as its main processor running Linux. Perseverance also uses an Intel Atom processor (although it carries 2) to receive footage from all the cameras and compress them, compared to the main processor, which is an ancient PowerPC chip. IIRC there was also a cubesat which used a smartphone as its processor and several others which have used Raspberry Pis. A GoPro has also been to space earlier this year.
I can't find details on NASA's designs, but I suspect you'd mostly need a new casing. Something radiation-tolerant (most plastic degrades quickly) and maybe radiation-shielding if it messes with the electronics too much. For temperature you could just run it through a few cycles on Earth and see what breaks. Probably nothing, given the GoPro's lack of moving parts and general ruggedness.
The rugged, icy, salt-water environments the GoPro is designed for are, in many ways, a lot more demanding than space.
They're using GoPro 4's, which is somewhat interesting, as the 11 just came out. So, old tech (8 years old or so) that's been heavily modified to work in space. I'm reminded some janky PowerPC powers the FORTRAN code that runs the Hubble.
It is romantic to think that the Earthrise photo was taken with a Hasselblad medium format camera.
If they found new cameras with better heat dissipation, they would still go with old ones, otherwise they would have to recertify the new ones, which would take ages.