Most of the time, your computer decides what a file is by its name. Gmail reads the file itself. Google gave away the AI that does it.
It's called Magika.
Your computer looks at the extension. The .pdf at the end, the .jpg, the .docx. But extensions are just labels. Anyone can change them. Rename a virus to quarterly-report.pdf, and your file browser shows a PDF icon like nothing is wrong.
Magika ignores the extension entirely. It reads the actual content and runs it through an AI trained on 100 million files across 200+ types.
~99% accuracy at 5 milliseconds per file.
This is the same system Google runs on Gmail attachments and Google Drive uploads. Hundreds of billions of files per week.
Now you can install it on your own computer.
17,800 stars and Free forever.
No account or using the cloud because everything runs on your machine.
VirusTotal uses and abuse.ch uses it. Google's security research team built it, then put the code on GitHub.
The AI scanning your Gmail attachments right now is sitting on GitHub. Free.