You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document that neither Rego nor ClamAV enforces MIME/file-type rules inside ZIP archives #1190
Docs should state that blocking file types in postprocessing does not apply to files inside archives.
Rego only evaluates the structured input the pipeline already provides (outer filename, extension, MIME, size, etc.). It does not unpack ZIP/TAR/7z/… or MIME-scan nested members.
ClamAV (if enabled) is an antivirus scanner. It may inspect archive members for malware signatures. It is not a MIME/file-type policy engine. A clean .exe inside a .zip is typically not blocked just because it is an executable.
So this is expected, not a Rego bug and not something ClamAV is meant to cover:
Upload
Typical Rego MIME/extension rule
Typical ClamAV (no malware hit)
malware.exe (outer EXE)
denied
depends on signature
clean.exe (outer EXE)
denied
allowed (not a virus)
archive.zip containing clean.exe
allowed (application/zip)
allowed (not a virus)
archive.zip containing known malware
allowed by MIME policy
denied only if ClamAV detects it
Nested file-type control (deny EXE/script/etc. inside ZIP) is not provided by Rego and not provided by ClamAV.
Why this is a docs gap
Operators write “deny .exe / application/x-msdownload” in Rego and assume EXEs cannot be uploaded. Archives bypass outer MIME/extension checks. Pointing people at ClamAV for that gap is also wrong: ClamAV does not implement “block this MIME inside the archive.”
Without this in the docs:
False sense of security (“we block executables”).
Support tickets against Rego (“ZIP with EXE gets through”).
Misconfiguration: enabling ClamAV and believing it is nested MIME policy.
Can: signature-based malware detection; many builds also unpack common archives for that purpose.
Cannot (as used for this problem): “deny if any inner file is an EXE/script/…”; guaranteed listing of inner MIMEs into Rego; password-protected archives; unlimited nested/zip-bomb unpacking.
changed the title [-]Document that Rego postprocessing does not inspect archive contents (ZIP/EXE nested files); use ClamAV for that[/-][+]Document that Rego postprocessing does not inspect archive contents (ZIP/EXE nested files)[/+]on Sep 29, 2026
changed the title [-]Document that Rego postprocessing does not inspect archive contents (ZIP/EXE nested files)[/-][+]Document that neither Rego nor ClamAV enforces MIME/file-type rules inside ZIP archives[/+]on Sep 29, 2026
Activity
[-]Document that Rego postprocessing does not inspect archive contents (ZIP/EXE nested files); use ClamAV for that[/-][+]Document that Rego postprocessing does not inspect archive contents (ZIP/EXE nested files)[/+][-]Document that Rego postprocessing does not inspect archive contents (ZIP/EXE nested files)[/-][+]Document that neither Rego nor ClamAV enforces MIME/file-type rules inside ZIP archives[/+]