Skip to content

feat: add ci-tools-discover octo-sts trust policy#2

Open
ClayMav wants to merge 1 commit into
wherobots:mainfrom
ClayMav:feat/ci-tools-discover-policy
Open

feat: add ci-tools-discover octo-sts trust policy#2
ClayMav wants to merge 1 commit into
wherobots:mainfrom
ClayMav:feat/ci-tools-discover-policy

Conversation

@ClayMav
Copy link
Copy Markdown
Member

@ClayMav ClayMav commented May 28, 2026

Summary

Adds a second octo-sts trust policy alongside sync-templates.sts.yaml to support the discovery job that wherobots/ci-tools's sync-templates workflow is gaining (see wherobots/ci-tools#137).

The discover job needs an org-installation token (scope: wherobots) so it can list org repos and check each for a .ci-tools.yml marker file. octo-sts identities map 1:1 to policy filenames, so the existing per-repo write policy can't double for this read-only role — and reusing it would over-privilege the discover token (a leaked discover token could open PRs anywhere).

Policy shape

  • Same subject + job_workflow_ref pin as sync-templates.sts.yaml — only the ci-tools sync-templates workflow on main can mint.
  • Different permissions: metadata: read + contents: read only. No write.
  • File name = identity name = ci-tools-discover.

Test plan

  • Merge this PR.
  • Once merged, wherobots/ci-tools#137 can be merged and the sync-templates workflow's discover job will authenticate successfully.
  • Verify on next sync run that octo-sts/action@v1.0.3 with scope: wherobots + identity: ci-tools-discover returns a valid token. Action logs will show the OIDC exchange.

Related

  • wherobots/ci-tools#137 — calling workflow

The discover job in ci-tools' sync-templates workflow needs an org-scoped
token to list wherobots repos and check each for the `.ci-tools.yml`
marker file. octo-sts identities map 1:1 to policy filenames, so the
existing sync-templates policy (per-repo write) can't double for this
read-only discovery role.

Same subject + job_workflow_ref pin as sync-templates.sts.yaml.
Permissions reduced to metadata:read + contents:read.
@ClayMav ClayMav marked this pull request as ready for review May 28, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant