Skip to content

Connect GitHub, GitLab or Git

Skep connects to the repositories where your code, your Weaver registries and your collector configuration live. GitHub and GitLab can read and write. Any other Git host is read only.

GitHub GitLab Other Git hosts
Service owners from CODEOWNERS Yes Yes, with sections No
Remediation pull requests from findings Yes No No
Registry checks on pull requests Yes No No
Collector or sampler config read from a file Yes Yes Yes
Config changes proposed as Pull requests Merge requests A patch you download and apply
Webhooks Pull requests and pushes Merge requests and pushes None (Skep reads every 10 minutes)

When a fleet’s configuration lives in a repository, Skep never pushes that fleet’s configuration to collectors. It proposes every change against the file, and your review decides what merges. See Configuration sources.

  • Plan: Plus plan.
  • Role: an organization admin, signed in as a person. Only people manage integrations: agents and API keys cannot create, edit or delete them.
  • A token for the provider, described below. Skep stores it encrypted and never shows it again.

Use a fine-grained personal access token, or a bot account’s token, limited to the repositories Skep should use:

Permission Access Used for
Metadata Read Repository lookups
Contents Read and write CODEOWNERS, registry files, config files, remediation branches and commits
Pull requests Read and write Opening pull requests
Commit statuses Read and write Registry check results

Instead of a token, you can use the Skep GitHub App, which also lets registry checks post as check runs. Install it into your GitHub organization from Integrations. GitHub asks you to authorize the installation and choose its repositories. Then add the integration with the installation ID and no token.

  1. Open Integrations and choose Add integration, then GitHub.
  2. Paste the token.
  3. Fill in:
    • Repositories: owner/name, one per line. CODEOWNERS is read and pull requests open here.
    • Service mapping: which directory holds each service, for example [{"service": "shop/*", "repository": "acme/shop", "path": "services/{name}"}]. service is a pattern over namespace/name or name, and the first matching entry wins. {name} expands to the service name. An optional base sets the branch pull requests target.
    • Registry repositories: owner/name:path, where path is the registry’s root directory.
    • API URL: for GitHub Enterprise Server, https://HOST/api/v3.
    • Skep URL: the address pull requests and checks link back to.
  4. Save. Skep checks that the token can read every repository before it saves.

The webhook carries registry checks, merged pull requests and pushes to config files. Without it, Skep polls pull requests every 15 minutes and reads config files on its sync interval.

  1. On the integration, choose Generate webhook secret and copy it. It is shown only once.
  2. In each repository, open Settings, then Webhooks, and add a webhook:
    • Payload URL: https://app.skep.observer/v1/integrations/github/webhook
    • Content type: application/json
    • Secret: the generated secret
    • Events: Pull requests and Pushes
  3. GitHub sends a ping. The delivery’s response is pong.

With the Skep GitHub App, there is no webhook to add: the App sends its events to Skep.

