Skip to content

[2.1] ci: restore PR workflow hardening - #37470

Merged
pmbrull merged 1 commit into
2.1from
pmbrull/retire-safe-to-test-2.1-aligned
Nov 10, 2026
Merged

pmbrull merged 1 commit into
2.1from
pmbrull/retire-safe-to-test-2.1-aligned

Conversation

@pmbrull

@pmbrull pmbrull commented Nov 10, 2026

Copy link
Copy Markdown
Member

Describe your changes:

Replacement for the closed, unmerged #36403. Backports #35426 onto the current 2.1 release branch. Merge this before #35426, together with #35433 (2.0) and #35435 (1.13). No linked issue: the same CI hardening change, labelled skip-pr-checks.

Workflows that execute PR code use pull_request. The retired label gates and unsafe-checkout opt-ins are removed. Secret-backed steps and PR writes remain limited to same-repository, non-Dependabot PRs. Forks receive job summaries and annotations; deferred Collate work runs in merge groups.

The backport preserves current release versions, target-branch Python workflow context, and the team membership needed by PR Auto Assign.

Type of change:

  • Improvement

High-level design:

Applies the CI and documentation changes from main PR head a2ef71d9656 to 2.1 base 0dc8e8e09db. Follows the included ADR:2026-10-14-pr-code-never-runs-on-pull-request-target.

The old backport branch has diverged from the current release line. This replacement contains only 30 CI/documentation paths and leaves product and release-version files untouched. Team membership stays in .github/teams.yml; only its retired label allowlist is removed.

Latest-push approval is enabled in merge-rules. Keep that rule enabled when #35426 lands. Until then, old default-branch target workflows can overlap the new PR workflows.

Tests:

Use cases covered

  • Same-repository PRs retain secret-backed integrations and bot comments.
  • Fork and Dependabot PRs run checks without the retired label gate or privileged PR writes.
  • Manual type-generation dispatch rejects fork code before checkout.
  • Merge-group Collate and data-access checks preserve the accepted source behavior.

Unit tests

python -m pytest .github/scripts/tests/test_playwright_secret_redaction.py -q --tb=short: 7 passed.

Backend integration tests

Not applicable: no Java, schema, migration, or backend API changes.

Ingestion integration tests

Not applicable: no ingestion implementation changes.

Playwright (UI) tests

Not run: no UI implementation changes. Full GitHub and merge-group CI remain pending.

Manual testing performed

  1. Parsed all 19 changed workflows and confirmed they have no retired label gates, target triggers, or unsafe checkout opt-ins.
  2. Compared actionlint against current 2.1: 74 findings before and after, zero new findings after normalizing shifted script line numbers.
  3. node --check .github/scripts/render_playwright_summary.cjs, the decision-record checker, git diff --check, and commit hooks passed.
  4. Verified that the backport changes only CI/documentation paths and preserves current release versions and team membership.

UI screen recording:

Not applicable: CI configuration only.

Checklist:

Apply the current main rollout to the current 2.1 release line. Preserve release versions and PR owner team membership while removing the retired label gate.
@gitar-bot

gitar-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🔴 High risk · Reworks PR workflows to execute contributor code under new secret and write gates; a gating error could expose repository credentials or enable unintended PR writes.

Backports the PR workflow hardening from #35426 onto the 2.1 release branch, replacing pull_request_target usage with pull_request, removing retired label gates and unsafe checkout opt-ins, and limiting secret-backed steps to same-repository non-Dependabot PRs. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sonarqubecloud

Copy link
Copy Markdown

@pmbrull
pmbrull merged commit 95c7daf into 2.1 Nov 10, 2026
87 of 103 checks passed
@pmbrull
pmbrull deleted the pmbrull/retire-safe-to-test-2.1-aligned branch November 10, 2026 09:06
@pmbrull pmbrull mentioned this pull request Nov 10, 2026
7 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant