Skip to content

GitHub App Permissions

Shoehorn uses GitHub Apps for repository discovery, manifest reading, and workflow automation. Two apps are involved: the main Shoehorn app and the optional Shoehorn Forge app.

The main app is mostly read-only and handles discovery. The Forge app has write access for self-service workflows: creating repositories, scaffolding files, and opening pull requests. Separating them follows least privilege so most installations only need the main app.

The main app handles repository discovery, manifest reading, README fetching, ownership inference, and engineering insights.

Read access to:

PermissionPurpose
Repository: MetadataList repositories, read default-branch info
Repository: ContentsRead manifests (.shoehorn/**/*.yml), READMEs, changelogs (read covered via “code” below)
Repository: Custom propertiesRead repository-level custom properties
Repository: Dependabot alertsSurface dependency vulnerabilities per entity
Repository: Dependabot secretsSync Dependabot secrets metadata
Repository: DeploymentsShow deployment history alongside entities
Repository: IssuesTrack issue activity for engineering insights
Repository: Pull requestsTrack PR activity for engineering insights
Repository: Secret scanning alertsSurface secret-scanning findings per entity
Repository: Security eventsSurface CodeQL and other security events
Repository: ActionsRead GitHub Actions run history
Organization: MembersSync organization membership for team mapping
Organization: AdministrationDiscover org-level settings
Organization: Custom propertiesRead org-level custom properties
Organization: EventsSubscribe to org-level events

Read and write access to:

PermissionPurpose
Repository: AdministrationManage repository settings the platform owns (topics, default branch, branch protection)
Repository: CodeRead repository contents; write only when an admin action explicitly changes a file
EventPurpose
pushDetect manifest changes on the default branch
repositoryDiscover new repositories, track deletions
pull_requestPR workflow events for insights and notifications

After creating and installing the GitHub App, configure Shoehorn:

Terminal window
GITHUB_APP_ID=123456
GITHUB_APP_INSTALLATION_ID=789012
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n..."
GITHUB_ORGANIZATIONS=your-org

Store credentials in Kubernetes secrets:

Terminal window
kubectl create secret generic integration-credentials \
--from-literal=github_app_id="123456" \
--from-literal=github_app_installation_id="789012" \
--from-file=github_app_private_key=private-key.pem

The Forge app powers self-service workflows: creating repositories, scaffolding files, opening pull requests, and triggering workflows.

Read access to:

PermissionPurpose
Repository: Commit statusesCheck status of commits Forge has touched
Repository: MetadataList repositories, default-branch info
Organization: MembersResolve mold input that targets a team or user

Read and write access to:

PermissionPurpose
Repository: AdministrationCreate repositories, set topics, configure branch protection
Repository: CodeScaffold and update files from mold templates
Repository: Custom propertiesSet repository-level custom properties from molds
Repository: Pull requestsOpen PRs for review-based scaffolding workflows
Repository: ActionsTrigger workflows defined in molds
Repository: WorkflowsWrite workflow files (.github/workflows/*.yml) from molds
Terminal window
GITHUB_FORGE_APP_ID=234567
GITHUB_FORGE_INSTALLATION_ID=890123
GITHUB_FORGE_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n..."

Store credentials in Kubernetes secrets:

Terminal window
kubectl create secret generic integration-credentials \
--from-literal=github_forge_app_id="234567" \
--from-literal=github_forge_installation_id="890123" \
--from-file=github_forge_private_key=forge-private-key.pem
  1. Go to your GitHub organization settings
  2. Navigate to Developer settings > GitHub Apps > New GitHub App
  3. Fill in the app details:
SettingMain AppForge App
App nameShoehornShoehorn Forge
Homepage URLhttps://shoehorn.example.comhttps://shoehorn.example.com
Webhook(uncheck “Active”)(uncheck “Active”)
  1. Set the permissions as listed above
  2. Click Create GitHub App
  3. Generate a private key and download it
  1. From the app settings page, click Install App
  2. Select your organization
  3. Choose All repositories or select specific ones
  4. Click Install

Repeat for both apps if using Forge.

CapabilityMain AppForge App
Read manifests and READMEsYes-
List repositories and topicsYes-
Sync org membershipYesYes
Surface Dependabot, code scanning, secret scanning findingsYes-
Track PR, issue, deployment, Actions activityYes-
Manage repository settings (topics, branch protection)YesYes
Create repositories-Yes
Create or update files-Yes
Open pull requests-Yes
Trigger and write workflow files-Yes
secrets:
integrations:
secretRef:
name: integration-credentials
keys:
githubAppId: github_app_id
githubAppInstallationId: github_app_installation_id
githubAppPrivateKey: github_app_private_key
githubForgeAppId: github_forge_app_id
githubForgeInstallationId: github_forge_installation_id
githubForgePrivateKey: github_forge_private_key

Configure the GitHub API rate limit budget:

Terminal window
GITHUB_RATE_LIMIT_PER_HOUR=1000 # Default
GITHUB_CONCURRENT_REPOS=5 # Max concurrent repo crawls
GITHUB_CACHE_TTL_MINUTES=15 # Cache TTL for API responses

The crawler distributes API calls across the budget to avoid hitting GitHub’s rate limits.