Are Unacted-Upon Thoughts a Basis for Security Clearance Denial?

The problem with this is that a significant portion of the population has intrusive thoughts or fantasies that are just that: fantasies.  Where the mind wanders is largely uncontrollable; it certainly is not, standing alone, evidence of mental illness or security risk.