fix(security): restore archive and export findings#1605
Conversation
Allow the PyTorch scanner to inspect malformed ZIP size metadata without weakening generic ZIP rejection, scan concatenated HDF5 user-block archives independently, and harden exported source credential redaction.
Performance BenchmarksCompared
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3454d8782
ℹ️ 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".
Stop probing interior Base64 windows after a complete encoded pickle consumes the literal, and scan complete raw nested pickles under the dedicated nested byte budget even when the generic literal scan cap is smaller.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9b8eb3f94
ℹ️ 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".
| "scan_outcome_reason": "zip_analysis_incomplete", | ||
| }, | ||
| ) | ||
| if isinstance(error, _ZipLocalEntryMismatch) and error.entry.is_symlink: |
There was a problem hiding this comment.
Surface mismatched ZIP symlinks in scan
When a mismatched symlink is scanned via ZipScanner.scan (generic ZIP/core preflight), this helper is bypassed; scan catches _InvalidZipDirectory separately and emits only S902, so the unsafe link is not surfaced as critical S406. Apply the same mapping in that path. guidance
Useful? React with 👍 / 👎.
Summary
Validation
ruff format --check modelaudit/ packages/modelaudit-picklescan/src packages/modelaudit-picklescan/tests tests/ruff check modelaudit/ packages/modelaudit-picklescan/src packages/modelaudit-picklescan/tests tests/mypy --platform linux modelaudit/ packages/modelaudit-picklescan/src packages/modelaudit-picklescan/tests tests/The full fast suite reached 5,918 passes before xdist stopped on three cache-state failures. One passed immediately when rerun serially; the other two reproduce unchanged on
origin/mainwith the same macOS interpreter.