SRAM Rival brake caliper screws/bolts are rusty, how to replace?
I can answer this question myself, having removed the screws, measured them, ordered replacements, got the wrong size, and so on.  So other people can learn the easy way!

The screws (or bolts?) are M4x6 button-head.  The threaded portion is actually slightly longer than the nominal 6mm on my set, closer to 7mm.  But if you buy M4x8 screws you will find that they do not fit, because while the hole they thread into is plenty deep, it seems to be untapped beyond a certain depth.  So 7mm is the absolute maximum threaded length for these screws, and you should buy M4x6.  I chose titanium ones, but stainless would be fine too.

If you want to follow what I did, you should also see my follow-up question which describes how a tiny ball bearing will fly out of your brakes if you allow the QR mechanism to come apart when you remove the screw: What size is the tiny ball bearing used in SRAM brake caliper quick release detents?