Skip to main content

Eigenoid (Settings Bot)

Declarative GitHub org configuration via safe-settings. Manages repo defaults, rulesets, labels, and teams.

Technical details

FieldValue
TypeB (with code -- container on Cloud Run)
App ID3424955
Slugeigenoid-settings-bot
InstallationEntire org (repository_selection: all)
Admin repoeigenoid/platform-settings
RuntimeCloud Run (eigenoid-safe-settings in europe-west1, project eigenoid-prd)
Imageghcr.io/github/safe-settings v2.1.20-rc.3, mirrored to Artifact Registry
IaCeigenoid/iac-platform (Terraform, ADR-0013)
Estimated cost~$5--10/month (min-instances=1)

Permissions (Repository)

PermissionLevelReason
AdministrationRead & WriteApply repo settings (private, wiki, merge strategy, etc.)
ChecksRead & WriteCreate check-runs with sync results
ContentsRead & WriteRead config YAML from the admin repo
EnvironmentsRead & WriteManage environments declaratively
IssuesRead & WriteManage labels
MembersRead & WriteManage team-to-repo assignments
Pull requestsRead & WriteDry-run checks on PRs to the admin repo
StatusesRead & WriteCommit status updates
Actions variablesRead & WriteManage Actions variables

Permissions (Organization)

PermissionLevelReason
Organization AdministrationRead & WriteCreate/modify org-level rulesets
Organization EventsReadRead org events

Usage as an auth token in workflows

Beyond running safe-settings, the bot is used as a token source for the governance workflows in the admin repo (repo creation, archival, and deletion). This ensures that PRs and commits from those workflows are authored by eigenoid-settings-bot[bot].

How it works

Workflows use actions/create-github-app-token to generate an installation token:

- uses: actions/create-github-app-token@vX.Y.Z # SHA-pinned
id: bot-token
with:
client-id: ${{ vars.SETTINGS_BOT_CLIENT_ID }}
private-key: ${{ secrets.SETTINGS_BOT_PRIVATE_KEY }}
yaml
client-id, not app-id

Use client-id (not app-id). The Client ID is a public value stored as an Actions variable, not a secret.

Credentials stored in platform-settings

NameTypeValue
SETTINGS_BOT_CLIENT_IDVariableIv23liClNzXyH4NbQRO9
SETTINGS_BOT_PRIVATE_KEYSecretPrivate key PEM for the bot

Workflows that use it

WorkflowPurpose
approve-repo.ymlGenerates config YAML and pushes to main when a repo is approved
archive-repo.ymlArchives the repo and moves its config (Phase 1 soft-delete)
delete-archived-repos.ymlCRON: deletes repos after 30 days (Phase 2)

Webhook events (9)

EventPurpose
pushPrimary trigger: sync config when the admin repo is pushed
repositoryDetect repo changes (name, visibility)
repository_rulesetDrift prevention: revert manual ruleset changes
branch_protection_ruleDrift prevention: revert branch protection changes
pull_requestDry-run on PRs to the admin repo
check_runCheck run processing
check_suiteCheck suite processing
memberDetect membership changes
teamDetect team changes

Private key rotation

  1. Go to github.com/organizations/eigenoid/settings/apps/eigenoid-settings-bot and navigate to Private keys.
  2. Click Generate a private key and download the new .pem file.
  3. Update the secret in GCP Secret Manager:
    gcloud secrets versions add safe-settings-private-key \
    --data-file=<path-to-new-pem> \
    --project=eigenoid-prd
    bash
  4. Update the Cloud Run service to use the new version:
    gcloud run services update eigenoid-safe-settings \
    --region europe-west1 \
    --project eigenoid-prd \
    --update-secrets "PRIVATE_KEY=safe-settings-private-key:latest"
    bash
  5. Delete the old key on the app page under Private keys.
  6. Verify: push a change to the admin repo and confirm the sync works.
warning

The private key must be raw PEM (starts with -----BEGIN RSA PRIVATE KEY-----). Do not base64-encode it.

For the full secret rotation procedure, see the safe-settings operations runbook.

Human owner

@shoootyou is responsible for this App. Contact them for permission changes, installations, or incidents.