Skip to content

ci: support OIDC workload federation for pin automation App mode - #40

Merged
jongio merged 2 commits into
mainfrom
jongio-pin-app-oidc
Dec 1, 2026
Merged

jongio merged 2 commits into
mainfrom
jongio-pin-app-oidc

Conversation

@jongio

@jongio jongio commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: b398ed94aaf10ced05932e1329f60ccf86d2f2dc

Dimension Assessment Rationale
Change confidence 9/10 ↑ Workflow contract tests (63/63), npm run lint, catalog/pin checks, and actionlint all pass.
↑ Verified actions/create-github-app-token@v3.4.0-beta falls back to GitHub Actions OIDC when private-key is empty.
↓ Temporary v3.4.0-beta pin lacks v3.4.0's undici 6.29.1 bump (only OIDC-capable upstream release; documented in workflows for GA upgrade).
↓ Live GitHub Actions OIDC token exchange against the App workload federation policy has not yet been observed in a real release run.

Summary

Enable keyless GitHub Actions OIDC (workload federation) for zero-touch pin automation App mode so github/plugin-marketplace-starter does not need to store a long-lived PIN_APP_PRIVATE_KEY secret:

  • Update actions/create-github-app-token in .github/workflows/update-pins.yml and .github/workflows/complete-pin-validation.yml to 305e4aec4e2000ce216527e282f0749f47637923 (v3.4.0-beta), the only OIDC-capable upstream release today (tracked inline to upgrade to GA once OIDC ships on main with v3.4.0's undici 6.29.1 bump), while keeping optional PIN_APP_PRIVATE_KEY support.
  • Grant id-token: write to update-pins.yml and complete-pin-validation.yml (both default-branch-only and scoped to environment: pin-automation); validate.yml remains read-only without id-token: write.
  • Update workflow contract tests and App-mode documentation in docs/checks-and-evals.md and plugins/marketplace-maintainer/skills/update-remote-pins/references/remote-pins.md (including the private org-owned App prerequisite for OIDC).

Validation

  • node --test .github/scripts/update-pins.test.mjs .github/scripts/pin-validation.test.mjs — passed (63/63)
  • npm run lint — passed (6/6 skills, 7/7 evals)
  • node .github/scripts/check-local-catalog.mjs — passed
  • node .github/scripts/check-remote-pins.mjs — passed
  • actionlint .github/workflows/update-pins.yml .github/workflows/complete-pin-validation.yml — passed (exit 0)
  • git diff --check — passed

Pin actions/create-github-app-token to v3.4.0-beta and grant id-token: write
to update-pins.yml and complete-pin-validation.yml so App mode can mint
installation tokens via GitHub Actions OIDC without storing PIN_APP_PRIVATE_KEY.
Retains optional PIN_APP_PRIVATE_KEY fallback when the secret is configured.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jongio
jongio requested a review from a team as a code owner December 1, 2026 22:05
Copilot AI adaptive review requested due to automatic review settings December 1, 2026 22:05
@jongio
jongio requested a review from wbreza December 1, 2026 22:07
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Evals: ✅ Ship (passed)

Skill Verdict Why
update-remote-pins ✅ Ship Reduced token usage at parity · score 1.00 → 1.00 (0.00) · -21.6% output tokens (-815) · -17.3% duration
📊 Telemetry, token deltas & run evidence

Selection: Native eval paths or tags

Run: passed - 3 trials - Evidence

Baseline: passed - 3 trials - Evidence

Eval Trials Result
update-remote-pins 3 passed

Quality & token summary

Eval Model Verdict Score Turns Duration Tokens
update-remote-pins claude-haiku-5.5 passed 1.00 (threshold 1.00) 10 23469ms 228916 tokens (225964 in / 2952 out)

Baseline vs. Candidate comparison

Metric Baseline Candidate Delta
Outcome passed passed (✅ Ship) unchanged
Passed 1 1 0
Failed 0 0 0
Turns 11 10 -1
Duration 28372ms 23469ms -4903ms (-17.3%)
Tokens 260707 tokens (256940 in / 3767 out) 228916 tokens (225964 in / 2952 out) -31791 tokens (-12.2%; out: -815 / -21.6%)
Eval Baseline Candidate Score Delta Turns Delta Duration Delta Token Delta Transition
update-remote-pins passed (1.00) passed (1.00) 0.00 -1 -4903ms (-17.3%) -31791 tokens (-12.2%; out: -815 / -21.6%) reduced-tokens

Exact revision | Workflow run

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.

🟡 Changes recommended

The beta App-token action pin reintroduces an unpatched undici dependency in both workflows, and the OIDC documentation omits required App ownership and visibility restrictions.

2 open issues
What changed in this PR

Adds GitHub Actions OIDC workload federation to the marketplace’s pin-automation App mode, allowing authentication without a stored private key.

Changes:

  • Pins both automation workflows to an OIDC-capable token action while preserving private-key support.
  • Adds OIDC permissions and updates contract tests, including a read-only permission check for Validate.
  • Documents federated App authentication in the setup guide and plugin reference.
File Description
plugins/​marketplace-maintainer/​skills/​update-remote-pins/​references/​remote-pins.md Documents workload federation as an App authentication option.
docs/​checks-and-evals.md Expands App-mode setup and authentication guidance.
.github/​workflows/​update-pins.yml Enables OIDC permission and pins the token action to v3.4.0-beta.
.github/​workflows/​complete-pin-validation.yml Enables the same authentication support for completion jobs.
.github/​scripts/​update-pins.test.mjs Updates permission and environment contract expectations.
.github/​scripts/​pin-validation.test.mjs Checks completion permissions and keeps Validate read-only.

Review effort: Max (adaptive)

Comment thread .github/workflows/update-pins.yml Resolved
Comment thread docs/checks-and-evals.md Resolved
Document that OIDC workload federation requires a private App owned by the
repository's organization (with PIN_APP_PRIVATE_KEY retained for public or
externally owned Apps), and note the temporary v3.4.0-beta pin in both
workflows until OIDC ships in a stable release.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jongio

