Probably not, unless there were extenuating circumstances like you got arrested for dealing. The paperwork you fill out for a security clearance doesn't care about drug use more than 7 years old (unless it led to jail time), and lots of people who do have drug use in the last 7 years still don't have major issues.
There's different types of polygraphs. The counterintelligence one is basically asking if you're a terrorist, so no trouble there. There's also a "lifestyle" polygraph that is sometimes necessary, which is more focused on how blackmailable you are. It might be an issue there, but I wouldn't be surprised if the questions for that have the same "within 7 years" qualifier.
There's different types of polygraphs. The counterintelligence one is basically asking if you're a terrorist, so no trouble there. There's also a "lifestyle" polygraph that is sometimes necessary, which is more focused on how blackmailable you are. It might be an issue there, but I wouldn't be surprised if the questions for that have the same "within 7 years" qualifier.