Skip to content

fix: fail closed on executable ZIP scanner gaps#1487

Merged
mldangelo-oai merged 4 commits into
mainfrom
mdangelo/codex/fix-executable-zip-subtype-unavailable-c125
Jun 4, 2026
Merged

fix: fail closed on executable ZIP scanner gaps#1487
mldangelo-oai merged 4 commits into
mainfrom
mdangelo/codex/fix-executable-zip-subtype-unavailable-c125

Conversation

@mldangelo-oai

Copy link
Copy Markdown
Contributor

Summary

  • fail closed when an executable ZIP composed subtype is recognized but its scanner cannot load
  • keep generic ZIP member scanning while preserving the operational incomplete result
  • add a Skops-shaped composed ZIP regression plus existing polyglot guards

Validation

  • PYTHONPATH=/private/tmp/modelaudit-c125 PROMPTFOO_DISABLE_TELEMETRY=1 /Users/mdangelo/code/modelaudit/.venv/bin/pytest tests/scanners/test_zip_scanner.py::test_executable_zip_composed_routing_fails_closed_when_subtype_scanner_unavailable tests/scanners/test_zip_scanner.py::test_scan_nested_file_fails_closed_when_recognized_header_scanner_is_unavailable tests/test_directory_file_filtering.py::TestDirectoryFileFiltering::test_disguised_llamafile_skops_polyglot_preserves_cve_findings tests/test_directory_file_filtering.py::TestDirectoryFileFiltering::test_out_of_window_executable_skops_zip_preserves_cve_findings -q
  • ruff format --check modelaudit/scanners/archive_dispatch.py tests/scanners/test_zip_scanner.py
  • ruff check modelaudit/scanners/archive_dispatch.py tests/scanners/test_zip_scanner.py
  • mypy modelaudit/scanners/archive_dispatch.py tests/scanners/test_zip_scanner.py
  • git diff --check

@mldangelo-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@github-actions

github-actions Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

Workflow run and artifacts

Performance Benchmarks

Compared 12 shared benchmarks with a regression threshold of 15%.
Status: 0 regressions, 0 improved, 12 stable, 0 new, 0 missing.
Aggregate shared-benchmark median: 1.277s -> 1.284s (+0.5%).

Workload Benchmark Target Size Files Baseline Current Change Status
nested-payload-review tests/benchmarks/test_picklescan_benchmarks.py::test_picklescan_nested_payload_review[nested_raw] nested_raw 78 B 1 416.4us 396.9us -4.7% stable
nested-payload-review tests/benchmarks/test_picklescan_benchmarks.py::test_picklescan_nested_payload_review[nested_base64] nested_base64 98 B 1 422.9us 405.9us -4.0% stable
nested-payload-review tests/benchmarks/test_picklescan_benchmarks.py::test_picklescan_nested_payload_review[nested_hex] nested_hex 130 B 1 432.4us 417.6us -3.4% stable
padded-multi-stream-upload tests/benchmarks/test_picklescan_benchmarks.py::test_picklescan_padded_multi_stream_upload multi_stream_padded 4.1 KiB 1 1.53ms 1.50ms -2.3% stable
direct-malicious-upload tests/benchmarks/test_picklescan_benchmarks.py::test_picklescan_direct_malicious_upload malicious_reduce 52 B 1 1.45ms 1.42ms -2.0% stable
single-checkpoint-preflight tests/benchmarks/test_scan_benchmarks.py::test_scan_single_checkpoint_before_load single_checkpoint.pkl 183.0 KiB 1 70.83ms 72.21ms +1.9% stable
warm-cache-rescan tests/benchmarks/test_scan_benchmarks.py::test_scan_warm_cached_repository_rescan release-candidate 547.3 KiB 32 65.33ms 64.49ms -1.3% stable
clean-training-checkpoint tests/benchmarks/test_picklescan_benchmarks.py::test_picklescan_clean_training_checkpoint safe_large 278.2 KiB 1 110.18ms 111.55ms +1.2% stable
mixed-model-repository tests/benchmarks/test_scan_benchmarks.py::test_scan_release_candidate_repository release-candidate 547.3 KiB 32 402.35ms 406.92ms +1.1% stable
chunked-upload-stream tests/benchmarks/test_picklescan_benchmarks.py::test_picklescan_chunked_upload_stream chunked_stream 278.2 KiB 1 113.53ms 114.29ms +0.7% stable
suspicious-pickle-intake tests/benchmarks/test_scan_benchmarks.py::test_scan_suspicious_pickle_intake suspicious-intake 183.8 KiB 4 131.15ms 130.94ms -0.2% stable
duplicate-heavy-registry tests/benchmarks/test_scan_benchmarks.py::test_scan_duplicate_registry_snapshot registry-snapshot 915.2 KiB 13 379.59ms 379.18ms -0.1% stable

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mldangelo-oai mldangelo-oai marked this pull request as ready for review May 31, 2026 13:26

@ianw-oai ianw-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@mldangelo-oai mldangelo-oai merged commit 889db72 into main Jun 4, 2026
29 checks passed
@mldangelo-oai mldangelo-oai deleted the mdangelo/codex/fix-executable-zip-subtype-unavailable-c125 branch June 4, 2026 18:38
@github-actions github-actions Bot mentioned this pull request Jun 5, 2026
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