TT #16 · Parashas Noach · First Aliyah · Passuk 6:19
And of every living thing, of all flesh, two of each you shall bring into the ark to keep alive with you; they shall be male and female.
Torah Temimah points to the derasha excluding a treifah (Avodah Zarah 6a).
Sefaria — Avodah Zarah 6a · E-Daf — Avodah Zarah 6a
“To keep alive with you” — “with you” means those similar to you, to exclude a treifah (an animal with a fatal defect that cannot live twelve months).
Custom (exclusion of treifah from the ark animals via “with you” and the twelve-month duration).
Only whole, viable animals (not treifot) were brought into the ark; “with you” requires animals that, like Noach, could survive the full year of the Flood.