jongio commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

Addressed review 6141121409 in b398ed9:

  • concern:91f6469f0e975e9e (Use an OIDC-capable revision with the undici security fix): v3.4.0-beta is the only OIDC-capable upstream release today; documented the temporary pin and missing undici 6.29.1 bump inline in both workflows for upgrade once OIDC ships in GA.
  • concern:6621ac08f7be758d (Document OIDC eligibility limits and retain the private-key alternative): stated the private org-owned App prerequisite and retained PIN_APP_PRIVATE_KEY in docs/checks-and-evals.md and remote-pins.md.
  • concern:8d9320048a2fe048: overview summary of the two resolved findings above.

Disposition for review 6141402177:

  • concern:7daac5351b4f7d9c / concern:092b4fd2a0fa1479 (Assert vetted OIDC-capable App action revision in tests): declined intentionally — matching /^actions\/create-github-app-token@[0-9a-f]{40}$/ follows this repo's existing action-pin test convention (e.g. .github/scripts/update-pins.test.mjs:962 for actions/checkout) so routine upgrades from the temporary v3.4.0-beta SHA to GA do not break unit tests, while id-token: write and client-id remain asserted in .github/scripts/update-pins.test.mjs:913 and .github/scripts/pin-validation.test.mjs:614.

@wbreza wbreza 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.

LGTM — OIDC permission scoping, workflow isolation, contract tests, and documentation all check out cleanly:

  • id-token: write is limited to the two default-branch-only workflows running in environment: pin-automation (update-pins.yml and complete-pin-validation.yml), while validate.yml stays strictly contents: read (now asserted in pin-validation.test.mjs).
  • Verified actions/create-github-app-token@305e4aec4e2000ce216527e282f0749f47637923 (v3.4.0-beta) falls back to GitHub Actions OIDC when private-key is empty while preserving PIN_APP_PRIVATE_KEY when set. Although v3.4.0-beta predates actions/create-github-app-token#406 (undici 6.29.1), @octokit/request uses Node 24's native fetch and @actions/http-client only calls the runner's internal ACTIONS_ID_TOKEN_REQUEST_URL endpoint without custom Agent options; the temporary beta pin and follow-up upgrade are clearly documented inline.
  • docs/checks-and-evals.md and plugins/marketplace-maintainer/skills/update-remote-pins/references/remote-pins.md accurately note that GitHub App OIDC requires a private App owned by the repository's organization (retaining PIN_APP_PRIVATE_KEY for public or externally owned Apps). (Non-blocking setup note: since both jobs specify environment: pin-automation, the default OIDC sub claim resolves to repo:<owner>/<repo>:environment:pin-automation, so branch/event restrictions rely on pin-automation's branch policy and/or explicit ref/event_name claim conditions in the App's federation policy.)

@jongio
jongio requested an adaptive review from Copilot and removed request for Copilot December 1, 2026 22:28

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.

🔵 Needs a closer look

The App-action pin assertions accept any 40-character SHA, allowing a regression to a private-key-only revision to pass tests despite breaking App mode without PIN_APP_PRIVATE_KEY.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Assert vetted OIDC-capable App action revision in tests

.github/​scripts/​update-pins.test.mjs:913

Both App-action assertions accept any 40-character SHA, so reverting either workflow to the previous private-key-only revision would pass these tests but break App mode without PIN_APP_PRIVATE_KEY. Add a regression check for the vetted OIDC-capable revision in both workflows; the same gap is in .github/scripts/pin-validation.test.mjs:630.

2 resolved since last review

Review effort: Max (adaptive)

@jongio
jongio merged commit f07f89c into main Dec 1, 2026
12 of 13 checks passed
@jongio
jongio deleted the jongio-pin-app-oidc branch December 1, 2026 22:37
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