Skip to content

fix(license): restore //:license-check target - #425

Draft
clanghans wants to merge 3 commits into
eclipse-score:mainfrom
etas-contrib:fix/license-check-target
Draft

clanghans wants to merge 3 commits into
eclipse-score:mainfrom
etas-contrib:fix/license-check-target

Conversation

@clanghans

Copy link
Copy Markdown
Contributor

Bugfix

Note

Stacked on #424 — please review/merge that first. Only the last commit (fix(license): restore //:license-check target) belongs to this PR.

Description

The CI job License check preparation runs bazel run --lockfile_mode=error //:license-check, but that target does not exist:

ERROR: no such target '//:license-check': target 'license-check' not declared in package ''
ERROR: Build failed. Not running target

The dash_license_checker target was dropped from the root BUILD in c3e4df4 ("Contribution proposal by ETAS (#1)", 2026-05-22). The shared workflow does not fail the step on errors, so the job has been green without checking anything for ~6 months.

Change

  • BUILD: restore dash_license_checker from @score_tooling (already a dependency), checking the Rust third-party crates in //score/cryptoki:Cargo.lock (file_type = "cargo"). The macro can only be instantiated once per package, and the Rust crates are the shipped third-party code; with project_config auto-detection it would pick requirements (python wins) and check docs tooling instead.
  • score/cryptoki/BUILD: exports_files(["Cargo.lock"]), visible to //:__pkg__ only.
  • No MODULE.bazel(.lock) changes; --lockfile_mode=error passes.

