0

I have searched high and low, but I can't find anything telling me how to enable GitHub Vulnerability alerts through their API. I conversely can't find anything saying it's not supported.

Does anyone know where I can find the API documentation if it is supported, or can someone tell me it's not? I have just completed a migration to GitHub for my origination and we have ~750 repositories so enabling them all manually is... less than ideal.

Russ
  • 12,312
  • 20
  • 59
  • 78

3 Answers3

1

we released an API for this scenario a while back, so you can now enable or disable security alerts in bulk using that. We also published a sample which calls that API for all the repositories in an organization.

API: https://developer.github.com/v3/previews/#enable-or-disable-vulnerability-alerts-for-a-repository Sample: https://github.com/github/enable-security-alerts-sample

Community
  • 1
  • 1
  • It is all good to present a relevant API of you. Although you should at least document the API call the poster is asking for, here into stackoverflow, even if it is a simplified and point to your own sample code from your API in the end. – Léa Gris Aug 06 '19 at 01:13
0

@Russ looks like it's only available according to the UI. I am in the same position in needing to enable this for a very large number of repos.

Take a look at: https://github.community/t5/GitHub-API-Development-and/Security-vulnerability-alerts/td-p/15846

Eric Silva
  • 51
  • 4
0

I got this from my companies GitHub service rep:

  1. Enable security vulnerability via API (v3 or v4) I've raised this and currently in conversations with the team that is responsible for this feature to see when this could be addressed. I have to say this is an exception to the GitHub rule of API/Platform first. I apologise for that.
Russ
  • 12,312
  • 20
  • 59
  • 78