You can 100% get a clearance if you’ve smoked within 7 years of applying for one. Hell, you can get a clearance if you smoked within the last year. You just have to a) disclose the fact, b) be able to show mitigations as to why smoking weed won’t be an issue while you have a clearance, and then c) not do it while you have a clearance. It ends up being not so much about the fact that you smoke weed as it is that you’re not following the law, and that’s the real clearance risk (from their POV). Getting a clearance is really about proving you’re trustworthy to the investigator.