GitHub Integration
The GitHub integration enables Cloud ex Machina to automatically create issues and pull requests in your GitHub repositories with infrastructure as code (IaC) improvements and cost optimization recommendations.
GitHub uses a GitHub App installation model, meaning the integration is tied to your GitHub organization, not to any individual user. The integration continues working even if the person who installed it leaves the company, and all activity is clearly attributed to the Cloud ex Machina app in audit logs.
Prerequisites
- GitHub: Owner or Admin permissions in your GitHub organization
- Cloud ex Machina: Admin access to your tenant
Installing the GitHub App
Step 1: Connect in Cloud ex Machina
- Sign in to your Cloud ex Machina tenant
- Navigate to Settings > Integrations
- Find GitHub AI Agent in the list of available integrations
- Click Connect

Step 2: Authorize on GitHub
When you click Connect, you'll be redirected to GitHub:
-
Select your organization where you want to install the app
-
Choose repository access:
- All repositories: Grant access to all current and future repositories
- Only select repositories: Choose specific repositories (recommended)
-
Review permissions and click Install & Authorize
- Read access: Repository metadata, code, issues
- Write access: Issues, pull requests
Step 3: Configure in Cloud ex Machina
After authorization, you'll be redirected back to Cloud ex Machina:
-
Configure settings:
- Default Repository: Primary repository for issues and pull requests
- Issue Labels: Default labels for automatically created issues
- Pull Request Settings: Reviewer assignments, draft mode, etc.

-
Click Update Configuration to save and activate the integration
Managing Repository Access
To update which repositories Cloud ex Machina can access:
- In GitHub, go to Settings > GitHub Apps > Cloud ex Machina
- Click Configure
- Add or remove repositories
- Click Save
Changes take effect immediately.
How the AI Agent Uses GitHub
Once configured, the Cloud ex Machina AI agent can:
-
Create issues for cost optimization opportunities with detailed descriptions, expected savings, and recommended actions
-
Generate pull requests that implement cost optimizations in your IaC code with clear commit messages and impact descriptions

-
Analyze pull requests to identify potential cost impacts of infrastructure changes before they're merged
Revoking Access
To uninstall the GitHub App:
- Navigate to your GitHub organization's Settings > GitHub Apps
- Click Configure next to Cloud ex Machina
- Scroll to the bottom and click Uninstall
Uninstalling immediately revokes all access and stops automated issue/PR creation. This can be reversed by reinstalling.
Troubleshooting
AI Agent Can't Create Pull Requests
- Verify the app has write access to the target repository in Settings > GitHub Apps > Configure
- Check that branch protection rules allow the app to create branches
- Confirm the default branch in Cloud ex Machina settings matches your repository
Issues Not Being Created
- Verify the target repository is in the app's access list (Settings > GitHub Apps > Configure)
- Check integration settings in Cloud ex Machina to ensure issue creation is enabled
- Ensure the app has "Issues: Write" permission
App Installation Failed
- Verify you have Owner or Admin permissions in the GitHub organization
- Check that your organization allows third-party app installations in Settings > Third-party application access policy
Security Best Practices
- Limit repository access to only repositories where Cloud ex Machina needs to operate
- Enable branch protection on critical branches to require review for all PRs, including AI-generated ones
- Review generated pull requests carefully before merging
- Monitor app activity through GitHub's audit logs (Settings > Audit log)
- Document the integration so other organization admins understand why it's installed
Next Steps
- Learn about other available integrations in Integrations Overview
- Review GitLab Integration or ServiceNow Integration for additional workflows