Is Sacred Scripture true?
“The books of Scripture firmly, faithfully, and without error teach [the] truth. … Written under the inspiration of the Holy Spirit, they have God as their author” (Second Vatican Council, DV 11).
The Bible did not fall from heaven in its final form, nor did God dictate it to human scribes who copied it down mechanically. Rather “God chose certain men who … made full use of their own faculties and powers so that, though he acted in them and by them, it was as true authors that they consigned to writing whatever he wanted written, and no more” (Second Vatican Council, DV 11). One factor in recognizing particular texts as Sacred Scripture was their general acceptance in the Church. In the Christian communities there had to be a consensus: “Yes, through this text God himself speaks to us-this is inspired by the Holy Spirit!” Which of the many original Christian writings are really inspired by the Holy Spirit has been defined since the fourth century in the so-called canon of Sacred Scriptures.
How can Sacred Scripture be “truth” if not everything in it is right?
The Bible is not meant to convey precise historical information or scientific findings to us. Moreover, the authors were children of their time. They shared the cultural ideas of the world around them and often were also dominated by its errors. Nevertheless, everything that man must know about God and the way of his salvation is found with infallible certainty in Sacred Scripture.
CCC section (102-108)