Shastra is the Authority
This statement in mentioned in Bhagavata Gita chapter 16 verse 24 and is said by Lord Krishna to Arjuna, advising him what to do, when there is uncertainty in actions.
तस्माच्छास्त्रं प्रमाणं ते कार्याकार्यव्यवस्थितौ |
ज्ञात्वा शास्त्रविधानोक्तं कर्म कर्तुमिहार्हसि ||
Meaning
Scriptures are the authority in determining what should be done and what should not be done. Understand the teachings of shastra (scriptures), and then perform your actions in this world accordingly.
Meaning
इसलिए क्या करना और क्या नहीं करना चाहिए? यह निश्चित करने के लिए शास्त्रों में वर्णित विधानों को स्वीकार करो और शास्त्रों के निर्देशों के अनुसार संसार में कर्तव्यों का पालन करो।