From Pope St. John Paul II’s encyclical Veritatis Splendor (1993):
Our meditation on the dialogue between Jesus and the rich young man has enabled us to bring together the essential elements of Revelation in the Old and New Testament with regard to moral action. These are: the subordination of man and his activity to God, the One who “alone is good”; the relationship clearly indicated in the divine commandments, between the moral good of human acts and eternal life; Christian discipleship, which opens up before man the perspective of perfect love; and finally the gift of the Holy Spirit, source and means of the moral life of the “new creation” (cf. 2 Cor 5:17).
In her reflection on morality, the Church has always kept in mind the words of Jesus to the rich young man. Indeed, Sacred Scripture remains the living and fruitful source of the Church’s moral doctrine; as the Second Vatican Council recalled, the Gospel is “the source of all saving truth and moral teaching”.43 The Church has faithfully preserved what the word of God teaches, not only about truths which must be believed but also about moral action, action pleasing to God (cf. 1 Th 4:1); she has achieved a doctrinal development analogous to that which has taken place in the realm of the truths of faith. Assisted by the Holy Spirit who leads her into all the truth (cf. Jn 16:13), the Church has not ceased, nor can she ever cease, to contemplate the “mystery of the Word Incarnate”, in whom “light is shed on the mystery of man”.44
43 Dogmatic Constitution on Divine Revelation Dei Verbum, 7.
44 Second Vatican Ecumenical Council, Pastoral Constitution on the Church in the Modem World Gaudium et Spes, 22.
— Veritatis Splendor 28