Skip to content

ci: trusted chain for DASH license check with fork gate - #423

Draft
umaucher wants to merge 4 commits into
mainfrom
um_ci_license_check
Draft

umaucher wants to merge 4 commits into
mainfrom
um_ci_license_check

Conversation

@umaucher

Copy link
Copy Markdown
Contributor

Implements the first slice of phase 2 of the CI concept (#420): the DASH license check moves to the trusted chain. Doc clarifications (trigger matrix, secrets inventory) are handled in #420.

Supersedes #422 (same commits, now from a repository branch so the new direct license-check path runs in this PR).

Changes

  • license_check.yml (which used the banned pull_request_target trigger for forks) is replaced by:
    • license_check_core.yml: reusable DASH check core with explicit head-SHA checkout for the fork path
    • trusted_chain_gate.yml: reusable approved-for-ci fork gate — label must be present and no synchronize/head_ref_force_pushed timeline event after it (any push invalidates); rejects skip with an explanatory PR comment instead of failing
    • license_check_forks.yml: thin workflow_run listener wiring gate + core for fork PRs only
  • on-pr.yml calls the core directly for repository PRs, merge_group and push (ADR 0001: two entry points, one core)

Notes for reviewers

  • No branch-protection changes in this PR; required-check promotion happens later per the promotion ladder.
  • Repo setting needed: restrict the approved-for-ci label to codeowners.
  • All action refs pinned to full SHAs; latest versions verified (checkout v7.0.1, setup-bazel 0.19.0, create-or-update-comment v5.0.0, bazelisk 1.29.0).
  • The fork-gate path cannot run from a PR branch (workflow_run listeners are read from the default branch only); it needs a live fork PR + label after merge. The direct path is exercised by this very PR.

Implement the first slice of the CI concept (phase 2): the DASH
license check moves to the trusted chain, removing the
pull_request_target trigger it used before for fork PRs.

Trusted jobs get two entry points (ADR 0001): a direct call from
on-pr.yml for repository PRs, merge group and pushes, and a thin
workflow_run listener for forks, gated by the approved-for-ci label.
The gate validates the label against the PR timeline so any push
after labelling invalidates it; rejected runs skip with an
explanatory PR comment instead of failing.
The DASH tool accepts runs without -token (anonymous access to the
public license databases) but rejects -token with an empty value.
Passing the flag unconditionally made the license check fail with a
usage error whenever the secret was not configured. The flag is now
only added when a token is present.
The DASH tool requires -review to be combined with a token; in
anonymous mode it is a usage error. Without a token the check now
runs against the public license data without -review, exiting 0 while
still reporting items needing review.
Match the upstream cicd-workflows behavior: the DASH tool exits
non-zero when content requires review, which is an expected outcome
and not a job failure. The step now captures the tool's output and
exit code, echoes both into the job summary, and succeeds; only a
genuine invocation error would still surface as a red job.

@janis-qorix janis-qorix left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please fix documentation build errors

@umaucher
umaucher marked this pull request as draft September 15, 2026 15:45
@umaucher

Copy link
Copy Markdown
Contributor Author

might get obsolete with eclipse-score/cicd-workflows#235

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants