Over the last several weeks, some Apple users noticed ad-based spam notifications in the Calendar app. Apple's Photos app was also subjected to unprotected sharing invites and subsequent spam, and some users reported that the issue moved over to iMessages as well.
With the Report Junk feature on iCloud, Apple is letting users remove spam invites from their calendar and report the sender to Apple for investigation. According to 9to5Mac, the feature is only available on Apple's iCloud.com Calendar web app, but it's expected to reach iOS and the MacOS native Calendar via an eventual software update.
To take advantage of the feature, users must log in to their iCloud account with their Apple ID, then locate the spammy invite in the web calendar, and click the Report Junk link. After that, the invite should disappear from all synced calendars.
Overall, the Report Junk feature is more of a whack-a-mole solution than an actual fix. However, Apple's mere acknowledgement that Calendar has a spam problem is encouraging. Whether and when it'll provide an effective solution remains to be seen.