An extremely expensive although effective approach would be to "seed" the spacecraft with isotopically enriched and documented solvents and food sources such that all the oxygen or carbon or both on the spacecraft, if any contamination DOES exist, would be a peculiar and documented isotope ratio that is different than Mars ratios.
I think we know the natural ratios for Mars in bulk material, so anything immediately found to be growing that matched the documented "salted" isotope ratios obviously was a spacecraft contaminant whereas anything mars ratio was local. Of course bacteria can reproduce fast, so Earth bacteria eating Mars material would rapidly revert to Mars isotope ratios. Still for the first hour on the ground this would likely be usable for life detection experiments. Although it would probably be unimaginably expensive.
An extremely expensive although effective approach would be to "seed" the spacecraft with isotopically enriched and documented solvents and food sources such that all the oxygen or carbon or both on the spacecraft, if any contamination DOES exist, would be a peculiar and documented isotope ratio that is different than Mars ratios.
I think we know the natural ratios for Mars in bulk material, so anything immediately found to be growing that matched the documented "salted" isotope ratios obviously was a spacecraft contaminant whereas anything mars ratio was local. Of course bacteria can reproduce fast, so Earth bacteria eating Mars material would rapidly revert to Mars isotope ratios. Still for the first hour on the ground this would likely be usable for life detection experiments. Although it would probably be unimaginably expensive.