If you are very, very careful, you can use a small artist's brush and Ospho to stabilize those rusty nail heads. It may not reach the back side of the nail heads, but just touching up the front should help.
Test it on your siding/paint or deck or whatever before you get started.
It's weak phosphoric acid and turns iron oxide into inert iron phosphate. I've used it for decades on everything from wrought iron railings, to mailbox posts, to old heating oil tanks. It goes on like water, then after it dries you brush off the white powdery residue and then you can paint it if you like. The black iron oxide is stabile, but a coat of paint or primer helps.
I even did a rusty hole the size of my fist in a 1978 Datsun B210 rocker panel once and didn't get it patched and painted for a year. The hole completely stopped growing.
Here's the 1946 railing on the kids' first house.