GraphQL Repo Vulnerabilities

I need to retrieve the severity of my repo’s security vulnerabilities for each individual project using Graphql.

I have seen similar questions asked here with several answers saying it is only available to check through Github’s UI. I was wondering if anyone had a good workaround or if I am doing something incorrectly?

Basically something like this:

query {
  repositoryOwner(login: “repoOwner”) {
    login
    repositories(last:10) {
      edges{
      node {
        name
        securityVulnerabilities(first:3) {

          nodes {
            severity
          }  

       }
    }
}
}
}
}

Please look at https://developer.github.com/v4/object/repositoryvulnerabilityalert/. It is still in preview though.

1 Like