magika icon indicating copy to clipboard operation
magika copied to clipboard

[Misdetection] Brewfile file misdetected as "Shell script (code)"

Open arturmartins opened this issue 5 months ago • 2 comments

What should the file have been detected as? What has the file been misdetected as? "Shell script (code)" is misleading since it's not a shell-compatible file type. It may make sense to have a separate file type (homebrew)?

Please link or attach the misdetected file below (Do NOT upload PII!)

tap "apple/apple"
brew "apple/apple/game-porting-toolkit"
brew "postgresql@16", restart_service: true
cask "firefox"
mas "Refined GitHub", id: 1519867270
vscode "editorconfig.editorconfig"
go "github.com/charmbracelet/crush"

Additional context https://docs.brew.sh/Brew-Bundle-and-Brewfile

arturmartins avatar Nov 09 '25 13:11 arturmartins

I think that's a very good suggestion. Thanks!

Do you know of any way to get a good dataset of such files? We could try to generate samples via LLMs as we did for other files, but we always try to have a dataset of "real" files to use as test set.

reyammer avatar Nov 13 '25 15:11 reyammer

A quick way to get a dataset is to use GitHub search for **/Brewfile paths (GitHub identifies Brewfiles as "Ruby", BTW): https://github.com/search?q=path%3A**%2FBrewfile+language%3ARuby&type=code

arturmartins avatar Nov 15 '25 18:11 arturmartins