Contrary to popular belief, stainless steel can corrode if the temperature and humidity conditions are extreme enough. Some very fine (0000) steel wool soaked in Break Free followed by a good polish with Flitz will remove most very light corrosion. You could also try some very fine grades (800 grit or higher) of wet/dry sandpaper & oil. If it's deeper than just at the surface you will pretty much just have to live with it unless you're willing to do some serious sandpaper work which could end up looking worse than the rust.
If your safe is retaining humidity to such a degree that a stainless gun is rusting in it you need to look into getting a dehumidifier or a large stock of desiccant that you change at regular intervals. And of course a preventative wipe with an oiled cloth will not hurt either. Rust never sleeps.