Skip to content

ci: replace the add-to-project PAT with a GitHub App token (#663) - #664

Open
Nicolas Carenton (ncarenton) wants to merge 1 commit into
mainfrom
ci/add-to-project-github-app
Open

Nicolas Carenton (ncarenton) wants to merge 1 commit into
mainfrom
ci/add-to-project-github-app

Conversation

@ncarenton

@ncarenton Nicolas Carenton (ncarenton) commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Proposed changes

  • Replace the ADD_TO_PROJECT_PAT personal access token with a short-lived GitHub App installation token, created by actions/create-github-app-token and limited to organization projects (permission-organization-projects: write).
  • Read the project URL from the shared XTM_INTEGRATIONS_PROJECT_URL organization variable instead of the per-repository PROJECT_URL variable.
  • Pin actions/add-to-project to a commit SHA and set permissions: {}: the job does not use GITHUB_TOKEN.

Testing Instructions

  1. The ADD_TO_PROJECT_APP_ID variable and the ADD_TO_PROJECT_APP_PRIVATE_KEY secret are already set on this repository.
  2. issues and pull_request_target run the workflow from the default branch, so this PR cannot test itself: after the merge, open a test issue and check that the workflow succeeds and the issue lands on the project.
  3. Then delete the ADD_TO_PROJECT_PAT secret and the PROJECT_URL variable.

Related issues

Checklist

  • I consider the submitted work as finished
  • I have signed my commits using GPG key.
  • I tested the code for its functionality (only possible after the merge, see above)

Further comments

🤖 Generated with Claude Code

@ncarenton Nicolas Carenton (ncarenton) added filigran team Item from the Filigran team. vibe-coded PR: AI-assisted change — the author reviews it before requesting others' review. labels Nov 6, 2026
Copilot AI balanced review requested due to automatic review settings November 6, 2026 11:02
@ncarenton Nicolas Carenton (ncarenton) added the vibe-coded PR: AI-assisted change — the author reviews it before requesting others' review. label Nov 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The FiligranHQ GitHub App’s installation and project permissions cannot be verified from the diff, so issue/PR project additions need post-merge validation before removing the PAT secret.

No open issues 🎉

What changed in this PR

Replaces the add-to-project workflow’s personal access token with a short-lived GitHub App installation token, addressing #663 and removing reliance on a person-owned credential.

Changes:

  • Generates a FiligranHQ App token with organization-project write permission.
  • Pins both actions to commit SHAs and disables GITHUB_TOKEN permissions.
  • Passes the generated token to the existing project-addition step.

Functionality still needs post-merge verification before deleting the old PAT secret.

File Description
.github/​workflows/​integrations-add-to-project.yml Switches project automation to a scoped GitHub App token and pins action versions.

Review effort: Balanced

GITHUB_TOKEN cannot write to an organization project. Instead of a
personal access token, create a short-lived GitHub App installation
token, limited to organization projects. Read the project URL from the
shared XTM_INTEGRATIONS_PROJECT_URL organization variable instead of
the per-repository PROJECT_URL. Pin add-to-project to a commit SHA and
drop the default GITHUB_TOKEN permissions, which the job does not use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team Item from the Filigran team. vibe-coded PR: AI-assisted change — the author reviews it before requesting others' review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: replace the add-to-project PAT with a GitHub App token

2 participants