Skip to content

Commit

Permalink
chore: add exception catching in analyzer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tromai committed Dec 11, 2024
1 parent ffa4c06 commit e2c0236
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/macaron/slsa_analyzer/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
DuplicateError,
InvalidAnalysisTargetError,
InvalidPURLError,
LocalArtifactFinderError,
ProvenanceError,
PURLNotFoundError,
)
Expand Down Expand Up @@ -481,12 +482,14 @@ def run_single(

if parsed_purl and parsed_purl.type in self.local_artifact_repo_mapper:
local_artifact_repo_path = self.local_artifact_repo_mapper[parsed_purl.type]
analyze_ctx.dynamic_data["local_artifact_paths"].extend(
get_local_artifact_dirs(
try:
local_artifact_dirs = get_local_artifact_dirs(
purl=parsed_purl,
local_artifact_repo_path=local_artifact_repo_path,
)
)
analyze_ctx.dynamic_data["local_artifact_paths"].extend(local_artifact_dirs)
except LocalArtifactFinderError as error:
logger.debug(error)

analyze_ctx.check_results = registry.scan(analyze_ctx)

Expand Down

0 comments on commit e2c0236

Please sign in to comment.