Skip to content

e2e tests cannot access secrets for PRs from forked repositories #793

@gjkim42

Description

@gjkim42

What happened?

PR #784 (from a forked repository) cannot run test-e2e CI job because GitHub Actions does not expose repository secrets to pull_request events from forks. Even with the ok-to-test label applied, the secrets (CLAUDE_CODE_OAUTH_TOKEN, CODEX_AUTH_JSON) are empty, causing the e2e tests to fail.

This is a GitHub Actions security restriction — pull_request events from forks never receive secrets regardless of labels or branch protection settings.

What did you expect to happen?

When a maintainer adds the ok-to-test label to a fork PR, the e2e tests should be able to run with the required secrets.

How to reproduce?

  1. Receive a PR from a forked repository (e.g. feat: add bedrock credential type for AWS Bedrock authentication #784)
  2. Add the ok-to-test label
  3. Observe that test-e2e job fails due to missing secrets

Possible approach

Switch the e2e trigger from pull_request to pull_request_target, which runs in the base repository's context and has access to secrets. The existing ok-to-test label gate ensures a maintainer has reviewed the code before secrets are exposed.

/kind bug

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions