Skip to content

Add Magika For FileType Detection - #3159

Merged
kevoreilly merged 10 commits into
kevoreilly:masterfrom
kevross33:master
Aug 14, 2026
Merged

Add Magika For FileType Detection#3159
kevoreilly merged 10 commits into
kevoreilly:masterfrom
kevross33:master

Conversation

@kevross33

Copy link
Copy Markdown
Contributor

Adds Google magika for file type identification for any files https://github.com/google/magika. Primarily its usefulness is in that it detects text files too like PowerShell, python etc. and can also make confidence guesses too if unknown.

This can be tuned/disabled to avoid low confidence detections showing as sometimes it makes erroneous detections on shellcode data but it is shown as a very low confidence.

Added a method to retrieve Google Magika content type predictions, which can be enabled in the configuration. The method caches results to avoid repeated calls.
Added magika cache clearing functionality and backfill logic for file_info.
Integrate magika_info function to enhance file processing.
Added configuration for Google Magika deep-learning content type identification, including options for model directory, prediction mode, minimum score, and maximum file size.
Integrate Google Magika for deep-learning content type identification. This module enhances file type detection alongside existing libmagic functionality.
Add tests for Magika integration in Cuckoo Sandbox.
@kevoreilly
kevoreilly merged commit cf7bfe9 into kevoreilly:master Aug 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants