GitHub
Integrating GitHub with Escape's ASM provides Code-to-Cloud visibility by matching your Code Resolvers with your Cloud Resources, through API Discovery from Code.
Discovered Resources¶
The GitHub integration automatically discovers and inventories the following resources from your GitHub organization:
- GitHub Repositories: All repositories within the organization or specified scope
- API Schema Files: OpenAPI specifications and Postman collections found in repositories. GraphQL schemas are not extracted
- Extracted APIs: API endpoints and services defined in discovered schema files
The integration scans your repositories for API schema files, extracts API definitions, and automatically classifies them as Assets (APIs) in Escape's ASM. This enables Code-to-Cloud security monitoring by linking discovered APIs to their source repositories and enabling continuous testing as code changes.
Note: You must connect an organization GitHub account; a personal account isn't supported.
The default connection is a GitHub App, including GitHub Enterprise Server (GHES). A personal access token is an alternative.
GitHub App (default)¶
GitHub.com
- Install the Escape GitHub App on the organization you want to scan
- Under Repository access, select All repositories
- From your organization settings, open GitHub Apps and click Configure next to Escape
- The Installation ID is the last segment of that page URL, for example
.../settings/installations/160545842 - The Organization login is your organization handle, the
my-organizationingithub.com/my-organization - In Escape, open the GitHub integration and use GitHub Installation. Enter the Installation ID and organization login
GitHub Enterprise Server and a private GitHub App
Use a GitHub App owned by your organization for GHES, or when you cannot install the public Escape app.
- In your GitHub or GHES settings, create a GitHub App owned by your organization
- Under Repository permissions, grant read-only access to Contents and Metadata
- Under Organization permissions, grant read-only access to Members
- Generate a private key and copy the Client ID
- Install the App on the organization you want to scan. Select All repositories unless you need a narrower set
- In Escape, open the GitHub integration and use Private Installation. Enter the Client ID, private key, Installation ID, and organization login
- Set API base URL only for GHES, for example
https://github.example.com/api/v3
Personal Access Token (alternative)¶
-
- Go to your profile settings and select "Developer settings"
-
Personal Access Tokens:
- Select "Personal access tokens"
- Select "Fine-grained tokens"
- Click "Generate new token"
-
Token Configuration:
- Resource Owner: Select your organization (must be public)
- Repository Access: Grant access to all repositories
- Repository Permissions: Set "read-only" for contents and metadata
- Organization Permissions: Set "read-only" for members
-
Generate and Copy Your Token:
- Click "Generate token"
- Copy the token immediately - it can't be viewed again after leaving the page
-
In Escape, open the GitHub integration and use Personal Access Token
This token enables Escape's ASM to securely analyze your GitHub repositories while maintaining data privacy.
Internal Networks and Services¶
When integrating with internal networks and services, you may need to:
- Configure a Private Location
- Whitelist FQDNs
For more information, see Private Locations.