What passes for food at Kennedy Airport may sometimes seem criminal, but only observant Jews were actually at risk of breaking the law – dietary law, that is – by grabbing a bite at one of the terminals.

But all that has changed, thanks to the mess-hall messiah that’s arrived in the form of kosher vending machines.

In a matter of seconds, the “Hot Nosh 24/6” machines cook up hot dogs, knishes, pizzas, onion rings and a slew of other offerings that have been satisfying Jews and gentiles alike since they were installed in April at the food court in Terminal 4.

“I didn’t bring my own food, since I am coming from camp, so I was very surprised and happy to see these machines,” said Sean Zaghi, 14, an Orthodox Jew who was awaiting a flight to California.

“I thought I was going to have to have pretzels or something, but now I can get a pizza instead.”

The machines have turned heads at the airport, and some folks even stop to pose for pictures in front of them, before grabbing a $4.50 hot dog.

“This is wonderful,” said Susan Berger, who snapped a photo of the machine on her way back to Florida. “We really could use these back home.”

Despite the “24/6” name, the machines are not programmed to shut off Fridays after sundown in observance of the Jewish Sabbath.

“That’s because you don’t have to be Jewish to want a kosher hot dog,” said Ruby Azrak, of Kosher Vending Industries.

One hundred of the machines – which take credit cards – have already been installed in hospitals, a Wal-Mart and even Boston’s Fenway Park – all places where there are usually no kosher options, said Azrak.

“We are also talking to schools and prisons,” partner Alan Cohnen said.

While it may not sound kosher to eat a hot dog from a vending machine, the company’s patented technology can grill a perfect frank.

It takes about 90 seconds from Genesis to Exodus.

jeremy.olshan@nypost.com