Skip to content

Commit 8739e09

Browse files
committed
refactor: always run build service check if repo is found
Signed-off-by: behnazh-w <[email protected]>
1 parent f051d8a commit 8739e09

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/macaron/slsa_analyzer/checks/build_service_check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ def __init__(self) -> None:
7575
"""Initiate the BuildServiceCheck instance."""
7676
check_id = "mcn_build_service_1"
7777
description = "Check if the target repo has a valid build service."
78-
depends_on: list[tuple[str, CheckResultType]] = [("mcn_build_as_code_1", CheckResultType.FAILED)]
78+
depends_on: list[tuple[str, CheckResultType]] = [("mcn_version_control_system_1", CheckResultType.PASSED)]
7979
eval_reqs = [ReqName.BUILD_SERVICE]
8080
super().__init__(
8181
check_id=check_id,
8282
description=description,
8383
depends_on=depends_on,
8484
eval_reqs=eval_reqs,
85-
result_on_skip=CheckResultType.PASSED,
85+
result_on_skip=CheckResultType.FAILED,
8686
)
8787

8888
def run_check(self, ctx: AnalyzeContext) -> CheckResultData:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
/* Copyright (c) 2024 - 2024, Oracle and/or its affiliates. All rights reserved. */
1+
/* Copyright (c) 2024 - 2025, Oracle and/or its affiliates. All rights reserved. */
22
/* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/. */
33

44
#include "prelude.dl"
55

66
Policy("test_policy", component_id, "") :-
77
check_passed(component_id, "mcn_build_as_code_1"),
88
check_passed(component_id, "mcn_build_script_1"),
9-
check_passed(component_id, "mcn_build_service_1"),
9+
check_failed(component_id, "mcn_build_service_1"),
1010
check_passed(component_id, "mcn_version_control_system_1"),
1111
check_passed(component_id, "mcn_provenance_derived_repo_1"),
1212
check_failed(component_id, "mcn_provenance_derived_commit_1"),

tests/integration/cases/micronaut-projects_micronaut-test/micronaut-test.dl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Policy("test_policy", component_id, "") :-
77
check_passed(component_id, "mcn_build_as_code_1"),
88
check_passed(component_id, "mcn_build_script_1"),
9-
check_passed(component_id, "mcn_build_service_1"),
9+
check_failed(component_id, "mcn_build_service_1"),
1010
check_passed(component_id, "mcn_version_control_system_1"),
1111
check_passed(component_id, "mcn_provenance_available_1"),
1212
check_passed(component_id, "mcn_provenance_derived_repo_1"),

tests/integration/cases/org_apache_logging_log4j/policy_purl.dl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Policy("test_policy", component_id, "") :-
77
check_passed(component_id, "mcn_build_as_code_1"),
88
check_passed(component_id, "mcn_build_script_1"),
9-
check_passed(component_id, "mcn_build_service_1"),
9+
check_failed(component_id, "mcn_build_service_1"),
1010
check_passed_with_confidence(component_id, "mcn_find_artifact_pipeline_1", confidence),
1111
confidence = 0.7, // Medium confidence because the pipeline was not found from a provenance.
1212
check_passed(component_id, "mcn_version_control_system_1"),

0 commit comments

Comments
 (0)