Skip to content

ci: actions/create-github-app-token -> v3 - #8240

Open
matthewelwell wants to merge 1 commit into
mainfrom
ci/fix-api-fix-docs-artefacts-workflow-action-version
Open

ci: actions/create-github-app-token -> v3#8240
matthewelwell wants to merge 1 commit into
mainfrom
ci/fix-api-fix-docs-artefacts-workflow-action-version

Conversation

@matthewelwell

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Updates actions/create-github-app-token to v3 to resolve current failures in our CI workflows based on Node 20 usage.

How did you test this code?

CI against this PR should prove if it's successful or not.

@matthewelwell
matthewelwell requested a review from a team as a code owner August 7, 2026 09:45
@matthewelwell
matthewelwell requested review from bakirFS and removed request for a team August 7, 2026 09:45
@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Aug 7, 2026 9:45am
flagsmith-frontend-preview Ignored Ignored Aug 7, 2026 9:45am
flagsmith-frontend-staging Ignored Ignored Aug 7, 2026 9:45am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The workflow updates actions/create-github-app-token from v1 to v3. It replaces the app-id input with client-id. The private key input and token usage remain unchanged.

Estimated code review effort: 1 (Trivial) | ~2 minutes


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the ci-cd Build, test and deployment related label Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-8240 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-8240 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-8240 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-8240 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-8240 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-8240 Finished ✅ Results

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f4e8f758-6523-4044-b3a3-b3d01a998c91

📥 Commits

Reviewing files that changed from the base of the PR and between 124dc1a and c5ae6fb.

📒 Files selected for processing (1)
  • .github/workflows/api-fix-docs-artefacts.yml

- name: Generate GitHub App token with push access
id: app-token
uses: actions/create-github-app-token@v1
uses: actions/create-github-app-token@v3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow excerpts =="
sed -n '1,120p' .github/workflows/api-fix-docs-artefacts.yml 2>/dev/null || true
echo
sed -n '1,60p' .github/workflows/renovate.yml 2>/dev/null || true

echo
echo "== create-github-app-token references =="
rg -n "actions/create-github-app-token|create-github-app-token|client-id|permissions:|github-app-token" .github/workflows .github 2>/dev/null || true

Repository: Flagsmith/flagsmith

Length of output: 7615


🌐 Web query:

actions create-github-app-token v3 input client-id permissions

💡 Result:

In version 3 of the actions/create-github-app-token GitHub Action, the client-id input is the recommended way to identify your GitHub App, replacing the legacy app-id input [1][2][3]. The action also provides granular control over the permissions granted to the generated token through dynamically defined permission- inputs [4][5][6]. Key details regarding these inputs include: client-id This is a required input used to specify the GitHub App's Client ID [1][2]. While the legacy app-id input is still supported for backward compatibility, it is deprecated in favor of client-id [1][3][7]. If both are provided, client-id takes precedence [3]. Permission Inputs (permission-) The action supports granular control over the GitHub API scopes granted to the resulting installation access token [4][5]. - Usage: You can explicitly list required permissions by prefixing the permission name with permission- (e.g., permission-pull-requests for pull_requests) [1][4]. - Default Behavior: If no permission- inputs are provided, the generated token inherits all permissions currently granted to the GitHub App installation [1][4][5]. - Security Recommendation: It is considered a security best practice to explicitly list only the permissions necessary for your specific use case to follow the principle of least privilege [1][7]. - Validation: When setting these permissions, ensure they are granted to the specific app installation; requesting a permission that the installation does not possess will result in an error [1][5]. - Values: Generally, these inputs accept read or write, and in some cases, admin [5][6]. Example usage: - uses: actions/create-github-app-token@v3 with: client-id: ${{ vars.GITHUB_APP_CLIENT_ID }} private-key: ${{ secrets.GITHUB_APP_PRIVATE_KEY }} permission-contents: read permission-pull-requests: write

Citations:


🌐 Web query:

actions create-github-app-token bcd2ba49218906704ab6c1aa796996da409d3eb1

💡 Result:

The string bcd2ba49218906704ab6c1aa796996da409d3eb1 is the specific git commit hash corresponding to version 3.2.0 of the official actions/create-github-app-token GitHub Action [1][2]. This action is an official GitHub-owned tool used to generate installation access tokens for GitHub Apps within a GitHub Actions workflow [3][4]. It allows workflows to authenticate and perform API requests on behalf of a GitHub App by exchanging the app's credentials (typically a client ID and private key stored in repository secrets/variables) for a temporary, short-lived installation access token [3][5][6]. Key details about this version and the action: - Purpose: Enables secure, authenticated API interactions by GitHub Apps within CI/CD pipelines [4][5]. - Version 3.2.0: This release was published on May 12, 2026 [7]. The specific commit hash bcd2ba49218906704ab6c1aa796996da409d3eb1 is frequently used in workflow configurations to pin the dependency to this specific release for stability [1][2]. - Functionality: It supports various scoping options (e.g., enterprise, owner, or specific repositories), automatically masks generated tokens in logs, and includes a post-job execution phase to revoke the token by default for enhanced security [3][5][6].

Citations:


Pin actions/create-github-app-token to the full commit SHA.

api-fix-docs-artefacts.yml still uses the mutable @v3 tag, while renovate.yml already uses bc d2ba49218906704ab6c1aa796996da409d3eb1. Pin the reference to avoid unintended action code drift, unless FLAGSMITH_ENGINEERING_GH_APP_ID must stay as an App ID rather than a Client ID; if it does, client-id needs to be replaced before pinning.

🧰 Tools
🪛 actionlint (1.7.12)

[error] 31-31: missing input "app-id" which is required by action "actions/create-github-app-token@v3". all required inputs are "app-id", "private-key"

(action)

🪛 zizmor (1.29.0)

