Stainless steel M5 allen bolts are the usual solution.
The correct order, from the frame eyelet, outwards is:
If the rack is outside the fender, it has more leverage on the bolt and can over-stress and break the bolt.
Use a washer
Smear the threads of the bolt thinly with some grease (white lithium grease), or at least put a drop of oil on the threads.
On the drive side the bolt can protrude inwards and interfere with the chain. Add more washer or file off the end of the bolt. You need about 1-2 threads protruding to ensure full engagement of the bolt.