Local result (bazel run --lockfile_mode=error //:license-check -- -project automotive.score -repo …, no DASH token): target builds and runs in ~21 s; 154 crates checked, 148 approved, 6 restricted (exit code 6):

Crate Note
parsec-client 0.16.0 no license data in ClearlyDefined
parsec-interface 0.29.1 no license data in ClearlyDefined
psa-crypto 0.12.0 no license data in ClearlyDefined
psa-crypto-sys 0.12.0 no license data in ClearlyDefined
shlex 2.0.1 ClearlyDefined: MIT OR Apache-2.0 – likely mapping issue
vcpkg 0.2.15 ClearlyDefined: MIT OR Apache-2.0 – likely mapping issue

So the CI comment will show "⚠️ Needs Review" until these are reviewed by the IP team (CI passes -review with the DASH token).

Because license_check.yml runs on pull_request_target, the result is only visible in the merge queue / after merge.

Follow-ups (not in this PR)

  • Python dependencies (requirements.txt) are not covered; would need a second dash_license_checker in another package.
  • cicd-workflows license-check.yml should fail on Bazel errors (e.g. a missing target) instead of reporting success.

Related ticket

closes [ISSUE-NUMBER] (bugfix ticket)

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: ef212411-5aed-4abd-878a-339c614856e6
Computing main repo mapping: 
Computing main repo mapping: 
DEBUG: Rule 'abseil-cpp+' indicated that a canonical reproducible form can be obtained by modifying arguments integrity = "sha256-m3oGQwXp/ZTRJP+mzDWFkutCtdpYj7TgfQklSqQAhts="
DEBUG: Repository abseil-cpp+ instantiated at:
  <builtin>: in <toplevel>
Repository rule http_archive defined at:
  /home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/http.bzl:431:31: in <toplevel>
Computing main repo mapping: 
DEBUG: Rule 'protobuf+' indicated that a canonical reproducible form can be obtained by modifying arguments integrity = "sha256-w6Cp7OiTLjHDtzbi2xixxC5wcM2biBOIsm0BqnHiTKI="
DEBUG: Repository protobuf+ instantiated at:
  <builtin>: in <toplevel>
Repository rule http_archive defined at:
  /home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/http.bzl:431:31: in <toplevel>
Computing main repo mapping: 
DEBUG: Rule 'grpc+' indicated that a canonical reproducible form can be obtained by modifying arguments integrity = "sha256-CvN7gAlTEwtHwHW1ZoPuYL3D7aPDf8YAQZP1tWl1ggQ="
DEBUG: Repository grpc+ instantiated at:
  <builtin>: in <toplevel>
Repository rule http_archive defined at:
  /home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/http.bzl:431:31: in <toplevel>
Computing main repo mapping: 
WARNING: For repository 'score_bazel_platforms', the root module requires module version score_bazel_platforms@0.1.2, but got score_bazel_platforms@1.1.0 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'rules_cc', the root module requires module version rules_cc@0.2.22, but got rules_cc@0.2.25 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'flatbuffers', the root module requires module version flatbuffers@25.12.19, but got flatbuffers@25.12.19.bcr.1 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'score_process_description', the root module requires module version score_process_description@2.2.2, but got score_process_description@2.2.4 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Computing main repo mapping: 
Loading: 
Loading: 1 packages loaded
Loading: 1 packages loaded
    currently loading: 
Loading: 1 packages loaded
    currently loading: 
Loading: 1 packages loaded
    currently loading: 
Loading: 1 packages loaded
    currently loading: 
Analyzing: target //:license-check (2 packages loaded, 0 targets configured)
Analyzing: target //:license-check (2 packages loaded, 0 targets configured)

Analyzing: target //:license-check (44 packages loaded, 10 targets configured)

Analyzing: target //:license-check (97 packages loaded, 10 targets configured)

Analyzing: target //:license-check (100 packages loaded, 10 targets configured)

Analyzing: target //:license-check (100 packages loaded, 10 targets configured)

Analyzing: target //:license-check (156 packages loaded, 1081 targets configured)

Analyzing: target //:license-check (161 packages loaded, 3567 targets configured)

Analyzing: target //:license-check (161 packages loaded, 3567 targets configured)

Analyzing: target //:license-check (161 packages loaded, 3567 targets configured)

Analyzing: target //:license-check (171 packages loaded, 6854 targets configured)

Analyzing: target //:license-check (176 packages loaded, 7120 targets configured)

Analyzing: target //:license-check (183 packages loaded, 7175 targets configured)

Analyzing: target //:license-check (184 packages loaded, 10821 targets configured)

Analyzing: target //:license-check (188 packages loaded, 12838 targets configured)

Analyzing: target //:license-check (188 packages loaded, 12838 targets configured)

INFO: Analyzed target //:license-check (189 packages loaded, 12966 targets configured).
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 155 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
[11 / 14] [Prepa] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath_unstripped.jar
[12 / 14] Extracting interfaces from external/rules_java+/toolchains/platformclasspath_unstripped.jar; 0s disk-cache, processwrapper-sandbox
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 49.435s, Critical Path: 2.96s
INFO: 14 processes: 9 internal, 4 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 14 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-425: https://eclipse-score.github.io/inc_security_crypto/pr-425/

- on-pr.yml: on-pr/v0.0.0 -> v0.0.3 (inputs skip-pre-commit and
  skip-bzlmod-lock exist in v0.0.3)
- daily/docs/docs-publish/license_check: commit hash of v0.0.3 -> v0.0.3

tests.yml and qnx-build.yml stay on 2396c21: it is 54 commits newer
than v0.0.3, and v0.0.3 lacks the fetch-attempts/fetch-retry-delay
inputs used by test_qnx.yml. A new release was requested in
eclipse-score/cicd-workflows#297; marked with a TODO.

Signed-off-by: Chris Langhans <chris.langhans@etas.com>
Scheduled Daily Maintenance runs end in startup_failure: the caller
only grants contents/pages/id-token, but the reusable workflow's
stale-prs job requests issues: write and pull-requests: write. Called
workflows cannot escalate beyond the caller's grants.

Signed-off-by: Chris Langhans <chris.langhans@etas.com>
The dash_license_checker target was removed from the root BUILD in
c3e4df4 ("Contribution proposal by ETAS (#1)"). The CI job
"License check preparation" still runs
`bazel run --lockfile_mode=error //:license-check`, which now fails
with "target 'license-check' not found". The shared workflow does not
fail the step on that error, so no license check has run since.

Restore the target using @score_tooling's dash_license_checker with
file_type = "cargo" and src = //score/cryptoki:Cargo.lock. The shipped
product's third-party code is the Rust crates; the macro can only be
instantiated once per package, so the Python docs tooling
(//:requirements.txt) is not covered by this target.

Expose score/cryptoki/Cargo.lock to //:__pkg__ via exports_files so the
root package can read it.

Signed-off-by: Chris Langhans <chris.langhans@etas.com>

This branch is waiting to be deployed

1 waiting deployment
workflow-approval — 8251153e Waiting Nov 16, 2026 by clanghans via Build and Test aarch64-qnx / approval #1055
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant