Skip to content

Commit

Permalink
updates scan pattern retrieval to allow for none
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-szeto-slalom committed Jun 4, 2024
1 parent 05064dd commit f0ad772
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions secureli/actions/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,5 +225,10 @@ def _get_commited_files(self, scan_mode: ScanMode) -> list[Path]:

def _get_custom_scan_patterns(self, folder_path: Path) -> list[Path]:
settings = self.action_deps.settings.load(folder_path)
custom_scan_patterns = settings.scan_patterns.custom_scan_patterns
return custom_scan_patterns
if (
settings.scan_patterns is not None
and settings.scan_patterns.custom_scan_patterns is not None
):
custom_scan_patterns = settings.scan_patterns.custom_scan_patterns
return custom_scan_patterns
return []

0 comments on commit f0ad772

Please sign in to comment.