Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #79 from davidread-harbr/readme-token-scope
Browse files Browse the repository at this point in the history
Add details of the GitHub token scopes
  • Loading branch information
scott-es authored Mar 29, 2022
2 parents 05b1dfa + f53a18f commit abc551e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ defaults + snyk code enable: `./snyk_scm_refresh.py --org-id=12345 --code=on`

## Dependencies
```
pip install -r requirements.txt
pip install -r requirements.txt
```
or
```
Expand All @@ -82,16 +82,21 @@ If using the Snyk Github Enterprise Integration type for your Github.com reposit
</blockquote>
<br/>

### Getting a GitHub token

1. In GitHub.com browse: https://github.com/settings/tokens/new. Or in GitHub Enterprise select your user icon (top-right), then 'Settings', then 'Developer settings', then 'Personal access tokens'.
2. Scopes - Public repos do not need a scope. If you want to scan private repos, then you'll need to enable this scope: `repo` (Full control of private repositories)

## Instructions
Make sure to use a user *API Token* that has acess to the Snyk Orgs you need to process with the script. A service account will *not* work for GitHub, which is the only SCM currently supported at this time.

Ensure that your GITHUB_TOKEN or GITHUB_ENTERPRISE_TOKEN has access to the repos contained in the Snyk Orgs in scope
If unsure, try one org at a time with `--org-id`


**Recommended:**
**Recommended:**
This tool will delete projects from Snyk that are detected as stale or have since been renamed

Use the `--dry-run` option to verify the execution plan for the first run

Each run generates a set of output files:
Expand Down

0 comments on commit abc551e

Please sign in to comment.