google / google/magika

[Misdetection] DOCX file misdetected as spreadsheetml (XLSX) or application/zip

Open
#1,326 0 comments 0 reactions 0 assignees View on GitHub
misdetection needs triage
Dominant language
Rust
Stars
18.6k
Forks
1.2k
Avg merge
3d 12h
Merged PRs (30d)
20

Description

**What should the file have been detected as? What has the file been misdetected as?**
Valid .docx files are being misdetected as application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (XLSX) or application/zip instead of application/vnd.openxmlformats-officedocument.wordprocessingml.document (DOCX).

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

[test.docx](https://github.com/user-attachments/files/26089437/test.docx)

**Additional context**
DOCX, XLSX and PPTX share the same OOXML/ZIP container structure, which likely causes the confusion. A similar issue was reported for .ai files detected as PDF (#336).

Contributor guide

Open the contributing guide

Research direction

Start by reproducing detection with the attached test.docx and compare the reported type with the expected DOCX MIME type. Read the handling of OOXML/ZIP containers and the related issue #336; done means valid DOCX files are no longer classified as XLSX or application/zip.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.