Created
February 14, 2020 14:39
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Superseded by a built-in feature 🎉
https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/managing-security-and-analysis-settings-for-your-organization