It’s a 2008 Chevy cobalt ls
Thats the Ambient Temp Sensor.
Awesome thank you sir I appreciate it
Glad I could help. Happy motoring
That part probably doesn’t connect to anything electrical, at least on the protrusion your photo shows, just fits into a space where an accurate air temperature measurement is possible. It would seem like placing it near a headlight wouldn’t be a good spot b/c of the headlight heat, but they must have figured out a way . My Corolla has one too, and it fits a hole in the engine air filter housing.