From a Catholic Church point of view, it pays attention to its "teaching magisterium".
(Emphasis mine throughout.)
III. THE INTERPRETATION OF THE HERITAGE OF FAITH
The heritage of faith entrusted to the whole of the Church
84 The apostles entrusted the "Sacred deposit" of the faith (the depositum fidei),45 contained in Sacred Scripture and Tradition, to the whole of the Church. "By adhering to [this heritage] the entire holy people, united to its pastors, remains always faithful to the teaching of the apostles, to the brotherhood, to the breaking of bread and the prayers. So, in maintaining, practicing and professing the faith that has been handed on, there should be a remarkable harmony between the bishops and the faithful."46
The Magisterium of the Church
85 "The task of giving an authentic interpretation of the Word of God, whether in its written form or in the form of Tradition, has been entrusted to the living teaching office of the Church alone. Its authority in this matter is exercised in the name of Jesus Christ."47 This means that the task of interpretation has been entrusted to the bishops in communion with the successor of Peter, the Bishop of Rome.
The Orthodox Church tends to the same idea of a written and oral tradition that may only be deciphered by certain people with this church.
Orthodoxy is a profoundly scriptural tradition. The Bible is God's revelation to humanity, the paramount expression of all that is essential to life and salvation. However, the Orthodox tradition does not encourage approaching the Bible outside of the church and its traditions. A single believer, no matter how sincere, cannot properly come to terms with the full meaning of the Bible on his or her own. In one sense this is because the meaning of the Bible is not always self-evident. In addition, the Bible itself discourages solitary interpretation (Acts 8:26-31; 2 Pet. 1:20).
For Protestants, we would follow two rules. For the Old Testament, it must have been written during the valid prophetic voice. Christ mentions this from Abel to Zachariah. Peter also mentions this.
For the prophecy came not in old time by the will of man: but holy men of God spake as they were moved by the Holy Ghost. 2 Peter 1:21
For the New Testament, we consider the author and time of its writing. The Muratorian Fragment comments this way.
But Hermas wrote the Shepherd (74) very recently, [7c] in our times, in the city of Rome, (75) while bishop Pius, his brother, was occupying the [episcopal] chair (76) of the church of the city of Rome. [7d] (77) And therefore it ought indeed to be read; but (78) it cannot be read publicly to the people in church either among (79) the Prophets, whose number is complete,  or among (80) the Apostles, for it is after [their] time.
This Fragment also confirms the idea just mentioned that the Old Testament was complete as written during the time of a valid prophetic voice.
Lastly, the idea for Protestants is that the church has a written book of scripture. It is not to be added to or subtracted from with oral T(t)radition that by its very nature is impossible to source to either Old Testament prophets or New Testament apostles.