Galling can be managed by the manufacturer selecting the proper materials. By choosing different types of stainless (and different hardnesses) galling can be reduced or eliminated. Another way to reduce galling is to modify one or more of the surfaces with a coating, plating or other surface modification to increase lubricity or hardness. Of course, many of these fixes are a manufacturer level decision-not something you can control.
I have a S&W model 65 I kept in an Uncle Mikes nylon holster and every time I would take it out the top strap would be rusted. I waxed it, put Rem-Oil on it and it would still rust. Finally I put it in a gun rug and no more rust.
My buddy has a blued model 10 heavy barrel and kept his gun in the same type of holster and his gun rusted. So I am not sure if its the metal or something with those holsters.
So yes, stainless will rust under the right (wrong) conditions.
I forgot to say that I have a stainless GP-100 stored in that same holster for at least 6 months and not a speck of rust. So who knows whats up?
If I recall correctly, sometimes when two dissimilar metals are in contact it can cause a cathode/anode action causing oxidation to occur. I would think this could also apply to "stainless" used with regular steel components also. Perhaps someone with more knowledge of this could comment.
Dissimilar metals with a conducting liquid for a battery ! Galvanic corrosion ! This can add to corrosion of SS .There is a difference between SS with oxide and without oxide so the two form galvanic corrosion !! One of the reasons you have pitting corrosion on SS. Only the best Galvanic Series tables will show two listings for SS, one with oxide and one without !!
The process you are referring to is called "galvanic corrosion". It requires two metals with different electrical potentials in contact with each other AND the presence of an electrolyte.
Don't keep your guns soaking in salt water and you won't have to worry about it.
I know on outboard motors they attach sacrificial pieces of metal usually just below the motor itself to help with corrosion. But I don't think this would be feasible or even at all necessary in a handgun.