Skip to content

ci: gate TA signing workflow against fork PRs - #46

Merged
BulatAbuzarov merged 4 commits into
mainfrom
ORBS-1702/gate-signing-workflow-fork-prs
Sep 22, 2026
Merged

BulatAbuzarov merged 4 commits into
mainfrom
ORBS-1702/gate-signing-workflow-fork-prs

Conversation

@NnnOooPppEee

@NnnOooPppEee NnnOooPppEee commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Gate the TA signing workflow to same-repository PRs, including any future pull_request_target trigger, while preserving manual runs.
  • Remove OIDC-claims and AWS-role-secret diagnostic output from the signing job.
  • Correct the Cachix condition so the signing job uses it only in staging, as intended.
  • Update the OP-TEE workspace's anyhow minimum and lockfile to 1.0.103 to clear RUSTSEC-2026-0190.

Why

HackerOne report #3718053 identified PR-controlled code execution inside the OIDC-enabled signing job. The original assessment found that GitHub's fork-token restrictions blocked the reported path. The explicit guard skips ordinary fork runs and covers both pull_request and pull_request_target event names.

GitHub's fork-token restrictions remain required: pull_request loads PR-controlled workflow definitions, so a fork can edit this guard. It is defense in depth, not an independent authorization boundary. Changes to triggers or fork privileges require a separate review of the trusted signing entrypoint and AWS trust policy.

Linear: ORBS-1702

Test plan

  • Actionlint validates both changed workflows.
  • GitHub Actions expression evaluator: same-repository PRs and manual dispatch allowed; fork PRs and missing PR head metadata rejected, including pull_request_target (7 cases).
  • GitHub Actions expression evaluator: Cachix enabled for stage and disabled for prod (2 cases).
  • Locked OP-TEE dependency resolution and host compilation of the patched anyhow dependency.
  • git diff --check.
  • GitHub CI on 1c9e089: all 17 checks pass, including TA build, stage signing, packaging, and Cargo Deny.

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
Contributor

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
Contributor

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
BulatAbuzarov and others added 2 commits July 8, 2026 09:41
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 4 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/default.yaml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 4 changed files in this pull request and generated no new comments.

@BulatAbuzarov
BulatAbuzarov merged commit 31ff0d6 into main Sep 22, 2026
22 checks passed
@BulatAbuzarov
BulatAbuzarov deleted the ORBS-1702/gate-signing-workflow-fork-prs branch September 22, 2026 09:34

This branch was successfully deployed

1 active deployment
stage — 1c9e0898 Deployed Sep 11, 2026 by NnnOooPppEee via TA / Sign (stage) #79
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