-
-
Save kkashyap1707/ce12a58eb5f5133d75cc1cfa2518d69f 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 hidden or 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