A legal quirk has allowed a top-ranking public servant to refer to a Fairfax journalist as a “bottom feeder”.

It appears all rules are off when public servants are giving evidence in Parliament, as they fall under the same protections that keep politicians from having to give accurate facts.

There are an even broader immunities that public servants can take advantage of, when giving evidence in Parliament, including the freedom to ignore their usual duty to “maintain appropriate confidentiality about dealings [they have] with any minister or minister's member of staff”.

Public Service Commissioner Stephen Sedgwick has recently confirmed the loophole, saying it was the reason he did not intervene in a stoush between Customs chief Michael Pezzullo and Fairfax reporter Noel Towell.

The conflict came after an article in the Canberra Times, which suggested Mr Pezzullo found out in the pages of morning newspapers that Immigration Minister Scott Morrison was re-launching border security services as the Australian Border Force .

Mr Pezzullo allegedly told his staff on the day of the article: “If you haven't yet read the minister's opinion in The Australian, I encourage you to do so.”

Mr Pezzullo was questioned about the story in a Refugee Review Tribunal Senate Estimate hearing soon after, and claimed the story was “not even remotely” accurate.

“You get people who just have to be bottom feeders,” he said, in a veiled reference to the journalist Mr Towell.

“That is what they do in life. If someone like that wants to have a discussion with me about how I manage communications with my staff, I am very happy to have it.

“People ought to think about getting on with doing a real job,” he said.

According to the code of conduct outlined in the Public Service Act, bureaucrats must “treat everyone with respect and courtesy” in relation to their work. It specifically states that agency heads have an extra duty to promote such values.

In any other situation, public servants found in breach of the code can be reprimanded, demoted, fined or even fired.

But thePublic Service Commissioner says staff are covered by parliamentary privilege when giving evidence.

The same parliamentary privilege protects bureaucrats when they routinely perform badly in front of committees, regularly getting facts wrong, choosing ignorance over admission or simply not knowing what their job is really about.

The protection comes from a Senate order laid down in 1988, which said officials could not be disadvantaged by their rubbish appearances.

It meant politicians were no longer denied bonuses or promotions on the basis of their sub-standard performance.