Skip to content

[Kernel OSS Readiness] Make fork CI credential-free - #497

Merged
rahuls-db merged 5 commits into
mainfrom
rahul-singhal_data/kernel-oss-fork-ci
Nov 23, 2026
Merged

rahuls-db merged 5 commits into
mainfrom
rahul-singhal_data/kernel-oss-fork-ci

Conversation

@rahuls-db

Copy link
Copy Markdown
Collaborator

Description

Prepare CI for external contributions without granting contributor-controlled build code an OIDC mint permission or repository secrets.

This adds an unauthenticated Databricks-filtered Cargo/PyPI proxy setup and uses it for public build, test, package, license, security, coverage, and debug-artifact checks. PyO3 fork PRs get a separate no-secret test matrix; same-repository runs retain the existing live warehouse matrix. Rust live E2E jobs are explicitly restricted to pushes and same-repository PRs. Bot and publishing workflows retain their existing authenticated setup and trust gates.

Testing

  • Parsed all 24 workflow and composite-action YAML files successfully
  • git diff --check
  • Databricks pre-commit, pre-push, and commit-message secret scanning
  • Previously verified Cargo and Python package resolution through the same anonymous Databricks-filtered proxy endpoints
  • Audited every pull_request workflow that retains id-token: write; remaining jobs are explicitly non-fork gated

Additional notes

Coverage uploads become anonymous/advisory so the coverage build job no longer needs OIDC. Repository settings may still require maintainer approval before a first-time external contributor's workflow starts.


This PR was created with GitHub MCP.

Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot 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.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 2 Medium · 2 Low

Mostly sound — 2 medium concerns, 2 low. The fork gating and the OIDC removal look right; the risks are required-check names on fork PRs and coverage uploads that can silently stop landing.

Comment thread .github/workflows/napi-checks.yml Resolved
Comment thread .github/workflows/coverage.yml Resolved
Comment thread .github/workflows/pyo3-checks.yml Resolved
Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot 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.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 Low · 2 Nit

Looks good, with 2 low concerns. No build job that runs fork code gets OIDC or secrets anymore. The coverage OIDC upload is split into its own job that only handles the reports, and the live E2E/PyO3 jobs only run for same-repository changes.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

Other findings

  • ⚪ Nit — CLAUDE.md credits the 7-day age filter to db-pypi, but fork PyO3 jobs now resolve through pypi-proxy.cloud.databricks.com, and that proxy's filtering isn't documented. Say whether the public proxy applies the same filter. (Found by Claude Opus 5.5 · confirmed by the judge)
  • ⚪ Nit — fork-build-and-test duplicates the build steps of build-and-test without the explanatory comments, and both report under the same check name, so edits to one can drift from the other. Add cross-reference comments, or factor out the shared steps. (Found by Claude Opus 5.5 · confirmed by the judge)

Comment thread .github/workflows/pyo3-checks.yml Resolved
Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>
@rahuls-db

Copy link
Copy Markdown
Collaborator Author

Addressed both review-body nits in 6f61bbb: CLAUDE.md now scopes the 7-day filter guarantee to authenticated db-pypi and explicitly avoids promising the same delay for the public proxy; the fork job now documents which trusted-job steps it mirrors and which secret/live-test pieces it intentionally omits.


This comment was generated with GitHub MCP.

@oss-reviewer-bot oss-reviewer-bot Bot 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.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 Medium · 2 Low

Mostly sound — 1 medium, 2 low. The OIDC permission is correctly split away from contributor-controlled code. It's unverified whether the protected runner group accepts fork jobs at all, and trusted builds now share the weaker public-proxy filtering.

Comment thread .github/workflows/napi-checks.yml Resolved
Comment thread .github/workflows/pyo3-checks.yml Resolved
Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot 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.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 2 Low · 1 Nit

Mostly sound, with 3 low concerns. Fork paths no longer get OIDC tokens or secrets, and the coverage upload now happens in a separate job that only handles generated reports. It's unverified whether the protected runner group accepts fork PRs at all.

Other findings

  • ⚪ Nit — The OIDC upload job grants pull-requests: write, but none of its steps use GITHUB_TOKEN to write to PRs: Codecov posts its comments through its own GitHub App. Drop it to keep the privileged job least-privilege. (Found by Claude Opus 5.5 · the judge couldn't confirm it)

jobs:
e2e:
name: "v0 E2E surface"
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Low — rust-e2e.yml still grants id-token: write workflow-wide. The e2e and tls jobs are gated off for forks, but any job added later would inherit OIDC mint on fork PRs. Set the workflow-level permissions to contents: read and grant id-token: write per job, as pyo3-checks.yml now does.

🔀 Found by Claude Opus 5.5 · confirmed by the judge

Comment thread .github/workflows/securityScan.yml Resolved

This branch was previously deployed

1 inactive deployment
azure-prod — f595d18d Deployed Nov 23, 2026 by rahuls-db via followup #4211
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants