US District Judge Eduardo Robreno said Mr Cosby could not sue Andrea Constand, her mother or lawyers for speaking to investigators about her accusations.
The comedian claimed they had violated a confidential settlement agreement.
But Judge Robreno allowed several other elements of Mr Cosby’s claim to stand.
They included Mr Cosby’s assertion that Ms Constand, a former Temple University basketball coach, violated a confidentiality agreement with posts she published on Twitter and comments she made to the Toronto Sun newspaper.
‘Full factual record’
The Pennsylvania judge also said the comic could sue Ms Constand’s lawyers, Dolores Troiani and Bebe Kovitz, for an open letter they wrote about the case published in the Philadelphia Inquirer.
Mr Cosby can also sue American Media, Inc., which owns the National Enquirer, over articles it published about the case.
“While we are of course very pleased with the court’s ruling in favour of our client, which means that this case will be decided where it should be – in a court of law and on a full factual record – we will not comment further on the record,” Mr Cosby’s spokesman Andrew Wyatt said.
Mr Cosby, 78, is facing accusations of sexual assault from nearly 60 women going back decades.
He will stand trial after being charged with three counts of felony indecent assault, alleged by Ms Constand.
It is the only criminal case Mr Cosby faces related to sexual assault accusations. A trial date has not been set but he will be arraigned on 20 July.
He is best known for his role as the father in the television hit The Cosby Show which ran from 1984 to 1992 and was a huge hit in the US and around the globe.
The ruling was issued on Friday.