'Exporting Dependabot as JSON

Anyone know how one can export Dependabot findings in GitHub as JSON? I've seen this done before, however can't seem to find anything online about it.



Solution 1:[1]

You should be able to grab the vulnerabilityAlerts for xx/yy in the following way:

gh api graphql -F owner='xx' -F name='yy' -f query='
  query($name: String!, $owner: String!) {
    repository(owner: $owner, name: $name) {
        vulnerabilityAlerts(first: 100) {
            nodes {
                createdAt
                dismissedAt
                securityVulnerability {
                    package {
                        name
                    }
                    advisory {
                        description
                    }
                }
            }
        }
    }
  }
'

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 chenrui