Github
Teleskope scans your GitHub organizations, repositories, and files for secrets and other sensitive data. The connector supports both GitHub Enterprise Cloud (github.com) and GitHub Enterprise Server (a self-hosted instance at your own base URL), and you can add more than one connection.
There are two ways to connect. Automatic lets Teleskope create and configure the GitHub App for you and is recommended for most customers. Manual lets you create the App yourself and hand Teleskope its credentials.
Teleskope creates a least-privilege GitHub App for you from a pre-filled manifest — no app IDs to copy and no private key to handle.
Start a connection in Teleskope
In Observatory, go to Settings → Clouds → Github and add a connection.
Give the connection a name (no spaces).
Choose where it points:
Enterprise Cloud — leave the base URL as
https://github.com.Enterprise Server — enter your GHES base URL (for example,
https://github.your-company.com).
Start the automatic app creation. Teleskope opens GitHub in a new tab with the app already filled in.
Create the GitHub App yourself and provide its credentials to Teleskope.
Create a GitHub App
Requirements
Admin user: you must be an organization admin to create the app and install it on the org.
Setup URL: Teleskope provides your dedicated setup URL.
Create a new app in GitHub
Go to your Developer settings:
https://<your-github-host>/settings/apps(use your GHES host for Enterprise Server).Select GitHub Apps, then New GitHub App.
Give your app a unique name and add an optional description.
Avoid using spaces in the app name.
Use https://teleskope.ai as the homepage URL.
Enter your dedicated Teleskope Setup URL:
https://observatory.{baseURL}/settings/clouds/github?instance_name={connectionName}
(Optional) Create a Webhook Secret.
Create a private key for the application and download the
.pemfile.
Grant permissions in GitHub
Add the following repository permissions:
Contents (read, mandatory)
Metadata (read-only, mandatory)
Enroll the connection in Teleskope
On https://observatory.{baseURL}/settings/clouds/github, add a connection.
Enter your app's:
Connection Name (must match the
instance_namein the Setup URL above)Base URL —
https://github.comfor Enterprise Cloud, or your GHES base URL for Enterprise ServerApp name
App ID
Github App Private Key — upload the
.pemfile directly (the field is masked; use show/hide to check it)
Submit the connection, then follow the prompt to install the app on GitHub and return to Observatory.
Choose Discover organizations on the connection. Scanning activates automatically once the connection is verified.
Delete your local Private Key .pem file.
Restrict Link Access — Make Repository Private
The Restrict link access action in Policy Maker makes a public or internal GitHub repository private. In the policy editor, its settings panel is titled Update shared link access. When you run it manually on a finding, it appears as Restrict shared link. When a policy using this action matches a finding, the repository is made private — every file in that repository is affected, not just the file that triggered the finding. Review which repositories a policy matches before you enable it. The action runs automatically when a policy matches. There is no separate approval step.
Making the repository public again in GitHub does not restore its stars and watchers.
Repositories that are already private are skipped without error. For archived repositories and forks, the action reports an error and doesn't change the repository.
For GitHub, the only sharing level is Restricted, so the policy editor doesn't show a sharing-level choice. When you run the action manually on a finding, Restricted is the only option.
Permission required
This action requires the Administration (write) repository permission on your GitHub App (GitHub App permissions reference). This permission is broader than scanning needs — it also allows deleting repositories, managing branch protection rules, deploy keys, collaborators, and environment secrets. Grant it only if you intend to use this action.
Scanning alone needs only Contents (read) and Metadata (read).
Creating a policy that uses this action requires the Create and edit policies permission.
Granting the permission
New connections (Automatic flow): Select Allow remediation (make public or internal repositories private) before you continue to GitHub.
Existing connections: If your app was created without Administration (write), add it manually:
In GitHub, navigate to your app's settings. The path depends on who owns the app:
Organization-owned app: Click your profile picture → Your organizations → Settings next to the organization → Developer settings → GitHub Apps → Edit next to your app.
User-owned app: Click your profile picture → Settings → Developer settings → GitHub Apps → Edit next to your app.
In the app settings sidebar, click Permissions & events.
Under Repository permissions, set Administration to Read and write and save.
GitHub notifies each organization where the app is installed. An organization admin must approve the updated permissions before the new permission takes effect on that organization's repositories.
New connections (Manual flow): Add Administration (read and write) to the repository permissions when you create the app. See the Create a GitHub App step.
Ad-hoc use
To run Restrict shared link manually on a finding, a user's role must include the Update shared link access permission.
Troubleshooting
Action fails with "GitHub refused to make [repo] private: the GitHub App (or PAT) needs the Administration (write) repository permission, or an organization policy blocks visibility changes"
The GitHub App is missing Administration (write), or an organization policy prevents visibility changes
Grant Administration (write) as described above, and confirm no organization policy blocks repository visibility changes
Action reports that the repository was not found or is not visible to the GitHub App
The GitHub App is not installed on the repository's organization
Install the GitHub App on the organization that contains the repository
Last updated
Was this helpful?
