Michel Temer, Brazil’s interim president, displayed poor judgment on his first day in office last month when he appointed an all-white, all-male cabinet. This understandably angered many in racially diverse Brazil.

Their outrage was compounded by the fact that seven of the new ministers had been tainted by a corruption scandal and investigation that have shaken Brazilian politics. The appointments added to the suspicion that the temporary ouster of President Dilma Rousseff last month over allegations that she resorted to unlawful budget-balancing tricks had an ulterior motive: to make the investigation go away. Earlier this year, Ms. Rousseff said that allowing the inquiry into kickbacks at Petrobras, the state oil company, to run its course would be healthy for Brazil in the long run.

Two weeks after the new interim government was seated, Romero Jucá, Mr. Temer’s planning minister, resigned after a newspaper reported on a recorded phone conversation in which Mr. Jucá appeared to endorse the dismissal of Ms. Rousseff as part of a deal among lawmakers to “protect everyone” embroiled in the scandal. That was the only way, he said, to assure that Brazil “would return to being calm.” Late last month, Fabiano Silveira, the minister of transparency, charged with fighting corruption, was forced to resign after a similarly embarrassing leak of a surreptitiously recorded conversation.

This forced Mr. Temer to promise last week that the executive branch would not interfere with the Petrobras investigation, which so far has ensnarled more than 40 politicians. Considering the men Mr. Temer has surrounded himself with, that rings hollow. If the interim president is to earn the trust of Brazilians, many of whom have been protesting Ms. Rousseff’s dismissal as a coup, he and his cabinet must take meaningful steps against corruption.