A friend of mine did that, and so did I, but it's a lot of work and some $ to get the outside sound down to a minimum and get the room treated well. My friend actually put more thought, money and effort into his and came out with something very nice...acoustically. I have a pretty nice dry sounding space, but I do get some low frequency road noise that has to be dealt with. I'm on top of a hill near a busy country highway. Do lots of research before proceeding and get a plan...then have some experts shoot it down and plan again. Auralex style foam is okay for keeping down reflections, but that is about all. It is not suitable for soundproofing.
A nice functioning studio can be made with an unfinished shed by gluing dense 3/4" fire rated drywall between the studs of the exterior siding and ceiling, setting the thing on a foundation rather than the usual blocks, floating the floor, using heavy inner and outer entrance doors, and using a staggered-stud double wall system. Insulate well. Heat with a $40 oil type radiant space heater and cool with a quiet split AC system (kind of pricey). Treat the inside with DIY clouds, broad band absorbers, and bass traps...maybe some diffusion. If you get one that is well made, it'll last a long time if you keep the inside temp constant, and ventilate the roof space. Mine is quieter than my house. I started with a case of foam "Great Stuff"...and it is also more bug proof than my house.
As far as a security risk, you can get one without windows, install an alarm system, add the heavy doors, etc. Check with your homeowners policy and make sure you are covered on that end.