File tree Expand file tree Collapse file tree
actions/setup-git-committer Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636 app-id : ${{ inputs['kilo-maintainer-app-id'] }}
3737 private-key : ${{ inputs['kilo-maintainer-app-secret'] }}
3838 owner : ${{ github.repository_owner }}
39+ # Scope the minted installation token to the current repo
40+ # only, even when the kilo-maintainer App is installed on
41+ # multiple repos in the org. Without this, the token would
42+ # carry the App's full installation scope (e.g. both
43+ # shell-security and kilocode) and a compromised workflow
44+ # could push to unrelated repos.
45+ repositories : ${{ github.event.repository.name }}
3946
4047 - name : Configure git user
4148 shell : bash
Original file line number Diff line number Diff line change @@ -34,9 +34,16 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.channel }}-${{
3434# id-token:write is required for npm provenance (SLSA attestation).
3535# This workflow must run on GitHub-hosted runners (not Blacksmith) for
3636# provenance to work — GitHub's OIDC token is only issued on their infra.
37+ #
38+ # contents: read is sufficient. Post-publish pushes to `main` are
39+ # authenticated by the kilo-maintainer App token (minted by the
40+ # setup-git-committer composite action), not by GITHUB_TOKEN. If a
41+ # future edit accidentally introduces a git/gh call that falls back
42+ # to GITHUB_TOKEN for a write, we want it to fail loudly here rather
43+ # than silently succeed with broader privilege.
3744permissions :
3845 id-token : write
39- contents : write
46+ contents : read
4047
4148jobs :
4249 publish :
You can’t perform that action at this time.
0 commit comments