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

Unable to fetch dependabot metadata with v1.3.0 and alert-lookup & compat-lookup enabled #179

Closed
SalimBensiali opened this issue Mar 14, 2022 · 2 comments · Fixed by #183
Labels
bug Something isn't working

Comments

@SalimBensiali
Copy link
Contributor

SalimBensiali commented Mar 14, 2022

HI,

Thanks again for latest updates in v1.3.0 incorporating more alert metadata.
I tried enabling the new alert-lookup & compat-lookup options but I am getting a cryptic message Error: Resource not accessible by integration during the "Parsing Dependabot metadata" phase of the action. See the action run at https://github.com/SalimBensiali/le-blanc-jewellery/runs/5545641006?check_suite_focus=true

When not passing the additional options the action runs successfully, but obviously the additional metadata is not available in this case.

Is there anything else I would need to configure? I looked at the documentation and could not find anything else.

Thanks

@SalimBensiali SalimBensiali added the bug Something isn't working label Mar 14, 2022
mkutz pushed a commit to mkutz/github-actions-experiments that referenced this issue Mar 17, 2022
It caused an error: Resource not accessible by integration.
See dependabot/fetch-metadata#179
@SalimBensiali
Copy link
Contributor Author

It turns out the default secrets.GITHUB_TOKEN does not have enough permissions to allow access to the dependabot vulnerabilities graphQL endpoints. I was able to fix that by creating a PAT with the public_repo scope and pass it to the github-token action parameter instead. See https://github.com/SalimBensiali/le-blanc-jewellery/blob/584b38d698d92edbd62d5f93ce8d4edf4333d4ca/.github/workflows/dependabot-auto-label.yml#L24

I only found out about this this by accident/luck as documentation around this was very limited. See https://chezsoi.org/lucas/blog/listing-all-github-security-alerts-of-a-user-s-projects-using-graphql-and-python.html where it is being mentioned.

To create a PAT see https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

I can raise a PR to add this to the docs.

@brrygrdn
Copy link
Contributor

@SalimBensiali Ah, apologies for that. We have a few places where the GITHUB_TOKEN should be substituted for one with augmented permissions.

I need to make some other updates to the documentation so I will incorporate this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants