That is actually a good question. I wondered about that the other day when I was reflecting on the hair loss I have suffered in the years since I was in the military.
I was in from 89-93, so that was a while back, they may be more LENIENT now than then..but I can tell you, the very first night, they dump everything you have on a table in front of you (you should hardly bring anything anyhow) and they go thru EVERYTHING.
All prescription drugs, that were not initially disqualifying, obviously, are allowed that I know of. I would think, it is possible, that if you have a prescription, they will allow you to take one once a day.
They will shave your head too, so, it won't matter while you are there, however long your boot camp is, mine was 10 weeks (USCG) back then, at Cape May, NJ.
Ask your recruiter, but don't expect them to know or to get the right answer for you. I would take a small amount, UNCUT, that if cut, will last for the duration. Cut in half (proscar) and take Mon-Wed-Fri, etc.
You certainly won't get in trouble for taking them, and that initial part of boot camp, when they dump all your stuff, the drill instructors doing it, often aren't instructers per se..they are other permanent party and at that point, they are rude to you, but not singling you out for humiliation. They are actually doing their job, getting things sorted, getting your medical stuff in order (you will medical AGAIN once you arrive...expect no more than 3 hours sleep the first two or three nights, unless things have changed). I do not recall them holding anyone's things up and saying "Looky what we have here !" This part of boot camp is very administrative, to get certain things accomplished without all the other stuff.
That comes the day or two after. Good luck.
Semper Paratus