The alleged attack is raising questions about pilot screening and a security system largely designed to stop threats from outside the cockpit.