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

Improve README.md around requirement for personal access token for alert-lookup #305

Open
dnwe opened this issue Jan 19, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@dnwe
Copy link

dnwe commented Jan 19, 2023

Currently the README.md briefly mentions that alert-lookup needs a personal access token, but it doesn't specify what permissions are actually needed. It would be good to enhance that with a bit more detail such as:

This requires using a personal access token with the public_repo and security_events scopes. It is also necessary to give the user (whose personal access token is being used) access to view security alerts (see
Granting access to security alerts)

I'd initially assumed that I should just be able to use the built-in support for enhancing the default access token using the permissions: directive in GitHub Actions (as per the doc)

permissions:
  security-events: read

I assume this doesn't work because of the bit above about "granting access to security alerts", but it would be good to clarify that in the README and ideally raise the issue with GitHub Support, because it would be much cleaner if you could just do this rather than having to manage and rotate dedicated personal-access credentials for this

@dnwe dnwe added the bug Something isn't working label Jan 19, 2023
@jeffwidman
Copy link
Member

jeffwidman commented Apr 7, 2023

👋 Sorry for the slow reply.

The behavior around alert lookup changed recently.

So by default anyone with write/maintain access to the repo will have access (I assume under the security_events scope)...

Rather than writing this all up in the readme, what we need here is to update the relevant GitHub docs:

  1. the granting access to alerts doc needs to be updated to reflect the new more permissive permissions
  2. the relevant API docs need to clarify what scopes are needed.

Thanks to your reporting this, I've reached out to the relevant teams to update the docs, and once that happens, then it should be straightforward to link to those from the readme.... that will be a lot more maintainable over time to link out rather than describing everything here in our readme.

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

No branches or pull requests

2 participants