LittleBigRefresh / Refresh

A second-generation custom server for LittleBigPlanet that focuses on quality of life features and improving user experience.
https://lbp.littlebigrefresh.com
GNU Affero General Public License v3.0
76 stars 25 forks source link

Introduce integrations with AIPI for automated content scanning #644

Closed jvyden closed 3 months ago

jvyden commented 3 months ago

Rough port from DO code to integrate AI image scanning into Refresh. This should help reduce the photo endpoint abuse we've been seeing from DT, while using the same existing infrastructure that works incredibly well.

This does not scan every uploaded texture as this would increase server load significantly. It will only scan under certain circumstances:

This also brings in the option to automatically restrict users who upload images with banned tags if configured. This will be left off on production while I gauge if this is going to false-flag for normal non-abuse activity.

Oh, this also introduces support for a staff-only webhook. This could be used for a non-persisted audit log if we wanted to use that as a solution for #565.