Skip to content

Commit 5ea3ba7

Browse files
committed
chore: update verify break condition; revert file check; improve debug comment for hashing
Signed-off-by: Ben Selwyn-Smith <[email protected]>
1 parent 65c3e3b commit 5ea3ba7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/macaron/provenance/provenance_finder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,5 +590,5 @@ def get_artifact_hash(
590590

591591
return pypi_registry.get_artifact_hash(source_url)
592592

593-
logger.debug("Purl type '%s' not yet supported for GitHub attestation discovery.", purl.type)
593+
logger.debug("Purl type '%s' not yet supported for artifact hashing.", purl.type)
594594
return None

src/macaron/provenance/provenance_verifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def _find_subject_asset(
249249
for item in all_assets:
250250
item_path = os.path.join(download_path, item["name"])
251251
# Make sure to download an archive just once.
252-
if not Path(item_path).exists():
252+
if not Path(item_path).is_file():
253253
if not ci_service.api_client.download_asset(item["url"], item_path):
254254
logger.info("Could not download artifact %s. Skip verifying...", os.path.basename(item_path))
255255
break

src/macaron/slsa_analyzer/analyzer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ def run_single(
547547
verified = []
548548
for ci_info in analyze_ctx.dynamic_data["ci_services"]:
549549
verified.append(verify_ci_provenance(analyze_ctx, ci_info, temp_dir))
550-
if not verified:
550+
if not verified[-1]:
551551
break
552552
if verified and all(verified):
553553
provenance_l3_verified = True

0 commit comments

Comments
 (0)