Stainless steels gain corrosion resistance from sufficient chromium content and formation of a passive surface film.
The passive film can be damaged or destabilised, notably by chlorides and unfavourable details.
Stainless steel types differ in microstructure and behaviour. Selection depends on environment, manufacturing and expected durability.
Construction details should avoid standing moisture and crevices and consider contact with other metals.