macOS says this a lot, and it is not always telling you the truth about the file.
Why the warning shows up
You download a disk image, you drag the app to Applications, you double-click, and macOS says the app is damaged and should go in the trash. Often the app is fine and the quarantine flag is not. macOS marks files that came from a browser. Gatekeeper then refuses anything that is not notarized the way it expects, and the message it chooses is harsher than the fact.
I see it on small utilities more than on the Mac App Store, because those builds never passed through the store’s check. Compresto’s 1.30.1 notes even mention a related mess, where the app had registered itself as the opener for movies and stills and that registration could trip the same kind of warning. Update past that if you are on an old build.
Open it from Privacy settings
Try the door Apple actually gave you before you touch the Terminal.
- Leave the app in Applications. Don’t empty the trash yet.
- Open System Settings, then Privacy & Security.
- Scroll to the note about the app you just tried. If it offers Open Anyway, use that, then confirm.
- Launch the app from Applications once more.
If the button is not there, the flag may still be sitting on the file. That is the next section, and it is only for an app you meant to download.
Clear the quarantine flag
This removes the mark that says “came from the internet.” It does not repair a file that is actually broken, and it does not make a stranger’s build safe. Replace the name with the app you have.
xattr -d com.apple.quarantine /Applications/Compresto.app
If the command says the attribute is missing, there was nothing to clear. If the app still will not open, the build may be the wrong chip, or the download stopped halfway. Get the image again from the program page and check the size against the number on the card.
When you should stop
Stop if you did not download the file. Stop if a comment, a forum, or a stranger told you to run a command you don’t understand. Stop if the app is asking for a password to “remove malware” as its first sentence. Delete it and tell me, if it was linked from this shelf.
A warning on a tool you fetched yourself, from a page you meant to be on, is usually the quarantine flag. A warning on a file you don’t remember fetching is the file leaving.