Skip to content

Detect mailcap.findmatch pickle payloads - #69

Open
massy-o wants to merge 1 commit into
mmaitre314:mainfrom
massy-o:codex/detect-mailcap-findmatch
Open

Detect mailcap.findmatch pickle payloads#69
massy-o wants to merge 1 commit into
mmaitre314:mainfrom
massy-o:codex/detect-mailcap-findmatch

Conversation

@massy-o

@massy-o massy-o commented May 14, 2026

Copy link
Copy Markdown

Summary

  • classify mailcap.findmatch as a dangerous pickle global
  • add regression coverage for a pickle payload that references mailcap.findmatch

Why

mailcap.findmatch can execute a matching mailcap entry test command via os.system(). Treating it as suspicious only leaves CLI scans with zero dangerous globals and exit code 0.

Testing

  • uv run --with-editable . --with pytest --with numpy --with py7zr pytest tests/test_scanner.py::test_scan_pickle_bytes_flags_mailcap_findmatch tests/test_scanner.py::test_scan_pickle_bytes

Comment thread src/picklescan/scanner.py
Comment thread tests/test_scanner.py
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.

1 participant