Skip to content

Gets a random installation's token, not one that works for the current repo #18

Open
@RobinDaugherty

Description

@RobinDaugherty

Steps to Reproduce

  1. Create GitHub App
  2. Install the App on a repository
  3. Install the App on a second repository ("number-two")
  4. Add app ID and private key to repo "number-two" secrets
  5. Add workflow that uses this action with those secrets to get an access token and uses it to perform an action on the "number-two" repository (e.g. create a deployment)

Expected Result

Access token works on the "number-two" repository

Actual Result

API returns 404 error because the access token does not have permissions on the "number-two" repository.

This is because this action returns a semi-random installation's token.
It does not look at the Actions environment to get the current repository, or have inputs to determine which repository should be set.

The input scope looks at the installation information, apparently to match on who installed the app, which seems to be a very limited way to match the app.

For an example Action that does this correctly, see https://github.com/tibdex/github-app-token

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions