TSA security officers do not search for marijuana or other drugs. In the event a substance that appears to be marijuana is observed during security screening, TSA will refer the matter to a law enforcement officer.
Whether or not marijuana is considered legal under local law is not relevant to TSA screening because TSA is governed by federal law. Federal law provides no basis to treat medical marijuana any differently than non-medical marijuana.
Even if an item is generally permitted, it may be subject to additional screening or not allowed through the checkpoint if it triggers an alarm during the screening process, appears to have been tampered with, or poses other security concerns. The final decision rests with TSA on whether to allow any items on the plane.