Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Improve error message when branch protection check fails because of the use of GITHUB_TOKEN #2946

Open
ashishkurmi opened this issue May 4, 2023 · 4 comments
Labels
check/Branch-Protection good first issue Good for newcomers kind/docs Improvements or additions to documentation kind/enhancement New feature or request Stale

Comments

@ashishkurmi
Copy link
Contributor

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
When the scorecard GitHub action is used for evaluation, the default GitHub Actions token lacks the necessary permissions to perform the branch protection check, resulting in the following generic access issue error:
"Reasoning: internal error: error during brancheshandler.setup: internal error: githubv4.query: resource not accessible by integration"

Often times maintainers fail to understand the error message and end up ignoring the check all together.

Describe the solution you'd like
A clear and concise description of what you want to happen.
We can check if the branch protection check fails because of the use of GITHUB_TOKEN and provide a more helpful error message.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.
For example, NodeJS is using the Scorecard action to calculate their Scorecard scores which returns this generic error messsage:
https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node
"Reasoning: internal error: error during brancheshandler.setup: internal error: githubv4.query: resource not accessible by integration"

@ashishkurmi ashishkurmi added the kind/enhancement New feature or request label May 4, 2023
@ashishkurmi
Copy link
Contributor Author

I will be happy to take up this task.
@ossf/scorecard-maintainers: Could you please assign this task to me if you don't have any concerns?

@github-actions
Copy link

Stale issue message - this issue will be closed in 7 days

@spencerschrock
Copy link
Member

With repo rules merged in #3354, this issue might want to push people towards that.

Copy link

This issue is stale because it has been open for 60 days with no activity.

@github-actions github-actions bot added the Stale label Nov 19, 2023
@spencerschrock spencerschrock added kind/docs Improvements or additions to documentation good first issue Good for newcomers labels Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
check/Branch-Protection good first issue Good for newcomers kind/docs Improvements or additions to documentation kind/enhancement New feature or request Stale
Projects
Status: Todo
Development

No branches or pull requests

3 participants