Skip to content

chore: add GitHub STS trust policy for Slack config rotation - #77

Merged
sds merged 1 commit into
mainfrom
sts-slack-config-policy
Aug 21, 2026
Merged

chore: add GitHub STS trust policy for Slack config rotation#77
sds merged 1 commit into
mainfrom
sts-slack-config-policy

Conversation

@sds

@sds sds commented Aug 21, 2026

Copy link
Copy Markdown
Member

Adds .github/sts/slack-config.sts.yaml, a github-sts trust policy that lets this repository's own workflows mint a short-lived token with secrets: write on this repository. The setup-slack-config-token action needs that to persist the rotated SLACK_CONFIG_REFRESH_TOKEN after calling Slack's tooling.tokens.rotate, which invalidates the previous refresh token.

Subjects cover refs/heads/main (production deploy, scheduled preview sweep) and pull_request (preview deploy/destroy) — the same runs that use the SLACK_GH_TOKEN fine-grained PAT today.

Policy only; a follow-up PR will switch the workflows to tempoxyz/gh-actions/actions/github-sts and retire SLACK_GH_TOKEN.

@sds
sds force-pushed the sts-slack-config-policy branch from f0bb0a5 to 46b53c9 Compare August 21, 2026 06:00
@sds
sds merged commit d926c9f into main Aug 21, 2026
8 checks passed
@sds
sds deleted the sts-slack-config-policy branch August 21, 2026 06:04
sds added a commit that referenced this pull request Aug 21, 2026
Switches `setup-slack-config-token` from the `SLACK_GH_TOKEN`
fine-grained PAT to a short-lived token minted through
[github-sts](https://github.com/tempoxyz/github-sts) via
`tempoxyz/gh-actions/actions/github-sts`, authorized by the
`slack-config` trust policy added in #77.

- The composite action now mints the GitHub token itself (only when
rotation is actually needed, i.e. no access token was passed in), so the
four calling workflows just drop the `github-token` input and gain
`id-token: write`.
- `SLACK_GH_TOKEN` plumbing is removed from `pull_request.yml` and the
`preview_deploy.yml` `workflow_call` contract.
- The minted token is scoped to this repo with `secrets: write`, and the
STS action revokes it when the job completes.

After merge, the `SLACK_GH_TOKEN` repository secret can be deleted and
the PAT revoked.
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.

1 participant