It is an issue for clearance. You can get by with admitting to past youthful indiscretions during the background investigation but you absolutely can't actively violate federal law and keep a security clearance.
At best, it's uncharted territory. Someone will have to lose their security clearance for using marijuana, then they will sue the government, then the court will decide whether or not state laws can override federal laws here.
The fact that the federal government has not pressed the issue is telling as to which way they think courts will rule.
The fact that the federal government has not pressed the issue is telling as to which way they think courts will rule.