Repository navigation
Add OctoSTS org trust policy for toolhive-doc-mcp refresh - #19
Conversation
The toolhive-doc-mcp refresh CronJob reads docs from toolhive, toolhive-studio, and toolhive-catalog. It exchanges an EKS service account token for a read-only GitHub App token. This replaces an expired PAT. Add a CODEOWNERS entry for .github/chainguard/. Org policies in this repo can mint tokens for any repo where stacklok-octosts is installed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Missing Issue LinkThis PR does not appear to reference a GitHub issue. |
|
Infra side: https://github.com/stacklok/infra/pull/5897 |
Summary
.github/chainguard/toolhive-doc-refresh.sts.yaml. This is the first org-level OctoSTS trust policy..github/chainguard/.The
toolhive-doc-mcprefresh CronJob reads docs from three public repos. It uses a token only for the GitHub API rate limit. The old classic PAT is expired, and every nightly refresh fails with401 Bad credentials. The CronJob now exchanges an EKS service account token for a GitHub App token.The policy allows exactly one subject,
system:serviceaccount:toolhive-doc-mcp:toolhive-doc-refresh. It accepts that subject only from the dev, staging, and production EKS OIDC issuers. The token coverstoolhive,toolhive-studio, andtoolhive-catalogwithcontents: readonly.The infra side is stacklok/infra (link in the first comment).
Prerequisites (org admin)
stacklok-octostsonstacklok/.github. OctoSTS reads org policies from this repo.stacklok-octostsontoolhive,toolhive-studio, andtoolhive-catalog. GitHub rejects the token request if the policy lists a repo outside the installation.Security note
With the app installed here, a policy in this repo can mint tokens for any repo where the app is installed. Those tokens can carry up to the app's own permissions. The
mainbranch protection requires a Code Owner review, so the new/.github/chainguard/entry makes@stacklok/maintainapproval mandatory for every policy change.Validation
octo-sts.stacklok.devand returnedunable to find trust policy. The issuer and audience checks pass today.issuer_patternmatches the staging issuer as a full anchored match.🤖 Generated with Claude Code