A city agency whitewashed inspections of emergency shelters that house homeless youths and runaways at a cost of $8 million a year, according to a new report by city Comptroller Scott Stringer obtained by The Post.

The Department of Youth and Community Development covered up unspecified hazards that potentially endangered the “safety and well-being” of the teens and young adults, the damning report said.

Hazards that the DYCD inspects for include exposed wiring, broken electrical fixtures, bed bugs and lice.

“The young people who need our help the most should be able to count on full and honest support from the city, but our audit found inadequate supervision, altered records, and shifting explanations at the agency that exists to help them,” Stringer said.

Stringer’s office examined 93 reports that DYCD staffers filed after visiting seven shelters that housed a combined 2,340 teens and young adults during the fiscal year that ended June 30, 2017.

It found that 35 reports — more than one-third of the total —were “altered by program managers” and a deputy director, then “re-approved” by the same deputy director after being requested by Stringer’s investigators.

None of the DYCD officials were identified by name in Stringer’s 29-page report.

In one case highlighted in Stringer’s report, the Covenant House nonprofit scored an overall rating of “good” following a DYCD inspection of one of its Manhattan shelters on Jan. 12, 2017.

But the inspection report revealed language that included, “Overall the site visit was rated fair.”

It also said some shortcomings needed “immediate attention,” adding, “The program manager will be following up with these outstanding issues next month.”

According to Stringer’s report, those findings were changed on Sept. 28, 2017, to say, “Overall the site visit was rated good. The facility was in good standing and met all of the DYCD and [state Office of Children and Family Services] regulations.”

City Hall spokesman Jose Bayona insisted that DYCD “did not intentionally mislead the comptroller,” and claimed that changes in the reports included “redaction of sensitive information protected by privacy laws and clarification of inconsistent or confusing language.”

“DYCD conducted and documented 93 site visits to DYCD-funded crisis services providers to assess the quality of services being offered and no changes were made to the actual overall ratings of the site visits,” he said.

Covenant House, which provides 136 of the 216 beds at the seven shelters, didn’t return messages.