[error] 31-31: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 31-31: dangerous use of GitHub App tokens (github-app): app token inherits blanket installation permissions

(github-app)

Source: Linters/SAST tools

Comment on lines +31 to +33
uses: actions/create-github-app-token@v3
with:
app-id: ${{ vars.FLAGSMITH_ENGINEERING_GH_APP_ID }}
client-id: ${{ vars.FLAGSMITH_ENGINEERING_GH_APP_ID }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow files matching api-fix-docs-artefacts =="
fd -a 'api-fix-docs-artefacts\.ya?ml$' .github/workflows || true

echo "== target file excerpt =="
if [ -f .github/workflows/api-fix-docs-artefacts.yml ]; then
  cat -n .github/workflows/api-fix-docs-artefacts.yml | sed -n '1,110p'
fi

echo "== action ref occurrences =="
rg -n "create-github-app-token|actions/checkout|git push|permission-contents|install-id|client-id|private-key" .github/workflows/api-fix-docs-artefacts.yml .github/workflows 2>/dev/null || true

echo "== git status/stat =="
git diff --stat || true

Repository: Flagsmith/flagsmith

Length of output: 6599


🌐 Web query:

actions/create-github-app-token v3 permission-contents input inheritance default permissions

💡 Result:

The actions/create-github-app-token action uses an inheritance-based model for permissions [1][2]. By default, if no specific permission-* inputs are provided, the generated GitHub App installation token inherits all permissions currently granted to the GitHub App installation [1][3][4]. When you explicitly provide permission-* inputs (such as permission-contents), you are overriding this default behavior [3][5]. In this case, the token will only be granted the specific permissions you have explicitly defined in the workflow step, rather than the full set of permissions associated with the installation [3][5]. Key points regarding this behavior: - Inheritance: Without explicit permission inputs, the token receives the full scope of the installation's permissions [1][4]. - Explicit Configuration: If you define even one permission-* input, you effectively switch to a restricted mode where only the specified permissions are applied [3][5]. - Best Practice: It is recommended to explicitly list only the permissions required for your specific use case to follow the principle of least privilege [1][3][6]. - Validation: You must ensure that any permission requested via permission-* inputs has been granted to the GitHub App installation itself; otherwise, the action will fail [1][4][6]. Source documentation confirms that this mechanism remains consistent in version 3, which continues to support these granular permission inputs to provide fine-grained access control [1][7].

Citations:


Restrict the generated token to repository contents.

actions/create-github-app-token gives all installation permissions by default unless a permission-* input is provided. Since this token is only used for checkout and push, add only permission-contents: write.

Proposed fix
         with:
           client-id: ${{ vars.FLAGSMITH_ENGINEERING_GH_APP_ID }}
           private-key: ${{ secrets.FLAGSMITH_ENGINEERING_GH_APP_PRIVATE_KEY }}
+          permission-contents: write
🧰 Tools
🪛 actionlint (1.7.12)

[error] 31-31: missing input "app-id" which is required by action "actions/create-github-app-token@v3". all required inputs are "app-id", "private-key"

(action)


[error] 33-33: input "client-id" is not defined in action "actions/create-github-app-token@v3". available inputs are "app-id", "github-api-url", "owner", "permission-actions", "permission-administration", "permission-checks", "permission-codespaces", "permission-contents", "permission-custom-properties-for-organizations", "permission-dependabot-secrets", "permission-deployments", "permission-email-addresses", "permission-enterprise-custom-properties-for-organizations", "permission-environments", "permission-followers", "permission-git-ssh-keys", "permission-gpg-keys", "permission-interaction-limits", "permission-issues", "permission-members", "permission-metadata", "permission-organization-administration", "permission-organization-announcement-banners", "permission-organization-copilot-seat-management", "permission-organization-custom-org-roles", "permission-organization-custom-properties", "permission-organization-custom-roles", "permission-organization-events", "permission-organization-hooks", "permission-organization-packages", "permission-organization-personal-access-token-requests", "permission-organization-personal-access-tokens", "permission-organization-plan", "permission-organization-projects", "permission-organization-secrets", "permission-organization-self-hosted-runners", "permission-organization-user-blocking", "permission-packages", "permission-pages", "permission-profile", "permission-pull-requests", "permission-repository-custom-properties", "permission-repository-hooks", "permission-repository-projects", "permission-secret-scanning-alerts", "permission-secrets", "permission-security-events", "permission-single-file", "permission-starring", "permission-statuses", "permission-team-discussions", "permission-vulnerability-alerts", "permission-workflows", "private-key", "repositories", "skip-token-revoke"

(action)

🪛 zizmor (1.29.0)

[error] 31-31: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 31-31: dangerous use of GitHub App tokens (github-app): app token inherits blanket installation permissions

(github-app)

Source: Linters/SAST tools

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.72%. Comparing base (fc33002) to head (c5ae6fb).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8240      +/-   ##
==========================================
+ Coverage   98.71%   98.72%   +0.01%     
==========================================
  Files        1531     1543      +12     
  Lines       61263    61805     +542     
==========================================
+ Hits        60475    61017     +542     
  Misses        788      788              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19101 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  37.5 seconds
commit  c5ae6fb
info  🔄 Run: #19101 (attempt 1)

🗂️ Previous results
✅ oss · depot-ubuntu-latest-arm-16 — run #19101 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  36.9 seconds
commit  c5ae6fb
info  🔄 Run: #19101 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #19101 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  32.4 seconds
commit  c5ae6fb
info  🔄 Run: #19101 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #19101 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  33.7 seconds
commit  c5ae6fb
info  🔄 Run: #19101 (attempt 1)

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Visual Regression

19 screenshots compared. See report for details.
View full report

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

Labels

ci-cd Build, test and deployment related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant