Skip to content

Commit

Permalink
chore: remove check of discovered commit against provenance commit; f…
Browse files Browse the repository at this point in the history
…ix more integration test related issues

Signed-off-by: Ben Selwyn-Smith <[email protected]>
  • Loading branch information
benmss committed Jul 17, 2024
1 parent fc918cd commit 5e36475
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions src/macaron/slsa_analyzer/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def run_single(
):
return Record(
record_id=repo_id,
description="Input mismatch between repo/commit and provenance.",
description="Input mismatch between repo and provenance.",
pre_config=config,
status=SCMStatus.ANALYSIS_FAILED,
)
Expand Down Expand Up @@ -440,9 +440,7 @@ def run_single(
provenance_payload = ProvenanceFinder().find_provenance_from_ci(analyze_ctx, git_obj)
# If found, verify analysis target against new provenance
if provenance_payload:
# If the digest and repository URL were not provided as input, check those found during analysis.
if not digest_input and component.repository:
digest_input = component.repository.commit_sha
# If repository URL was not provided as input, check the one found during analysis.
if not repo_path_input and component.repository:
repo_path_input = component.repository.remote_path

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Policy("test_policy", component_id, "") :-
check_passed(component_id, "mcn_build_script_1"),
check_passed(component_id, "mcn_build_service_1"),
check_passed(component_id, "mcn_version_control_system_1"),
check_passed(component_id, "mcn_provenance_derived_repo_1"),
check_failed(component_id, "mcn_provenance_derived_commit_1"),
check_failed(component_id, "mcn_provenance_derived_repo_1"),
check_failed(component_id, "mcn_trusted_builder_level_three_1"),
is_repo_url(component_id, "https://github.com/micronaut-projects/micronaut-core").

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Policy("test_policy", component_id, "") :-
check_passed(component_id, "mcn_build_as_code_1"),
check_passed(component_id, "mcn_build_script_1"),
check_passed(component_id, "mcn_build_service_1"),
check_passed(component_id, "mcn_provenance_available_1"),
check_passed(component_id, "mcn_provenance_expectation_1"),
check_passed(component_id, "mcn_trusted_builder_level_three_1"),
check_passed(component_id, "mcn_version_control_system_1"),
check_failed(component_id, "mcn_provenance_available_1"),
check_failed(component_id, "mcn_provenance_expectation_1"),
check_failed(component_id, "mcn_infer_artifact_pipeline_1"),
check_failed(component_id, "mcn_provenance_derived_commit_1"),
check_failed(component_id, "mcn_provenance_derived_repo_1"),
Expand Down

0 comments on commit 5e36475

Please sign in to comment.