Skip to content

ci: gate TA signing workflow against fork PRs#46

Open
NnnOooPppEee wants to merge 2 commits into
mainfrom
ORBS-1702/gate-signing-workflow-fork-prs
Open

ci: gate TA signing workflow against fork PRs#46
NnnOooPppEee wants to merge 2 commits into
mainfrom
ORBS-1702/gate-signing-workflow-fork-prs

Conversation

@NnnOooPppEee

Copy link
Copy Markdown

Summary

  • Add an explicit same-repo guard to the ta job in default.yaml so fork PRs cannot reach the id-token: write signing job.
  • Remove the Show OIDC claims (right before assume) debug step and the has AWS_ROLE secret? echo from the sign job in ta.yaml.

Why

HackerOne report #3718053 flags that the sign job holds id-token: write and compiles PR-controlled code (cargo x builds the checked-in x/ crate and any build.rs). It is not exploitable today because GitHub silently downgrades the fork GITHUB_TOKEN to read-only, so no OIDC token is issued on pull_request runs from forks. That protection is implicit and would break if the trigger changed to pull_request_target or the fork write-token setting were enabled. The gate makes the boundary explicit. The debug steps were trust-policy instrumentation that does not belong in a signing workflow.

Linear: ORBS-1702

Test plan

  • Same-repo PR: ta job runs as before.
  • Fork PR: ta job is skipped by the if guard.
  • workflow_dispatch: unaffected.

Add an explicit same-repo guard to the `ta` job so fork PRs cannot reach
the id-token: write signing job, instead of relying on GitHub's implicit
fork token downgrade. Remove the OIDC-claims and AWS_ROLE debug steps from
the sign job.

Refs ORBS-1702.

Copilot AI 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.

Pull request overview

This PR hardens the TA signing CI workflow by making the “same-repo only” boundary explicit for OIDC (id-token: write) usage, and by removing OIDC/AWS-secret diagnostic output from the signing workflow.

Changes:

  • Add a job-level if guard in default.yaml to skip the ta reusable-workflow job for fork-based pull_request events.
  • Remove OIDC-claims printing and AWS secret-presence echo steps from the sign job in ta.yaml.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/ta.yaml Removes OIDC/AWS debug steps from the signing job to reduce sensitive workflow instrumentation.
.github/workflows/default.yaml Adds an explicit same-repo gate so fork PRs can’t invoke the OIDC-enabled TA signing workflow job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/default.yaml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

3 participants