carpentries / carpentries/actions

[check-valid-credentials] support Fine-grained PATs

Open
#73 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1
Forks
10
PR merge metrics
No merged PRs in 30d

Description

At the moment, check-valid-credentials relies on being able to know what permissions a token has by querying the `X-OAuth-scopes` field from the response header, but the Fine-Grained PATs (as of now) do not deploy these (see [this community discussion comment for updates](https://github.com/orgs/community/discussions/36441#discussioncomment-4838839))

One solution is to somehow detect if the token is a Fine-Grained PAT (e.g. by detecting if the text starts with `github_`) and then allowing them to pass through without checking permissions.

Contributor guide

Open the contributing guide

Research direction

Start by locating the check-valid-credentials action and reading how it uses the X-OAuth-scopes response header to validate permissions. Compare that behavior with Fine-grained PATs, including tokens beginning with github_, and confirm that the chosen handling preserves existing credential checks while allowing supported tokens through.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript
Domain
authentication, ci-cd
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.