The “Good Thief,” St. Dismas, confessed his guilt to Jesus while on the Cross. He not only interiorly offered his crucifixion as penance but also had perfect contrition, which allowed him to remit ALL the temporal punishment due to his sins, through his Crucifixion… which is why Jesus said “this day you will be with Me in paradise.” 

The Blessed Virgin Mary witnessed St. Dismas’ confession and absolution of his sins by her Son at the foot of the cross (of Christ).  It was through her intercessory prayer that he was converted, had perfect contrition and, using his free will, recognized Jesus as God Incarnate and prompted to confess his sins to Him.  Gesmas, “The Bad or Impenitent Thief,” on the other hand, received the same intercessory prayer from Mary and the same grace from the Lord Jesus but freely rejected it and, as a result, choose hell for all eternity.  

While the form and matter of the Sacrament of Baptism are typically the words (of baptism) and *water,* respectively, The Church has always taught that a Baptism of Blood is also valid if the one baptized dies for Christ/The Holy Faith, which St. Dismas did.

While it is true that St. Dismas was saved by his Supernatural Faith in Christ, he didn’t give it (Faith) to himself nor was this true Faith without good works, as the result of his free will.  His recognition of the truth that Jesus was/is the Christ and did nothing wrong were good works.  His confession that he was justly crucified was a good work.  His interior offering of his own agony in penance and remittance of temporal punishment due to his sins were good works.