City district attorneys don’t have to publicly name all the officers who have made their controversial “bad cop” lists — even those who have lied on the job, a judge has ruled.

The adverse credibility findings lists — which includes officers whose testimony could weaken cases because they are being sued, accused of misconduct or gave prior testimony that was later tossed — are exempt from disclosure under the state’s Freedom of Information Law and are instead tantamount to attorneys’ private notes, Manhattan civil court Judge W. Franc Perry ruled Friday in a 2018 suit by former Manhattan prosecutor Andrew Stengel seeking the Manhattan DA’s list.

“The adverse credibility finding is ultimately assessed by the attorney, familiar with the particular facts of the case, and must be analyzed within the context of a particular criminal case where a police officer may testify,” Perry wrote in the ruling, which described prosecutors’ requirement to disclosure findings to defense attorneys as “attorney-work product.”

The judge also accepted that the DA’s office did not maintain a list when former Manhattan prosecutor Stengel requested the record in 2018.

Stengel has argued in court filings that the Manhattan DA has maintained the naughty list or years — while the office claims it first generated the catalog just before releasing it in December.

That vague record, though, left off some of the officers with the worst history, including five cops who had been found guilty of lying and nonetheless called to testify as recently as last year, according to documents previously obtained by The Post.

The office’s recent disclosure only included a few dozen officers who have been found by a court to have credibility issues.

A spokesperson for the Manhattan DA’s office declined to comment on the ruling.

Stengel had sought the full release following the Dec. 13 disclosure.

The Queens, Bronx and Brooklyn district attorney offices previously released a portion of the adverse credibility finding list in response to records requests by The Post.

Stengel said the ruling in Manhattan was “disappointing.”

“I am confident that the decision will be overturned on appeal,” Stengel’s attorney, Henry Bell, told The Post.