Exposed nails on a new roof

This is a sign of poor and unprofessional workmanship. This area will typically fail with-in 4-6 years. Properly installed flashings should last the normal life of the roof.