The shooting was reported at about 9:15 a.m. near Monterey Boulevard and Foerster Street.
The victim was driving on Monterey Boulevard when an object came through his windshield then hit a passenger-side window, causing the window to break, according to police.
The man was not injured by the projectile, which he believed was some sort of pellet fired from a BB gun, police said.
Anyone with information about the shooting is encouraged to call the Police Department's anonymous tip line at (415) 575-4444 or send a tip by text message to TIP411.