Actually, the moral teachings of the Church are based on scripture. Natural law is a way of understanding and explaining them that isn't solely reliant on Divine revelation but is assisted by insights from creation and the application of reason and logic, based on the premise that God's creation has intelligible purpose and meaning.