Configuring Chainguard Guardener
Understand Chainguard Guardener's .chainguard/ configuration model and how to enable features per repository.
For the complete documentation index, see llms.txt.
Chainguard Guardener acts on your GitHub repositories on behalf of your Chainguard organization. The bridge between the two is a connection: a Guardener GitHub App installation on a GitHub organization, linked to a Chainguard organization. This page explains how connections work and how to set up, inspect, change, and remove them.
For a first-time walkthrough, refer to Getting Started. This page is the fuller reference for managing connections over time.
Note: Chainguard Guardener is in beta. Available to organizations that have installed and linked the Chainguard Guardener GitHub App.
A connection has two halves, one on each side:
The two halves do different jobs. Installing the app is enough for the Guardener to start responding on public repositories — each feature still has to be enabled with a configuration file, but no link is needed. The link adds the Chainguard side: it attributes the activity to your Chainguard organization and unlocks the features that need one, such as covering private repositories (subject to the repository visibility scope) and group-scoped operations like triggering an Actions migration with chainctl. Linking fails if the app is not installed.
A few rules govern connections:
The chainctl guardener github commands check permissions on both sides of the connection:
| Action | Requires |
|---|---|
Link (link) | Both: the guardener.association.manage capability on the Chainguard organization (held by owners), and ownership of the GitHub organization. |
List connections (status) | The guardener.association.list capability on the Chainguard organization. |
Unlink (unlink) | Either: the guardener.association.manage capability on the Chainguard organization, or ownership of the GitHub organization (refer to Removing a connection). |
Refer to the Built-in Roles and Capabilities Reference for how capabilities map to roles.
Commands that prove GitHub organization ownership (link, and the fallback path of unlink) open a browser window to authorize with GitHub. Listing connections with status is read-only and never involves a browser.
Install the app on the GitHub organization whose repositories the Guardener should manage:
Installing the app does not change any repository on its own. Every Guardener feature stays disabled until you opt in with a configuration file, as described in Configuration.
Run chainctl guardener github link, passing the GitHub organization login and your Chainguard organization name:
chainctl guardener github link \
--github-org <github-org-login> \
--group <organization-name>If you omit --group, chainctl prompts you to select from the Chainguard organizations you have access to.
A browser window opens to authorize with GitHub; completing it proves that you own the GitHub organization. On success, chainctl prints the linked organization and its installation ID:
Linked GitHub organization "example-org" to group example.com (installation 12345678).Note: The first time an organization links a GitHub organization,
chainctlprompts you to accept the Chainguard Guardener Terms of Service and Data Privacy Agreement on behalf of your organization. Acceptance is recorded once per organization and covers subsequent links.
If the browser flow cannot use its default local port (8989), pass a different one with --port.
List the connections for your Chainguard organization:
chainctl guardener github status --group <organization-name>The linked GitHub organization should appear in the output, as described in the next section.
chainctl guardener github status lists every GitHub organization linked to a Chainguard organization:
Repository visibility scope: PUBLIC (default; public repositories only)
ORGANIZATION INSTALLATION ID SETTINGS
example-org 12345678 https://github.com/settings/installations/12345678Above the connection list, status prints the organization’s repository visibility scope, which controls which repositories the Guardener responds to across all of the organization’s connections:
The visibility scope is managed by Chainguard. If you need the Guardener to cover private repositories, contact Chainguard support to have your organization’s scope updated.
Note: Reading the visibility scope requires the
guardener.entitlement.listcapability. Without it,statusstill lists your connections and prints a warning that the scope was skipped.
Repository access is controlled on the GitHub side, by the app installation. To change it:
chainctl guardener github status, or your GitHub organization’s Settings → GitHub Apps page.No change on the Chainguard side is needed; the existing link continues to apply to whatever the installation can access. Remember that access alone does nothing — each repository still needs a .chainguard/ configuration file (or an org-level default) to enable a feature, and the repository visibility scope still applies.
Because a GitHub organization can be linked to only one Chainguard organization at a time, moving it is an unlink followed by a link:
chainctl guardener github unlink \
--github-org <github-org-login> \
--group <old-organization>
chainctl guardener github link \
--github-org <github-org-login> \
--group <new-organization>The GitHub App installation is untouched by the move; only the Chainguard-side association changes.
To remove a connection, unlink the GitHub organization:
chainctl guardener github unlink \
--github-org <github-org-login> \
--group <organization-name>Unlinking accepts either side’s authority:
--group and hold the guardener.association.manage capability on that organization, the unlink completes with no browser involved.chainctl falls back to the GitHub authorization flow, and proving that you own the GitHub organization is sufficient. You must still be logged in to Chainguard (chainctl auth login), but no access to the linked organization is required.Unlinking removes only the Chainguard-side half of the connection: the Guardener stops covering the organization’s private repositories and group-scoped operations, but features enabled on public repositories keep working for as long as the app remains installed. To stop the Guardener entirely, also uninstall the GitHub App from your GitHub organization’s Settings → GitHub Apps page. Uninstalling the app without unlinking also stops the Guardener, but leaves a dangling association behind; prefer unlinking first.
“the guardener GitHub App must be installed on the GitHub account (organization or user) before it can be linked”
Linking checks for an existing installation. Install the app on the GitHub organization (Step 1), then run link again.
“that GitHub organization is already linked to a different Chainguard group” Each GitHub organization can be linked to only one Chainguard organization. Unlink it from its current organization first — anyone who owns the GitHub organization can do this, even without access to the current Chainguard organization (refer to Removing a connection).
The browser authorization fails or never completes
The GitHub flow requires that you are an owner of the GitHub organization; membership alone is not enough. If the local callback port is in use, re-run the command with --port <port>. The flow times out after a few minutes — re-run the command to try again.
status shows the connection but the Guardener isn’t doing anything
A connection alone changes nothing. Check that the repository is covered by the installation’s repository access, that its visibility matches your repository visibility scope, and that the feature you expect is enabled by a .chainguard/ configuration file (refer to Configuration).
For the complete set of flags and options, refer to the chainctl reference:
chainctl guardenerchainctl guardener githubchainctl guardener github linkchainctl guardener github unlink.chainguard/ configuration files.Last updated: 2026-08-03 00:00