GitHub Integration Setup
Connect your GitHub repositories to Cloudgeni for Infrastructure as Code scanning, automated pull request reviews, and continuous security monitoring.What You'll Get
- Automatic IaC scanning on every commit and pull request
- AI-powered security reviews with detailed feedback
- Remediation pull requests with validated fixes
- Repository security dashboard with trends and insights
- Team collaboration with security findings and discussions
Prerequisites
Before You Start
Before You Start
- GitHub account with admin access to repositories
- Cloudgeni account (free trial available)
- Repositories containing Infrastructure as Code files:
.tf
files (Terraform).bicep
files (Azure Bicep)- Pulumi projects (any language)
.yaml
/.yml
CloudFormation templates
- Time estimate: 5 minutes
Step 1: Install Cloudgeni GitHub App
GitHub App Installation
GitHub App Installation
- From Cloudgeni Dashboard:
- Go to “Integrations” > “Add Integration”
- Select “GitHub”
- Click “Install GitHub App”
- GitHub Authorization:
- Choose your GitHub account or organization
- Select repository access:
- “All repositories” (recommended for full coverage)
- “Selected repositories” (choose specific IaC repositories)
- Review permissions and click “Install & Authorize”
- Return to Cloudgeni:
- You’ll be redirected back to Cloudgeni
- Confirm the integration shows as “Connected”
The GitHub App requires read access to repository contents and write access to create pull requests and comments.
Step 2: Configure Repository Settings
Repository Configuration
Repository Configuration
For each connected repository:
- In Cloudgeni Dashboard:
- Navigate to “Repositories”
- Find your GitHub repository
- Click “Configure”
- Scan Settings:
- Scan Triggers:
- ✅ On Push (scan every commit)
- ✅ On Pull Request (review PRs automatically)
- ✅ Manual Scan (on-demand scanning)
- File Types:
- ✅ Terraform (
.tf
,.tfvars
) - ✅ Azure Bicep (
.bicep
) - ✅ Pulumi (detect by project files)
- ✅ CloudFormation (
.yaml
,.json
)
- ✅ Terraform (
- Scan Triggers:
- Branch Configuration:
- Default Branch:
main
ormaster
- Protected Branches: Branches requiring PR reviews
- Exclude Patterns:
node_modules/
,.git/
,*.tmp
- Default Branch:
- Click “Save Configuration”
Step 3: Test the Integration
Verify GitHub Integration
Verify GitHub Integration
Manual Scan Test:
- In Cloudgeni, go to your repository
- Click “Scan Now”
- Wait 30-60 seconds for completion
- Review scan results for IaC security findings
- Create a test branch in your repository
- Make a small change to a
.tf
or.bicep
file - Open a pull request
- Within 2-3 minutes, Cloudgeni should comment with:
- Security analysis results
- New findings introduced
- Compliance impact assessment
- Remediation suggestions
Sample PR Comment
🛡️ Cloudgeni Security Review✅ No new critical findings
⚠️ 1 medium severity finding
- S3.8: Bucket allows public read access
- File:
infrastructure/storage.tf:12
- Impact: Data exposure risk
- Fix: Add public access block
- File:
Step 4: Enable Advanced Features
Advanced GitHub Integration
Advanced GitHub Integration
Branch Protection Rules:Webhook Configuration (Advanced):
- In GitHub, go to Settings > Branches
- Add rule for your default branch
- Enable “Require status checks”
- Add “cloudgeni/security-scan” as required check
- Enable “Require branches to be up to date”
- Custom webhook endpoints for internal systems
- Slack/Teams notifications on findings
- JIRA ticket creation for critical issues
Repository Security Dashboard
Monitor Repository Health
Monitor Repository Health
Your repository dashboard provides:Security Metrics:
- Total findings by severity
- Security debt trends over time
- Compliance score by framework
- Remediation success rate
- Finding assignments and status
- Pull request security reviews
- Comment threads and discussions
- Integration with GitHub Issues
- Scan frequency and coverage
- Auto-remediation success rate
- Branch protection compliance
- CI/CD integration health
Multiple Organization Setup
GitHub Organizations
GitHub Organizations
For GitHub Organizations:
- Install the Cloudgeni app at the organization level
- Grant access to all or selected repositories
- Configure team permissions in Cloudgeni:
- Admins: Full access to all repositories
- Developers: Read/write access to assigned repositories
- Security Team: Read access to all findings
- Different scan policies per team
- Custom remediation workflows
- Escalation rules for critical findings
- Integration with GitHub Teams
Troubleshooting
Common Issues & Solutions
Common Issues & Solutions
App Installation Fails:
- Ensure you have admin permissions on the repository/organization
- Check that third-party app restrictions aren’t blocking installation
- Verify Cloudgeni domains aren’t blocked by corporate firewall
- Confirm repository contains supported IaC files (
.tf
,.bicep
, etc.) - Check that files aren’t in excluded directories
- Verify webhook delivery in GitHub Settings > Webhooks
- Check Cloudgeni has write permissions to the repository
- Verify webhook is configured and receiving events
- Ensure PR originates from a branch (not fork) for security reviews
- Review Cloudgeni scan logs for detailed error messages
- Check API key configuration in GitHub Actions
- Verify branch protection rules are correctly configured
- Re-authorize the GitHub App with updated permissions
- Check organization security policies
- Verify repository access hasn’t been revoked
What’s Next?
Enable PR Reviews
Set up automated security reviews for all pull requests
GitLab Integration
Add GitLab repositories for multi-platform coverage
Custom Policies
Create organization-specific security and compliance rules
CI/CD Integration
Integrate security scanning into your deployment pipeline
Need Help?
Having Issues?
- Installation problems? Check our GitHub Troubleshooting Guide
- Webhook not working? Verify in GitHub Settings > Webhooks > Recent Deliveries
- Missing repositories? Re-install the app with broader permissions
- Enterprise GitHub? Contact enterprise@cloudgeni.io for setup assistance