Without sounding totally out of my wits, I suggest the following. When writing codes always write them from and for a specific machine, the manufacture of which is controlled by you.
The car manufacturers who produced CPUs in their cars that could switch the fuel use from normal road use during emissions tests did not get caught by examining the CPUs which were interlinked with the car engine.
They were caught by independent testing and driving techniques that were quite ordinary (normal). Had anyone attempted to discover the programming that directed the cars to cheat the emission-testing teams, it would have been an extremely long process mathematically. The interlocking of the engine with the CPU removed trace evidence from the CPU when the CPU was removed from the car. It was quite brilliant.