"Sir, are you a terrorist?"
"No." (For in my mind, I am a freedom fighter, prepared to martyr myself for Allah and his will, so that I shall enter Paradise.)
"And, sir, do you plan on doing anything illegal on this flight?"
"No." (For in my mind, I am not bound by your petty laws, for I am serving Allah, and his will, which is all the law that matters.)
"Thank you. You may pass."
The machine does not detect the truth. At best, it can determine whether or not you believe what you are saying. I was involved with a case involving a rapist, who (somehow) convinced a judge to allow testimony about how he passed a polygraph and CVSA (Computerized Voice Stress Analysis) when asked if he raped the girl. However, both experts admitted that as long as he beleieved he didn't rape the girl, he would pass the tests. Since he truly believed she was willing, and it got rough because she liked it that way, he passed the tests.
A terrorst, motivated by religious zeal, will likely be able to pass the test, as any general question will not cause the necessary voice-stress.