Skip to content

Commit a185751

Browse files
committed
chore: remove check of discovered commit against provenance commit; fix more integration test related issues
Signed-off-by: Ben Selwyn-Smith <[email protected]>
1 parent f8e9a8e commit a185751

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

src/macaron/slsa_analyzer/analyzer.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def run_single(
346346
):
347347
return Record(
348348
record_id=repo_id,
349-
description="Input mismatch between repo/commit and provenance.",
349+
description="Input mismatch between repo and provenance.",
350350
pre_config=config,
351351
status=SCMStatus.ANALYSIS_FAILED,
352352
)
@@ -440,9 +440,7 @@ def run_single(
440440
provenance_payload = ProvenanceFinder().find_provenance_from_ci(analyze_ctx, git_obj)
441441
# If found, verify analysis target against new provenance
442442
if provenance_payload:
443-
# If the digest and repository URL were not provided as input, check those found during analysis.
444-
if not digest_input and component.repository:
445-
digest_input = component.repository.commit_sha
443+
# If repository URL was not provided as input, check the one found during analysis.
446444
if not repo_path_input and component.repository:
447445
repo_path_input = component.repository.remote_path
448446

tests/integration/cases/micronaut-projects_micronaut-core/check_results_policy.dl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Policy("test_policy", component_id, "") :-
88
check_passed(component_id, "mcn_build_script_1"),
99
check_passed(component_id, "mcn_build_service_1"),
1010
check_passed(component_id, "mcn_version_control_system_1"),
11+
check_passed(component_id, "mcn_provenance_derived_repo_1"),
1112
check_failed(component_id, "mcn_provenance_derived_commit_1"),
12-
check_failed(component_id, "mcn_provenance_derived_repo_1"),
1313
check_failed(component_id, "mcn_trusted_builder_level_three_1"),
1414
is_repo_url(component_id, "https://github.com/micronaut-projects/micronaut-core").
1515

tests/integration/cases/slsa-framework_slsa-verifier/policy.dl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Policy("test_policy", component_id, "") :-
77
check_passed(component_id, "mcn_build_as_code_1"),
88
check_passed(component_id, "mcn_build_script_1"),
99
check_passed(component_id, "mcn_build_service_1"),
10-
check_passed(component_id, "mcn_provenance_available_1"),
11-
check_passed(component_id, "mcn_provenance_expectation_1"),
1210
check_passed(component_id, "mcn_trusted_builder_level_three_1"),
1311
check_passed(component_id, "mcn_version_control_system_1"),
12+
check_failed(component_id, "mcn_provenance_available_1"),
13+
check_failed(component_id, "mcn_provenance_expectation_1"),
1414
check_failed(component_id, "mcn_infer_artifact_pipeline_1"),
1515
check_failed(component_id, "mcn_provenance_derived_commit_1"),
1616
check_failed(component_id, "mcn_provenance_derived_repo_1"),

0 commit comments

Comments
 (0)