A veteran locksmith claims he was picked on — and lost his job — for being too honest.

Joel Goldbaum said he uncovered shady practices at Kings County Hospital just days into a new job, but that he wasn’t going to take part because locksmiths all take an oath — modeled on the Hippocratic Oath for doctors — to never shame their profession.

Goldbaum, 38, claims he was canned after just five months when he questioned why he was getting overtime for hours he never worked.

He asked one co-worker what was going on and was told to go with the flow.

“They said, ‘You are going to see and hear things. Don’t say anything. Look how much money we are going to make!’ ” Goldbaum told The Post.

Goldbaum said he was instructed to sign his name on time sheets at the start of every shift, leaving his supervisor to fill out the hours.

He said those hours were inflated.

“I struggled with that the first couple of days. But when you become a locksmith, you take an oath to not steal,” he said.

It’s not well known, but locksmiths are supposed to follow a code of conduct, having taken the “Baldomeric Oath,” named after St. Baldomerus, a locksmith who died in the 7th century, when they enter the profession.

Goldbaum asked supervisor John Fumo about the undeserved OT and was told it actually was deserved.

“His excuses were that it’s OK because [former Mayor Mike] Bloomberg hadn’t given city workers a raise,” Goldbaum said.

He said he contacted the hospital’s compliance department anonymously and was told to call the inspector general, which he did.

But when the IG started snooping around, his bosses suspected the new guy had ratted them out, he said.

On Jan. 6, he received a letter stating his performance was “incompatible with the needs of the hospital” and was fired.

Goldbaum said he just wants his job back so he can support his wife and two special-needs sons, ages 13 and 9.

A city spokesman said Goldbaum’s complaints are under review.