Skip to content

Add octo-sts GitHub App #1319

Closed
Closed

Description

@pavelzw

When making PRs with GitHub Actions, those don't trigger the usual GitHub CI (https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/trigger-a-workflow#triggering-a-workflow-from-a-workflow). This can become very annoying if you want to have automated PRs (like lockfile updates, etc).
There are a couple of ways to ship around this limitation like long-lived PATs, SSH deploy keys or GitHub apps.

Octo-STS (by Chainguard) is another solution for this. They install a GitHub app that has write permissions into a repository/organization and let you define in your repository which repos/branches should have permission to access this repo (example: https://github.com/pavelzw/skill-forge/blob/main/.github/chainguard/write.sts.yaml only pavelzw/skill-forge branch main gets access). This octo-sts app can then hand out a short-lived token that gives out access to that specific resource through a real GitHub app.

I have been testing out https://github.com/octo-sts/app in personal repositories (example) and quite like it. See also their blog post

It's free and relatively easily self-hostable in case octo-sts decides to discontinue their offering.

I would like to have access to octo-sts on the repos that i usually work on:

  • conda/rattler (cc @baszalmstra)
  • conda-incubator/conda-mirror

i think it would be a great addition for other repositories as well, though. so maybe an org-wide installation might also be nice (it doesn't do anything if you don't actively configure it anyway).

WDYT @conda/infrastructure?

Activity

  1. baszalmstra commented on Apr 23, 2026

    @baszalmstra

    Speaking as conda/rattler maintainer I support this effort.

  2. jaimergp commented on May 19, 2026

    @jaimergp
    Member

    I'm in favor. @jezdez, @dbast, @chenghlee, @kenodegard, @beckermr, @danyeaw, thoughts?

  3. dbast commented on May 19, 2026

    @dbast
    Member

    The original issue, “GitHub Actions create/update PRs -> no further workflow runs are triggered” to avoid infinite loops, can afaik also be solved by https://autofix.ci/ for workflow-generated patch commits (or by pushing with dedicated bot PATs / GitHub App tokens).

    I agree that solving this and enabling safer automation would be a great addition to the org.

    That said, octo-sts seems more generic. It can issue short-lived GitHub credentials for broader use cases, including cross-repo automation and other GitHub API interactions.

    The two apps also have very different permission footprints:

    autofix.ci appears much narrower.

    Given the number of token-related leaks recently, security is imho the main topic here. If a GitHub App operator/private key is compromised, that becomes a supply-chain issue. Trust policies can restrict which branches/workflows receive tokens during normal operation, but they do not limit what a compromised app/private key can do. The hard boundary is the app’s installed GitHub permissions and selected repositories.

    For octo-sts, the blast radius is much larger because the app requests a broad permission superset, including contents:write, workflows:write, many repository write permissions, and some organization write permissions. With contents:write, release creation/upload/editing also appears possible because GitHub releases are covered by the Contents permission.

    So even if we only allow certain branches to get issued tokens, the installed app itself still has the approved permissions if compromised.

    So I think the question is: what is actually needed here?

    • If the goal is only “workflow produced a diff, commit it back and trigger CI”, autofix.ci may be sufficient and has a smaller permission footprint.
    • If we need general short-lived credentials for creating/updating PR branches, cross-repo automation, or broader GitHub API access, octo-sts may be the better primitive, but with a larger trust boundary.
    • If we use octo-sts, I’d strongly prefer selected-repo installation, narrowly scoped trust policies, branch/tag/release protections where possible, and explicit review/CODEOWNERS for .github/chainguard/*.sts.yaml.

    I don’t mind which one, or both, as long as we are clear about the required use case and keep the blast radius small.

  4. pavelzw commented on May 19, 2026

    @pavelzw
    MemberAuthor

    afaiu you cannot adjust the permissions for third-party apps, only for self-hosted ones which is a bit sad.
    theoretically one could also self-host octo-sts with narrower permissions but this would open the question where this would be hosted etc.
    cross-repo tokens could be interesting for things like https://github.com/mitchellh/vouch (which we are currently testing out in conda/rattler) but other than that i can't think of any immediate use cases where i would like more than "open a pr with some changes and let CI run through" within the conda{,-incubator} organizations. i personally would have a slight preference for octo-sts because i know and use it.

    briefly looking through autofix's source code, it seems that the action does not send a github token or app credential to https://autofix-api.maximilianhils.com/fix. it uploads an artifact into the current github actions run, then calls the backend with only repo identity plus PR number or branch name. https://github.com/autofix-ci/action/blob/c5b2d67aa2274e7b5a18224e8171550871fc7e4a/index.ts#L114-L136
    this whole behavior seems a bit hacky to me and much less elegant than octo-sts's id-token validation.

    octo-sts does proper id-token validation and verifies that the workflow properly triggered is actually authorized to do so (@ytausch and i did a code review of octo-sts a couple of weeks ago)

  5. dbast commented on May 21, 2026

    @dbast
    Member

    after thinking that through. My take on this:

    • The admins of the repos conda/rattler + conda-incubator/conda-mirror (there are dedicated admin teams that can be pinged) should make a decision together if they really want that given the context of this thread here
    • reason: If something really happens in the future the bigger duty is on the repo admin side to verify the content of the repo + releases are fine due to blast radius of things and what could have happened.
    • the infrastructure team (which I am a member of here) duty to fully disable an APP in case of APP breach is relatively easy, yet has to happen very timely.

    I am ok with activating octo-sts for the named repos, given the admins there agree and are aware.

  6. baszalmstra commented on May 21, 2026

    @baszalmstra

    I agree with this for conda/rattler , please enable it there!

  7. pavelzw commented on May 21, 2026

    @pavelzw
    MemberAuthor

    i agree with this for conda/rattler and conda-incubator/conda-mirror

  8. xhochy commented on May 21, 2026

    @xhochy

    I agree with this for conda-incubator/conda-mirror!

  9. jaimergp commented on May 27, 2026

    @jaimergp
    Member

    Thanks @dbast for the analysis. Sounds like enabling per-repo is a good compromise and the admins of the target repos are also ok with it, correct?

  10. pavelzw commented on Jun 3, 2026

    @pavelzw
    MemberAuthor

    just for future example reference: i just added octo-sts to rattler and conda-mirror: conda/rattler#2479 + conda-incubator/conda-mirror#167

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions