My SF requires TS/SCI. This required peeing in a cup, and drug use was asked about on the e-qip. When they conduct the background investigation, people who know you will be asked whether you've used drugs as well. If you use or have used, they will find out.
Be aware that prior use is not necessarily disqualifying. But lying during the background investigation is an instant disqualification. Here's the drug use clearance guidelines:
GUIDELINE H: DRUG INVOLVEMENT
24. The Concern. Use of an illegal drug or misuse of a prescription drug can raise questions about an individual's reliability and trustworthiness, both because it may impair judgment and because it raises questions about a person's ability or willingness to comply with laws, rules, and regulations.
(a) Drugs are defined as mood and behavior altering substances, and include:
(1) Drugs, materials, and other chemical compounds identified and listed in the Controlled Substances Act of 1970, as amended (e.g., marijuana or cannabis, depressants, narcotics, stimulants, and hallucinogens), and (2) inhalants and other similar substances;
(b) drug abuse is the illegal use of a drug or use of a legal drug in a manner that deviates from approved medical direction.
25. Conditions that could raise a security concern and may be disqualifying include:
(a) Any drug abuse (see above definition);
(b) testing positive for illegal drug use;
(c) illegal drug possession, including cultivation, processing, manufacture, purchase, sale, or distribution; or possession of drug paraphernalia;
(d) diagnosis by a duly qualified medical professional (e.g., physician, clinical psychologist, or psychiatrist) of drug abuse or drug dependence;
(e) evaluation of drug abuse or drug dependence by a licensed clinical social worker who is a staff member of a recognized drug treatment program;
(f) failure to successfully complete a drug treatment program prescribed by a duly qualified medical professional;
(g) any illegal drug use after being granted a security clearance;
(h) expressed intent to continue illegal drug use, or failure to clearly and convincingly commit to discontinue drug use.
26. Conditions that could mitigate security concerns include:
(a) the behavior happened so long ago, was so infrequent, or happened under such circumstances that it is unlikely to recur or does not cast doubt on the individual's current reliability, trustworthiness, or good judgment;
(b) a demonstrated intent not to abuse any drugs in the future, such as:
(1) dissociation from drug-using associates and contacts;
(2) changing or avoiding the environment where drugs were used;
(3) an appropriate period of abstinence;
(4) a signed statement of intent with automatic revocation of clearance for any violation;
(c) abuse of prescription drugs was after a severe or prolonged illness during which these drugs were prescribed, and abuse has since ended;
(d) satisfactory completion of a prescribed drug treatment program, including but not limited to rehabilitation and aftercare requirements, without recurrence of abuse, and a favorable prognosis by a duly qualified medical professional.
I don't myself think pot should be illegal. I've never tried it, and I would advise people against it for health reasons, but as far as recreational chemistry goes it's pretty tame and certainly not worth sending people to jail over. However, as people trusted with national security information we have to hold ourselves to a high standard of trustworthiness, and that means following the law. If the law is misguided, then we should try to change it through the political process but still obey it in the meantime.