Skip to content

fix(ci): acknowledge submodule PRs with a source-scoped GitHub App token - #131

Merged
vitormattos merged 1 commit into
mainfrom
fix/submodule-source-feedback-scoped-app-token-20261122
Nov 22, 2026
Merged

vitormattos merged 1 commit into
mainfrom
fix/submodule-source-feedback-scoped-app-token-20261122

Conversation

@vitormattos

Copy link
Copy Markdown
Member

Problem

The /libresign-pr workflow successfully creates a cryptographically verified, DCO-signed destination PR, but then fails at the optional final acknowledgment step on the source repository.

  • LibreSign/3rdparty workflow run #45041553618 created LibreSign PR #9635, then failed with HTTP 403 Resource not accessible by integration while using GH_TOKEN: ${{ github.token }}.
  • The job log claims Issues: write, so changing from GraphQL to REST alone did not resolve the access restriction.
  • The already deployed /composer-update workflow uses a short-lived, source-scoped GitHub App token to post feedback successfully.

Change

  1. Preserve mandatory cryptographic verification and nonempty URL checks in a separate Verify signed destination step.
  2. Acquire a short-lived source-repository GitHub App token with only permission-issues: write, using trusted GitHub repository context.
  3. Post the linked destination PR using that token, and make only the optional notification best-effort. A feedback outage must not turn an already verified destination PR creation into a false failed run.
  4. Preserve the upstream template's patch-based provenance with only the affected hunk modified. Add regression assertions for the scoped token and step ordering.

No token, private key, or additional repository-wide permissions are committed.

Validation

  • python3 -m unittest discover -s tests -p 'test_*.py': 124 tests passed.
  • python3 scripts/render_upstream.py check upstream/templates.json: passed.
  • actionlint workflow-templates/command-submodule-pr.yml: passed.
  • git diff --check: passed.
  • Commit cryptographically verified and DCO matches author.

CI actionlint, zizmor, Python tests, policy and DCO must all pass before merging. After integration, synchronize the consumer workflow into LibreSign/3rdparty and verify on a subsequent real command.

The source workflow has an Issues:write GITHUB_TOKEN but GitHub returns
HTTP 403 when posting the linked-PR acknowledgment. Keep signed target
verification mandatory and make the feedback best-effort using a short-lived
source-repository GitHub App token, without broadening destination access.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos merged commit 11be2d5 into main Nov 22, 2026
5 checks passed
@vitormattos
vitormattos deleted the fix/submodule-source-feedback-scoped-app-token-20261122 branch November 22, 2026 16:09
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