Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.6 to 7.1.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/moxystudio/node-cross-spawn/releases">cross-spawn's releases</a>.</em></p> <blockquote> <h2>v7.1.2</h2> <h2>Bug fixes</h2> <ul> <li><strong>Batch files found in <code>PATH</code> see their own directory again</strong> (<a href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/203">#203</a>, <a href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/204">#204</a>). Since 7.1.0, a batch file run by its name, e.g. <code>gradle</code>, got the current directory in <code>%~dp0</code> on Windows, which broke batch files that use it to find their own files, such as Gradle's (<code>Unable to access jarfile</code>). Batch files are now run by the path they resolved to.</li> </ul> <h2>v7.1.1</h2> <h2>Security</h2> <p>This release fixes a command injection vulnerability that affects Windows only (GHSA-w3gc-668g-rf8f, high).</p> <p>7.1.0 fixed how arguments are escaped for batch files, but that escaping only applied when cross-spawn detected that the command was a batch file. When the command wasn't written as a plain program name or path, e.g. it contained double quotes or a space, cross-spawn could miss that <code>cmd.exe</code> would run a batch file, and escape the arguments for a regular program instead, which allowed running arbitrary commands.</p> <p>Please upgrade. <code>cross-spawn@6</code> users can upgrade to 6.0.8.</p> <h2>Behaviour change</h2> <p>On Windows, commands that run through <code>cmd.exe</code> are now always quoted. As on other platforms, the command must be the name or path of a single program, with its arguments passed in <code>args</code>: <code>spawn('npm install')</code> now fails with <code>ENOENT</code> instead of running <code>npm</code> with <code>install</code>. Also, <code>cmd.exe</code>'s message for a command it can't find now shows the command in quotes, e.g. <code>'"foo"' is not recognized as an internal or external command</code>. See the <a href="https://github.com/moxystudio/node-cross-spawn#windows-argument-escaping">Windows argument escaping</a> section of the README.</p> <h2>v7.1.0</h2> <h2>Security</h2> <p>This release fixes two vulnerabilities that affect Windows only:</p> <ul> <li><strong>Command injection when spawning batch files</strong> (GHSA-ghv9-86vm-4v8m, high). Arguments passed to batch files outside <code>node_modules/.bin</code>, such as <code>npm.cmd</code> or globally installed package shims, could break out of their quotes and run arbitrary commands. <code>%VAR%</code> and <code>!VAR!</code> could also be expanded in some environments.</li> <li><strong>Argument injection via backslashes before a double quote</strong> (GHSA-m6qr-m48x-3xhh, medium). Since 7.0.4, arguments with two or more backslashes before a double quote, or at their end, could split into extra arguments or swallow the following ones.</li> </ul> <p>Please upgrade. <code>cross-spawn@6</code> users can upgrade to 6.0.7.</p> <p>Thanks to Duong Bui Thai for privately reporting both, to <a href="https://github.com/mohd-akram"><code>@mohd-akram</code></a> for reporting the batch file injection in <a href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/171">#171</a>, and to <a href="https://github.com/trackoor"><code>@trackoor</code></a> and <a href="https://github.com/ogffx"><code>@ogffx</code></a> for independently reporting and fixing the backslash issue in <a href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/188">#188</a> and <a href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/190">#190</a>.</p> <h2>Behaviour changes</h2> <p>These only affect Windows, when a command runs through <code>cmd.exe</code>, i.e. batch files and other non-executable commands:</p> <ul> <li><strong>Line breaks now throw a <code>TypeError</code>.</strong> <code>cmd.exe</code> can't escape them, so arguments with line breaks used to be silently cut short. Both <code>spawn()</code> and <code>spawn.sync()</code> now throw synchronously instead.</li> <li><strong>Inner double quotes are escaped as <code>""</code> for batch files.</strong> Programs called by batch files that don't follow the Microsoft C runtime conventions, such as those written in Go or that use <code>CommandLineToArgvW</code>, may now split arguments containing double quotes differently.</li> <li><strong><code>cmd.exe</code> runs with <code>/e:on /v:off</code>.</strong> This also applies to the batch file itself, e.g. one relying on delayed expansion being enabled in the registry.</li> <li><strong>Batch files that read an argument unquoted with <code>%~1</code> remain unsafe</strong>, as they always were. Please quote it, e.g. <code>"%~1"</code>, or forward the arguments with <code>%*</code>.</li> </ul> <p>Please see the new <a href="https://github.com/moxystudio/node-cross-spawn#windows-argument-escaping">Windows argument escaping</a> section of the README.</p> <h2>Other changes</h2> <ul> <li>Close the file descriptor when reading a shebang fails (<a href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/187">#187</a>). Thanks to <a href="https://github.com/xiehuanyi"><code>@xiehuanyi</code></a>.</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md">cross-spawn's changelog</a>.</em></p> <blockquote> <h3><a href="https://github.com/moxystudio/node-cross-spawn/compare/v7.1.1...v7.1.2">7.1.2</a> (2026-11-29)</h3> <h3>Bug Fixes</h3> <ul> <li>run batch files by their resolved path on Windows (<a href="https://github.com/moxystudio/node-cross-spawn/commit/fe027b8a594c1260c45b1d1d3e5c543f2d9e8c57">fe027b8</a>), closes <a href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/203">#203</a></li> </ul> <h3><a href="https://github.com/moxystudio/node-cross-spawn/compare/v7.1.0...v7.1.1">7.1.1</a> (2026-11-28)</h3> <h3>Bug Fixes</h3> <ul> <li>always quote commands run through cmd.exe (<a href="https://github.com/moxystudio/node-cross-spawn/commit/d0ead352a7380492cbb0f6548fa86f19448323c9">d0ead35</a>)</li> </ul> <h2><a href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.6...v7.1.0">7.1.0</a> (2026-11-28)</h2> <h3>Bug Fixes</h3> <ul> <li>close the file descriptor when reading a shebang fails (<a href="https://github.com/moxystudio/node-cross-spawn/commit/9924b880434f771b2bfdb341cb567ea0d2acbe9e">9924b88</a>)</li> <li>escape commands and arguments safely when running them through cmd.exe (<a href="https://github.com/moxystudio/node-cross-spawn/commit/244ffeaa8473de0080c93ebbf779bb953b94114b">244ffea</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/moxystudio/node-cross-spawn/commit/9bfd202a902078177b7e80d5eed4514ee6efc2d0"><code>9bfd202</code></a> chore(release): 7.1.2</li> <li><a href="https://github.com/moxystudio/node-cross-spawn/commit/fe027b8a594c1260c45b1d1d3e5c543f2d9e8c57"><code>fe027b8</code></a> fix: run batch files by their resolved path on Windows</li> <li><a href="https://github.com/moxystudio/node-cross-spawn/commit/f408280b07671b1c24d22c7282259016da80403a"><code>f408280</code></a> chore(release): 7.1.1</li> <li><a href="https://github.com/moxystudio/node-cross-spawn/commit/d0ead352a7380492cbb0f6548fa86f19448323c9"><code>d0ead35</code></a> fix: always quote commands run through cmd.exe</li> <li><a href="https://github.com/moxystudio/node-cross-spawn/commit/a03242e369749823a3c9fa120830da8e65b86c2c"><code>a03242e</code></a> chore: upgrade dev dependencies</li> <li><a href="https://github.com/moxystudio/node-cross-spawn/commit/515dc55a97592a3d96745b8ed47d084baff00f1f"><code>515dc55</code></a> chore(release): 7.1.0</li> <li><a href="https://github.com/moxystudio/node-cross-spawn/commit/4fcac7b265b9b3603e6a6bb9d2eefe0efa3472f4"><code>4fcac7b</code></a> docs: document Windows argument escaping and its limitations</li> <li><a href="https://github.com/moxystudio/node-cross-spawn/commit/244ffeaa8473de0080c93ebbf779bb953b94114b"><code>244ffea</code></a> fix: escape commands and arguments safely when running them through cmd.exe</li> <li><a href="https://github.com/moxystudio/node-cross-spawn/commit/9924b880434f771b2bfdb341cb567ea0d2acbe9e"><code>9924b88</code></a> fix: close the file descriptor when reading a shebang fails</li> <li><a href="https://github.com/moxystudio/node-cross-spawn/commit/462a846b96da92565b0ff62ace437b47ea63e75a"><code>462a846</code></a> test: support unit tests next to source files</li> <li>Additional commits viewable in <a href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.6...v7.1.2">compare view</a></li> </ul> </details> <details> <summary>Install script changes</summary> <p>This version adds <code>prepare</code> script that runs during installation. Review the package contents before updating.</p> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/actions/create-github-app-token/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Create GitHub App Token
GitHub Action for creating a GitHub App installation access token.
Usage
In order to use this action, you need to:
- Register new GitHub App.
- Store the App's Client ID in your repository variables (example:
APP_CLIENT_ID). - Store the App's private key in your repository secrets (example:
APP_PRIVATE_KEY).
Important
An installation access token expires after 1 hour. Please see this comment for alternative approaches if you have long-running processes.
Create a token for the current repository
name: Run tests on staging
on:
push:
branches:
- main
jobs:
hello-world:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v3
id: app-token
with:
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: ./actions/staging-tests
with:
token: ${{ steps.app-token.outputs.token }}
Use app token with actions/checkout
on: [pull_request]
jobs:
auto-format:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v3
id: app-token
with:
# required
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v6
with:
token: ${{ steps.app-token.outputs.token }}
ref: ${{ github.head_ref }}
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
persist-credentials: false
- uses: creyD/prettier_action@v6
with:
github_token: ${{ steps.app-token.outputs.token }}
Create a Git committer string for an app installation
on: [pull_request]
jobs:
auto-format:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v3
id: app-token
with:
# required
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- id: committer
run: echo "string=${{ steps.app-token.outputs.app-slug }}[bot] <${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>" >> "$GITHUB_OUTPUT"
- run: echo "committer string is ${{ steps.committer.outputs.string }}"
Configure Git CLI for an app's bot user
on: [pull_request]
jobs:
auto-format:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v3
id: app-token
with:
# required
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
permission-contents: write
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- run: |
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
gh auth setup-git
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
# Git commands like commit and push work using the bot user
- run: |
git add .
git commit -m "Auto-generated changes"
git push
Tip
The
<BOT USER ID>is the numeric user ID of the app's bot user, which can be found underhttps://api.github.com/users/<app-slug>%5Bbot%5D.For example, we can check at
https://api.github.com/users/dependabot[bot]to see the user ID of Dependabot is 49699333.Alternatively, you can use the octokit/request-action to get the ID.
Create a token for all repositories in the current owner's installation
on: [workflow_dispatch]
jobs:
hello-world:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v3
id: app-token
with:
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ steps.app-token.outputs.token }}
issue-number: ${{ github.event.issue.number }}
body: "Hello, World!"
Create a token for multiple repositories in the current owner's installation
on: [issues]
jobs:
hello-world:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v3
id: app-token
with:
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: |
repo1
repo2
- uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ steps.app-token.outputs.token }}
issue-number: ${{ github.event.issue.number }}
body: "Hello, World!"
You can include the current repository in the list with ${{ github.repository }}:
repositories: ${{ github.repository }},repo2
Create a token for all repositories in another owner's installation
on: [issues]
jobs:
hello-world:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v3
id: app-token
with:
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: another-owner
- uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ steps.app-token.outputs.token }}
issue-number: ${{ github.event.issue.number }}
body: "Hello, World!"
Create a token for an enterprise installation
on: [workflow_dispatch]
jobs:
hello-world:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v3
id: app-token
with:
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
enterprise: my-enterprise-slug
- name: Call enterprise management REST API with gh
run: |
gh api /enterprises/my-enterprise-slug/apps/installable_organizations
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
Create a token with specific permissions
Note
Selected permissions must be granted to the specified app installation. Setting a permission that the installation does not have will result in an error.
on: [issues]
jobs:
hello-world:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v3
id: app-token
with:
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
permission-issues: write
- uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ steps.app-token.outputs.token }}
issue-number: ${{ github.event.issue.number }}
body: "Hello, World!"
Create tokens for multiple user or organization accounts
You can use a matrix strategy to create tokens for multiple user or organization accounts.
Note
See this documentation for information on using multiline strings in workflows.
on: [workflow_dispatch]
jobs:
set-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set.outputs.matrix }}
steps:
- id: set
run: echo 'matrix=[{"owner":"owner1"},{"owner":"owner2","repos":["repo1"]}]' >>"$GITHUB_OUTPUT"
use-matrix:
name: "@${{ matrix.owners-and-repos.owner }} installation"
needs: [set-matrix]
runs-on: ubuntu-latest
strategy:
matrix:
owners-and-repos: ${{ fromJson(needs.set-matrix.outputs.matrix) }}
steps:
- uses: actions/create-github-app-token@v3
id: app-token
with:
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: ${{ matrix.owners-and-repos.owner }}
repositories: ${{ join(matrix.owners-and-repos.repos) }}
- uses: octokit/request-action@v2.x
id: get-installation-repositories
with:
route: GET /installation/repositories
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- run: echo "$MULTILINE_JSON_STRING"
env:
MULTILINE_JSON_STRING: ${{ steps.get-installation-repositories.outputs.data }}
Run the workflow in a github.com repository against an organization in GitHub Enterprise Server
on: [push]
jobs:
create_issue:
runs-on: self-hosted
steps:
- name: Create GitHub App token
id: create_token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.GHES_APP_CLIENT_ID }}
private-key: ${{ secrets.GHES_APP_PRIVATE_KEY }}
owner: ${{ vars.GHES_INSTALLATION_ORG }}
github-api-url: ${{ vars.GITHUB_API_URL }}
- name: Create issue
uses: octokit/request-action@v2.x
with:
route: POST /repos/${{ github.repository }}/issues
title: "New issue from workflow"
body: "This is a new issue created from a GitHub Action workflow."
env:
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }}
Proxy support
This action relies on Node.js native proxy support.
If you set HTTP_PROXY or HTTPS_PROXY, also set NODE_USE_ENV_PROXY: "1" on the action step so Node.js honors those variables. If you need proxy bypass rules, set NO_PROXY alongside them.
- uses: actions/create-github-app-token@v3
id: app-token
env:
HTTPS_PROXY: http://proxy.example.com:8080
NO_PROXY: github.example.com
NODE_USE_ENV_PROXY: "1"
with:
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
Inputs
client-id or app-id
Required: GitHub App Client ID.
Note
The legacy
app-idinput is also accepted, butclient-idis recommended.
private-key
Required: GitHub App private key. Escaped newlines (\\n) will be automatically replaced with actual newlines.
Some other actions may require the private key to be Base64 encoded. To avoid recreating a new secret, it can be decoded on the fly, but it needs to be managed securely. Here is an example of how this can be achieved:
steps:
- name: Decode the GitHub App Private Key
id: decode
run: |
private_key=$(echo "${{ secrets.APP_PRIVATE_KEY }}" | base64 -d | awk 'BEGIN {ORS="\\n"} {print}' | head -c -2) &> /dev/null
echo "::add-mask::$private_key"
echo "private-key=$private_key" >> "$GITHUB_OUTPUT"
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ steps.decode.outputs.private-key }}
owner
Optional: The owner of the GitHub App installation. If empty, defaults to the current repository owner.
repositories
Optional: Comma or newline-separated list of repositories to grant access to.
Note
If
owneris set explicitly andrepositoriesis empty, access will be scoped to all repositories in the provided repository owner's installation. Ifownerandrepositoriesare empty, access will be scoped to only the current repository.Repository entries may include an owner, for example
owner/repo1. The owner portion must match theownerinput, or the current repository owner ifowneris unset.
enterprise
Optional: The slug of the enterprise account to generate a token for an enterprise installation.
Note
The
enterpriseinput is mutually exclusive withownerandrepositories. Use it when the GitHub App is installed on an enterprise account. Enterprise installation tokens can call enterprise APIs, but do not grant organization or repository access.
permission-<permission name>
Optional: The permissions to grant to the token. By default, the token inherits all of the installation's permissions. We recommend to explicitly list the permissions that are required for a use case. This follows GitHub's own recommendation to control permissions of GITHUB_TOKEN in workflows. The documentation also lists all available permissions, just prefix the permission key with permission- (e.g., pull-requests → permission-pull-requests).
The reason we define one permision-<permission name> input per permission is to benefit from type intelligence and input validation built into GitHub's action runner.
skip-token-revoke
Optional: If true, the token will not be revoked when the current job is complete.
github-api-url
Optional: The URL of the GitHub REST API. Defaults to the URL of the GitHub Rest API where the workflow is run from.
Outputs
token
GitHub App installation access token.
installation-id
GitHub App installation ID.
app-slug
GitHub App slug.
How it works
The action creates an installation access token using the POST /app/installations/{installation_id}/access_tokens endpoint.
The token target depends on the inputs: enterprise creates a token for an enterprise installation, owner without repositories creates a token for all repositories in the owner's installation, repositories scopes the token to those repositories, and no target inputs scopes the token to the current repository.
- The token inherits all the installation's permissions.
- The token is set as output
tokenwhich can be used in subsequent steps. - Unless the
skip-token-revokeinput is set to true, the token is revoked in thepoststep of the action, which means it cannot be passed to another job. - The token is masked, it cannot be logged accidentally.
Note
Installation permissions can differ from the app's permissions they belong to. Installation permissions are set when an app is installed on an account. When the app adds more permissions after the installation, an account administrator will have to approve the new permissions before they are set on the installation.