Every hour, Skep reads CODEOWNERS (from .github/, the root or docs/) in the mapped repositories and records the owners of each service’s directory. It follows GitHub’s rules: the last matching rule wins, a rule with no owners clears ownership, dir/ owns everything below it, and dir/* owns only files directly in dir. The team name is the slug: @acme/payments becomes payments, so it lines up with team.name resource attributes. Services then show an owner, and OWNERSHIP_UNKNOWN findings resolve.

From a finding, Open pull request (or the MCP tool open_remediation_pull_request) commits the fix to a branch named skep/<remediation id> and opens a pull request with the finding, its evidence and impact, and a link back to Skep.

Remediation Files in the pull request
Instrumentation change, policy exception, runbook .skep/remediations/<id>.md
Collector config patch .skep/remediations/<id>.collector.yaml
Pipeline rule .skep/remediations/<id>.pipeline-rule.yaml (a transform processor)
Registry diff The edited registry files, at their paths

People with the editor role open pull requests directly. Agents open them too by default, because CODEOWNERS and branch protection decide the merge. To make agents wait for a person instead, set Open pull requests to require approval under Agents, then Approvals, then Edit rules.

Asking again for the same remediation and repository returns the open pull request. After it merges, Skep waits for a new version of the service to show up in telemetry, then marks the pull request verified when the finding resolved, or not verified if the finding is still observed 24 hours later. It comments the verdict on the pull request once. Skep never takes the repository’s word that a fix worked.

Pull requests to a registry repository get a Skep registry check: a check run with the Skep GitHub App, otherwise a commit status named skep/registry. A check that cannot run posts as neutral, so a Skep outage never blocks a merge.

Works with gitlab.com and self-managed GitLab.

  1. Create a token. A personal, project or group access token. The read_repository scope reads config files and CODEOWNERS. Add api so Skep can open merge requests, comment on them and post commit statuses. A project or group token keeps merge requests under a bot user.

  2. Add the integration. Open Integrations, choose Add integration, then GitLab. Paste the token and fill in the GitLab URL (https://gitlab.com or your own), the projects (full paths such as acme/platform/collectors) and, for ownership, the service mapping ([{"service": "shop/*", "project": "acme/shop", "path": "services/{name}"}]). Skep checks that the token can read each project.

  3. Add the webhook (recommended). Generate a secret through the API. The response is the only time it is shown:

    Terminal window
    curl -X POST "https://app.skep.observer/v1/integrations/$ID/gitlab/webhook-secret" \
    -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{}'

    In each project, add a webhook to https://app.skep.observer/v1/integrations/gitlab/webhook with that secret token and the triggers Push events and Merge request events. Pushes then sync config at once, and merges are recorded without waiting for the 15 minute poll.

GitLab ownership reads the first CODEOWNERS file among the root, docs/ and .gitlab/. Sections work as in GitLab: each section’s last matching rule wins, sections add up, and an entry without owners takes the section’s default owners.

Skep reads collector and sampler config from any Git host over HTTPS or SSH. It never pushes: a proposed change is a patch you download and apply.

  1. Credentials.
    • HTTPS: a token with read access, sent as basic auth with the user name you set (git by default; some hosts want oauth2 or x-access-token). A public HTTPS repository needs no secret.
    • SSH: a read only deploy key, plus the host’s known_hosts line, which you check by hand. Skep never trusts a host key on first use.
  2. Add the integration. Open Integrations, choose Add integration, then Git repository (read only). List the clone URLs (https://..., ssh://... or git@host:path). Skep runs git ls-remote against each to check access.

Each sync is a shallow fetch of one ref into a temporary directory, removed afterward. Nothing is cloned permanently.

  1. Open Collectors, open the fleet, then the Config source tab.
  2. Under Source of truth, choose A git repository (pull requests).
  3. Choose the integration, the repository, the File path (for example collectors/gateway.yaml) and the Branch or ref. Empty means the default branch.
  4. Choose Save source. Skep reads the file once right away.

Only a human admin changes the source of truth, because it decides whether Skep pushes to collectors.

From then on, Skep reads the file every 10 minutes, on a push webhook, or when you choose Sync now. It compares the file with what each collector runs and with what Skep recommends, and raises findings when they differ:

  • CONFIG_SOURCE_DRIFT: collectors run something other than the file.
  • CONFIG_SOURCE_INVALID: the file cannot be parsed, or the Collector rejects it.
  • COLLECTOR_CONFIG_CHECK: the file lacks something Skep recommends, such as memory_limiter first in every pipeline or exporters that batch.

When you deploy a revision of that fleet (by hand, from a recipe stage, or from an approved agent request), Skep opens or updates one pull request (or merge request) on branch skep/fleet-<fleet>. It changes only what Skep manages in the file: its rule processors, the sampler, and memory_limiter first. Other components, comments and order stay as they are. With a read only Git host, download the patch from the Config source tab and apply it with git am or git apply.

After the merge, Skep waits for the fleet’s collectors to report the new configuration, then marks the revision deployed and comments the result. If they do not all run it within 7 days, the record is not verified.

An environment’s sampler can read its config from a repository the same way. See Sampling advisor.

  • The integration shows Last sync with a recent time and its sync stats: repositories, CODEOWNERS files found, services mapped and owned.
  • Services under Data show an owner from github_codeowners or gitlab_codeowners.
  • The GitHub webhook’s recent deliveries show pong for the ping.
  • A fleet’s Config source tab shows the file’s snapshot, its checks, and how many collectors are in sync.
What you see Why What to do
Saving fails with a repository error The token cannot read a listed repository or project Grant the token access, or remove the repository
403 tier_required Git providers need the Plus plan Upgrade the organization
502 github_error when opening a pull request GitHub refused the request Check the token’s Contents and Pull requests permissions and branch rules
502 git_error on Sync now The Git host failed or refused the read Check the URL, the credentials and, for SSH, known_hosts
Webhook deliveries get 401 invalid_signature The secret in the repository does not match Generate or rotate the secret and paste it again
A registry check is neutral The check could not run. The error is recorded on the check Open the integration’s recent checks
Services have no owner No mapping matches the service, or CODEOWNERS names nobody for its directory Check the service mapping and the sync stats
The last sync failed The integration shows the error under Last sync failed Fix the cause and choose Sync now

Skep · Security · Changelog · Privacy