Skip to content

[security][ci] Restrict privileged GPU jobs to trusted branches - #2047

Open
bvolpato wants to merge 1 commit into
NovaSky-AI:mainfrom
bvolpato:bvolpato/secure-pr-target-secrets
Open

[security][ci] Restrict privileged GPU jobs to trusted branches#2047
bvolpato wants to merge 1 commit into
NovaSky-AI:mainfrom
bvolpato:bvolpato/secure-pr-target-secrets

Conversation

@bvolpato

@bvolpato bvolpato commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Run secret-bearing pull_request_target GPU jobs only for branches in this repository.
  • Skip generic remote GPU jobs for fork pull requests, where repository credentials are unavailable.
  • Keep push, manual dispatch, maintainer label, and draft gates unchanged.
  • Remove the unsafe fork-checkout override from all five privileged workflows.

Why

The labeled GPU workflows check out and execute the pull request head while exposing repository Anyscale and Hugging Face credentials. A maintainer-applied label limits execution, but an external fork still controls the submitted scripts, config, and remote test payload.

The generic GPU workflow is not privileged on fork pull requests because GitHub withholds secrets, but it still starts and fails before tests with invalid Anyscale credentials. Skipping that job makes the missing GPU signal explicit instead of reporting a code failure.

External contributions must be mirrored to a reviewed branch in this repository before privileged GPU validation. Unprivileged CPU checks continue through their existing workflows.

Validation

  • Parsed all changed workflows with yq.
  • actionlint 1.7.12
  • Event predicate truth tables covering push, manual dispatch, same-repo PRs, forks, drafts, and missing labels
  • Coverage scan: all five pull_request_target GPU workflows guarded; no unsafe checkout override remains
  • Generic fork GPU job resolves to skipped instead of submitting without credentials
  • git diff --check

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@bvolpato
bvolpato force-pushed the bvolpato/secure-pr-target-secrets branch from 708e5be to 0eb085d Compare August 16, 2026 15:42
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.

1 participant