Use the endorctl sync-org command to create projects for all the unscanned repositories in your GitHub organization. This does not automatically scan the projects. It creates projects in Endor Labs, measures scan coverage across a GitHub organization, and gives you visibility into your source control repository.
Usage
To sync your GitHub organization to Endor Labs:
-
Export a GitHub token that can read all projects in your GitHub organization. To run the sync-org command you need at least
repoandread:org permissions.export GITHUB_TOKEN=<insert-github-token> -
Run the sync-org command. By default, the command skips archived repositories.
endorctl sync-org --name=endorlabs
sync-org command deletes projects in Endor Labs when you archive their linked repositories on GitHub. Use the --archived flag to include archived repositories and prevent Endor Labs from deleting them.
Options
The endorctl sync-org command uses the following flags and environment variables:
| Flag | Environment Variable | Type | Description |
|---|---|---|---|
archived |
ENDOR_SYNC_ORG_ARCHIVED |
boolean | Include archived repositories and prevent Endor Labs from deleting them. |
github-api-url |
ENDOR_SYNC_ORG_GITHUB_API_URL |
string | Set the URL for API requests to GitHub Enterprise Cloud or GitHub Enterprise Server (default: https://api.github.com/). |
name |
ENDOR_SYNC_ORG_NAME |
string | Set the full name of the organization. For example: endorlabs. |
platform-source |
ENDOR_SYNC_ORG_PLATFORM_SOURCE |
string | Set the platform source (default: github). |
uuid |
ENDOR_SYNC_ORG_UUID |
string | Set the UUID of the GitHub installation. |