Buying a bike that has been idle in a garage for years?
Its entirely possible the bike is good and safe to ride with a bit of air in the tires and shocks/forks - this would heavily depend on the climate in the garage it was stored in and condition it was in before being hung up.  

Presuming the bike looks in good condition with little or no surface rust, the following are the things that might need attention apart from what a regular service would entail (regular service is things like chain clean and lube,tuning brake check etc.  

Tires/tubes - Personally I would be putting on new tires and tubes. They may be OK, but the rubber will have hardened and not be as grippy as tires should be. If they look OK, check them after each ride for a few rides to be sure they are OK. 

Brakes - Check they are not seized and work reasonably well. Seals could be gone, so look for leaks around the calipers, Keep in mind if it has not been used for a while, leaks may not show up immediately. Presume the pads and discs have been contaminated.It may just be dust and good clean will fix it, but in a garage that dust may contain oils. Budget for new pads and if needed give the discs a really good clean and put new pads in
Depending how its stored, a brake bleed may be needed. If Dot fluid I would suggest a bleed regardless as DOT is hygroscopic (Absorbs moisture) and after 10 years it will probably be contaminated. 

Shocks/Forks - Best to give these a full service with new seals and O-Rings. If you don't want to go that far, a basic service is highly recommended. These are expensive bits to replace so its cheap insurance. Check for pitting and corrosion on the stanchions and shock damper body. They will be ridable - for a while - with pitting, but the cost of replacements on such and old bike makes it uneconomic. 

If there is surface rust on things like the chain, things like a new chain and new gear cables may be in order. These are low cost items so should not be a concern. Apart from these components, a bit of surface rust largely cosmetic.