The Malian midfielder saw his spot-kick saved by Kennedy Mweene, who had originally given the penalty away after a foul on Koena Mathopa.
Cosmos had started the match well with Ousmane Berthe and Thabiso Hlalele tested the keeper. Hlalele had two more efforts saved, while Stars had to rely on Kleinbooi Taaibos to threaten Avril Phali.
Sthembiso Ngcobo saw his header saved by Phali early in the second half, with Mathoba threatening at the other end of the pitch.
Mweene again proved the hero when he saved Diarra’s penalty, and also the rebound from Hlalele as the two sides had to settle for a point apiece.