Skip to content

Commit

Permalink
chore: minor fix
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Selwyn-Smith <[email protected]>
  • Loading branch information
benmss committed Jan 16, 2025
1 parent 2e6a0ca commit f6502e3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/macaron/slsa_analyzer/checks/provenance_verified_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from sqlalchemy.orm import Mapped, mapped_column

from macaron.database.table_definitions import CheckFacts
from macaron.json_tools import json_extract
from macaron.provenance.provenance_extractor import ProvenancePredicate
from macaron.slsa_analyzer.analyze_context import AnalyzeContext
from macaron.slsa_analyzer.checks.base_check import BaseCheck
from macaron.slsa_analyzer.checks.check_result import CheckResultData, CheckResultType, Confidence, JustificationType
Expand Down Expand Up @@ -70,9 +70,7 @@ def run_check(self, ctx: AnalyzeContext) -> CheckResultData:
build_type = None
provenance_info = ctx.dynamic_data["provenance_info"]
if provenance_info and provenance_info.provenance_payload:
predicate = provenance_info.provenance_payload.statement.get("predicate")
if predicate:
build_type = json_extract(predicate, ["buildDefinition", "buildType"], str)
build_type = ProvenancePredicate.get_build_type(provenance_info.provenance_payload.statement)

slsa_level = 0
if provenance_info:
Expand Down

0 comments on commit f6502e3

Please sign in to comment.