Cosmic rays may give spurious results in the polarization spectrum. The four exposures normally taken contain some redundancy which you may use for a consistency check (e.g. by deriving the gain ratio or the total-flux spectrum routinely). If you spot a spike in your polarization or gain ratio spectrum which you do not trust, go back to the raw data and compare each of the 2 exposures taken at the halfwave plate angles differing by 45 degrees with the average of the 2 exposures taken for the other Stokes parameter (this average represents total flux). If the spike is due to spectral-line polarized light from your source, it should be present in both exposures, in opposite senses; it should also be at least as wide as the instrumental p.s.f.
Cosmic ray problems are not peculiar to polarimetry. The best source of superior cleansing algorithms will probably be the Hubble Space Telescope WFPC community.