The various corruption investigations and sexual harassment scandals have been an economic boon for law firms in New York, according to a review of legislative spending by the Empire Center for New York State Policy.

The think tank found state lawmakers have spent more than $1 million in public money for outside legal representation over the last six months, based on the recently released expenditure reports.

The Assembly has paid a total of $657,629 to five different law firms. The largest chunk of money went to Kasowitz, Benson, Torres & Friedma — $345,000.

The state Senate, meanwhile, has $418,574 in legal services performed by Jones Day, most likely stemming from work performed during the redistricting process.

Other outside spending was most likely due to representation for the Moreland Act Commission investigation and representation for the various sexual harassment scandals in the Assembly.

The expense reports cover Oct. 1 of last year through the end of the fiscal year, March 31.

The report comes as the state is spending $300,000 on legal representation for the now-defunct Moreland Commission in the ongoing investigation of its closure by the U.S. attorney’s office.