Flashing Installation

I did an inspection on my roof last week and I noticed something I don’t recall studying. On the flashing that goes around the plumbing vents, I noticed a glue type substance almost caked on the nails in all of the flashing. I believe this to not be the correct way of installing flashing…or is it?

The bottom of the metal flashing should be nailed down on top of the underlying shingle. The glue stuff ? - i assume is clear silicone. You need to cover nailheads from rusting.
If this is what you are describing - its proper

Thank you for clarifying.