What you can do is open it up and see how far the spots penetrate into the skin. That's really the ticket to interpreting what to do. If they don't penetrate then you can cut them off and still use it. In fact, I think we're having so much farming trouble in this country, I'd advise you to try to keep whatever you can and salvage damaged vegetables where possible if you can do so safely.
Here's the second thing you can do.... this will probably really help you! What you do is you get a flashlight and some dishsoap and water solution in a mist sprayer. And you go out after dark to spray the bugs that are getting into your vegetable plants. Normally you don't have to do this all night. But that's actually when you'll find a lot of the culprits. So I might go out at 11 PM and quickly go over and spot check which plants are being attacked by bugs. And then spray the bugs with the dishsoap spray; what it does is the dishsoap clogs up their air sacs. So they can't survive. Works great with earwigs, which come out mostly at night. Works on others also. You can usually find really fast which bugs to spray; you are spraying the bugs not the plants... so you have to catch them at work. Then you go back inside, and you do this again maybe at 1 AM or some other time before sun up. A lot of bugs also won't be out until 1 AM to 4 AM though.
Its hard to see the pic but it could possibly be bug, insect bites... It could also be bug bites that got infected by mold or fungus in them also (I think this is the higher likelihood.) If you are nervous about using the squash in question, you can cut off the bug bites, fungus, mold, whatever, then open it up and smell it. If it smells bad keep trimming stuff off until you are sure there's no bad smell. And you can give it to animals also instead. This is also how you learn about how to salvage food. So you want this experience so you can know BEFORE HARD TIMES HIT what to do in those situations.
Give it a try! And I hope to hear how it went.