Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/license_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
# fork PRs through pull_request_target for approval
if: >-
(github.event_name == 'merge_group') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository)
uses: eclipse-score/cicd-workflows/.github/workflows/license-check.yml@c1c90b1a82a1fab0fc202979dde6686b2162d5a8 # v0.0.0
uses: eclipse-score/cicd-workflows/.github/workflows/license-check.yml@d2083d5dac0e309643d9f495e61342dfbaf07ed5 # v0.0.3-23-gd2083d5
with:
repo-url: "${{ github.server_url }}/${{ github.repository }}"
bazel-target: "run --lockfile_mode=error //:license-check"
Expand Down
65 changes: 38 additions & 27 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

load("@score_docs_as_code//:docs.bzl", "docs")
load("@score_format_checker//:macros.bzl", "use_format_targets")
load("@score_sbom//:defs.bzl", "sbom")
load("@score_tooling//:defs.bzl", "cli_helper", "copyright_checker", "dash_license_checker", "setup_starpls")
load("//:project_config.bzl", "PROJECT_CONFIG")

# Creates all documentation targets:
# - `:docs` for building documentation at build-time
Expand Down Expand Up @@ -60,34 +60,45 @@ copyright_checker(
visibility = ["//visibility:public"],
)

# Needed for Dash tool to check python dependency licenses.
# This is a workaround to filter out local packages from the Cargo.lock file.
# The tool is intended for third-party content.
genrule(
name = "filtered_cargo_lock",
srcs = ["Cargo.lock"],
outs = ["Cargo.lock.filtered"],
cmd = """
awk '
BEGIN { skip = 0; data = "" }
/^\\[\\[package\\]\\]/ {
if (data != "" && !skip) print data;
skip = 1;
data = $$0;
next;
}
data != "" { data = data "\\n" $$0 }
# any package that has a "source = " line will not be skipped.
/^source = / { skip = 0 }
END { if (data != "" && !skip) print data }
' $(location Cargo.lock) > $@
""",
dash_license_checker(
src = "//:Cargo.lock",
file_type = "cargo",
filter_keywords = ["github.com/eclipse-score/"],
visibility = ["//visibility:public"],
)

dash_license_checker(
Comment thread
PandaeDo marked this conversation as resolved.
src = ":filtered_cargo_lock",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no licence gate left for Rust. Licences now come from what publishers declare on crates.io, not from Dash/IP approval, and sbom-tool doesn't fail on any licence. Something still needs to gate this: Dash, or a policy check on the SBOM output.

@umaucher umaucher Oct 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"gate" is back (no more review needed with the filter and the updated Cargo.lock) the updated cicd-workflows/.github/workflows/license-check.yml workflow has a "workaround" for the missing secret so actually the dash tool is now really triggered (but no automatic review, only commend) ... ❗ the update only gets effective after merge so the current run still fails

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated Cargo.lock is much closer: down from ~40 version mismatches to 2 compared to what Bazel builds.

Crate: libc Cargo.lock: 0.2.189 Bazel: 0.2.186 (pinned exactly in score_crates for QNX 8)
Crate: lazy_static Cargo.lock: 1.5.0 Bazel: 1.5.1

Could you align these two? Otherwise Dash checks a libc version we don't ship. Regarding a "correct" Cargo.lock: score_crates v0.0.12 now ships its own Cargo.lock (score-crates #69), which could serve as the reference, although it covers all S-CORE crates, not only ours.

On "gate": the shared workflow (also the new d2083d5) never fails the job; the exit code only switches the comment between "Passed" and "Needs Review", and without a DASH token there is no IP-team review request. That's the same as on main, so no regression from this PR, but it's a report rather than a merge gate.

Where this should go long-term needs a broader discussion: eclipse-dash/dash-licenses#533. The Eclipse IP team is investigating a move to an Eclipse Apoapsis/ORT-based solution, with Dash/IPLab to be retired eventually over a deprecation period of years. Similarly, https://github.com/bazelbuild/rules_license (used in #432) states that active development has moved to https://github.com/bazel-contrib/supply-chain, and score_sbom doesn't consume rules_license providers yet. I'd suggest we take the gate question and the target toolchain (Dash → ORT, rules_license → supply-chain) to cicd-workflows / the tooling community, and keep this PR to the libc / lazy_static fix.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explicite synced versions in 08b3115

file_type = "", # let it auto-detect based on project_config
project_config = PROJECT_CONFIG,
# Generates the product SBOM (SPDX 2.3 + CycloneDX 1.6) for the KVS library.
# - Rust crate licenses/suppliers come from the crates.io API via
# auto_crates_cache (network access required at build time).
# - Build-time/test tooling is covered separately by //:sbom_docs_tests.
sbom(
name = "sbom_product",
component_name = "score_persistency",
module_lockfiles = [":MODULE.bazel.lock"],
targets = [
"//score/kvs:kvs_cpp",
"//score/kvs/rust_kvs:rust_kvs",
],
visibility = ["//visibility:public"],
)

# Qualification inventory for Python-based build and test tools. This is kept
# separate from the product SBOM because build-time dependencies are not
# product/runtime dependencies.
sbom(
name = "sbom_docs_tests",
testonly = True,
component_name = "score_persistency",
module_lockfiles = [":MODULE.bazel.lock"],
python_lockfiles = [
"//score/kvs/tests/test_cases:requirements.txt.lock",
"@score_docs_as_code//src:requirements_lock",
],
targets = [
"//:docs",
"//:unit_tests",
"//:cit_tests",
],
visibility = ["//visibility:public"],
)

Expand Down
Loading
Loading