This script will search your GitHub organizations for any matching Snyk organization based off of GitHub organization mapping in a csv. If matches are found, it will generate snyk-created-orgs.json which will be used to import repos into Snyk.
Python version 3.10.14
Download snyk-api-import, make the file executable, and place the file in the root directory of this repo.
SNYK_LOG_PATH - This needs to be the full path to the root directory of this repo.
csv-file-path - Path to the csv file with GitHub organization data.
snyk-api-import-name - Name of the Snyk API import binary in root directory
git clone https://github.com/snyk-labs/import-gitlab-repo-from-csv.git
pip install -r requirements.txt
python3 index.py --csv-file-path=FULL-PATH-TO-CSV-File --github-token=GITHUB-TOKEN --group-id=SNYK-GROUP-ID --snyk-api-import-name=snyk-api-import
python3 index.py --csv-file-path=FULL-PATH-TO-CSV-File --github-token=GITHUB-TOKEN --group-id=SNYK-GROUP-ID --snyk-api-import-name=snyk-api-import