Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/macaron/slsa_analyzer/checks/build_service_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ def __init__(self) -> None:
"""Initiate the BuildServiceCheck instance."""
check_id = "mcn_build_service_1"
description = "Check if the target repo has a valid build service."
depends_on: list[tuple[str, CheckResultType]] = [("mcn_build_as_code_1", CheckResultType.FAILED)]
depends_on: list[tuple[str, CheckResultType]] = [("mcn_version_control_system_1", CheckResultType.PASSED)]
eval_reqs = [ReqName.BUILD_SERVICE]
super().__init__(
check_id=check_id,
description=description,
depends_on=depends_on,
eval_reqs=eval_reqs,
result_on_skip=CheckResultType.PASSED,
result_on_skip=CheckResultType.FAILED,
)

def run_check(self, ctx: AnalyzeContext) -> CheckResultData:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* Copyright (c) 2024 - 2024, Oracle and/or its affiliates. All rights reserved. */
/* Copyright (c) 2024 - 2025, Oracle and/or its affiliates. All rights reserved. */
/* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/. */

#include "prelude.dl"

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_failed(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"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
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_failed(component_id, "mcn_build_service_1"),
check_passed(component_id, "mcn_version_control_system_1"),
check_passed(component_id, "mcn_provenance_available_1"),
check_passed(component_id, "mcn_provenance_derived_repo_1"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
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_failed(component_id, "mcn_build_service_1"),
check_passed_with_confidence(component_id, "mcn_find_artifact_pipeline_1", confidence),
confidence = 0.7, // Medium confidence because the pipeline was not found from a provenance.
check_passed(component_id, "mcn_version_control_system_1"),
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/cases/semver/policy.dl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
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_failed(component_id, "mcn_build_service_1"),
check_passed(component_id, "mcn_provenance_available_1"),
check_passed(component_id, "mcn_provenance_derived_commit_1"),
check_passed(component_id, "mcn_provenance_derived_repo_1"),
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/cases/uiv-lib_uiv/policy.dl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
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_failed(component_id, "mcn_build_service_1"),
check_passed(component_id, "mcn_version_control_system_1"),
check_passed(component_id, "mcn_build_tool_1"),
build_tool_check(npm_id, "npm", "javascript"),
Expand Down
Loading