A student is in custody after allegedly bringing a firearm into the school building Monday morning, school officials say.