Skip to content

Commit 173f920

Browse files
authored
fix: accept provenances that are not inferred in the provenance checks (#802)
Signed-off-by: behnazh-w <[email protected]>
1 parent 8f2e757 commit 173f920

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/macaron/slsa_analyzer/checks/provenance_available_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def run_check(self, ctx: AnalyzeContext) -> CheckResultData:
504504
CheckResultData
505505
The result of the check.
506506
"""
507-
if ctx.dynamic_data["provenance"]:
507+
if not ctx.dynamic_data["is_inferred_prov"] and ctx.dynamic_data["provenance"]:
508508
return CheckResultData(
509509
result_tables=[ProvenanceAvailableFacts(confidence=Confidence.HIGH)],
510510
result_type=CheckResultType.PASSED,

src/macaron/slsa_analyzer/checks/provenance_verified_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def run_check(self, ctx: AnalyzeContext) -> CheckResultData:
6767
CheckResultData
6868
The result of the check.
6969
"""
70-
if not ctx.dynamic_data["provenance"]:
70+
if ctx.dynamic_data["is_inferred_prov"] or not ctx.dynamic_data["provenance"]:
7171
# Provenance is not available.
7272
return CheckResultData(
7373
result_tables=[ProvenanceVerifiedFacts(build_level=0, confidence=Confidence.HIGH)],

0 commit comments

Comments
 (0)