The secret of the sacrament of reconciliation is sacred, and cannot be violated under any pretext. "The sacramental seal is inviolable; therefore, it is a crime for a confessor in any way to betray a penitent by word or in any other manner or for any reason."
Source: Catechism of the Catholic Church (Vatican.va)