Skip to content

Instantly share code, notes, and snippets.

@miketheman
Created February 14, 2020 14:39
Show Gist options
  • Save miketheman/db2d33baec656bae85eb8795c8f5200b to your computer and use it in GitHub Desktop.
Save miketheman/db2d33baec656bae85eb8795c8f5200b to your computer and use it in GitHub Desktop.
A simple script to enable GitHub's Data Services & Vulnerability Scanning on a given Organization's Repositories
from github import Github
gh = Github('SET_GITHUB_ACCESS_TOKE_HERE')
org = gh.get_organization('SET_ORG_NAME_HERE')
repos = org.get_repos()
for repo in repos:
if repo.archived:
continue
if not repo.get_vulnerability_alert():
repo.enable_vulnerability_alert()
print(repo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment