diff --git a/poetry_audit_plugin/command.py b/poetry_audit_plugin/command.py index 5c47c79..49cb6e0 100644 --- a/poetry_audit_plugin/command.py +++ b/poetry_audit_plugin/command.py @@ -106,12 +106,8 @@ def handle(self) -> None: self.chatty_line_error(str(e)) sys.exit(e.get_exit_code()) try: - vulnerable_packages, amount_of_ignored_vulnerabilities = self.filter_vulnerable_packages( - check_vulnerable_packages( - session, packages, int(self.option("cache-sec")) if self.option("cache-sec") else 0 - ), - ignored_packages, - ignored_codes, + all_vulnerable_packages = check_vulnerable_packages( + session, packages, int(self.option("cache-sec")) if self.option("cache-sec") else 0 ) except SafetyDBAccessError as e: self.chatty_line_error(f"Error occured while accessing Safety DB.") @@ -119,6 +115,11 @@ def handle(self) -> None: self.chatty_line_error(str(e)) sys.exit(e.get_exit_code()) + vulnerable_packages, amount_of_ignored_vulnerabilities = self.filter_vulnerable_packages( + all_vulnerable_packages, + ignored_packages, + ignored_codes, + ) max_line_lengths = self.calculate_line_length(vulnerable_packages) amount_of_vulnerable_packages = len(vulnerable_packages) if self.option("json"):