Skip to content

Commit

Permalink
PyTorch Zipfile Check and Tests (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
swashko authored Jan 19, 2024
1 parent 3ea3473 commit ee254ab
Show file tree
Hide file tree
Showing 5 changed files with 424 additions and 49 deletions.
4 changes: 4 additions & 0 deletions modelscan/scanners/pickle/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from typing import IO, Union, Optional

from modelscan.scanners.scan import ScanBase, ScanResults
from modelscan.tools.utils import _is_zipfile
from modelscan.tools.picklescanner import (
scan_numpy,
scan_pickle_bytes,
Expand All @@ -26,6 +27,9 @@ def scan(
):
return None

if _is_zipfile(source):
return None

if data:
results = scan_pytorch(data=data, source=source, settings=self._settings)

Expand Down
Loading

0 comments on commit ee254ab

Please sign in to comment.