diff --git a/src/phylum/ci/ci_base.py b/src/phylum/ci/ci_base.py index 8c5edbcf..599cfab1 100644 --- a/src/phylum/ci/ci_base.py +++ b/src/phylum/ci/ci_base.py @@ -145,6 +145,10 @@ def filter_lockfiles(self, provided_lockfiles: List[Path]) -> Lockfiles: LOG.warning("Provided lockfile does not exist: %s", provided_lockfile) self.returncode = ReturnCode.LOCKFILE_FILTER continue + if not provided_lockfile.is_file(): + LOG.warning("Provided lockfile is not a file: %s", provided_lockfile) + self.returncode = ReturnCode.LOCKFILE_FILTER + continue if not provided_lockfile.stat().st_size: LOG.warning("Provided lockfile is an empty file: %s", provided_lockfile) self.returncode = ReturnCode.LOCKFILE_FILTER