In order to avoid galvanic corrosion it is important that the total resistance of the coating has a known high enough value. A high resistance of the intact coating, which has no failures, is important.
Coatings are usually more or less permeable to water molecules and oxygen. Coatings swell to a certain degree dependent on their physiochemical properties. When water and oxygen diffuses through the coating, the electrochemical reaction at the substrate (e.g. CFRP) can take place. In case of a galvanic cell, the less noble material will corrode. In contact of CFRP with e.g. Aluminium, the Al is less noble and will corrode. Aluminium is then the anode and CFPR the cathode.