GitHub App & Pull Request Scanning
The fastest way to enforce guidelines is through automatic PR scanning via the GitHub App.How PR Scanning Works
Once you install the Pandorian GitHub App (done during initial setup), you control PR scanning at the guideline level. This means you explicitly choose which guidelines should run automatically on pull requests. What happens during a PR scan:- Developer opens or updates a pull request
- Pandorian scans only the modified files against guidelines configured for PR scanning
- Violations appear in two places:
- Inline comments on specific lines of code where violations occur
- Summary comment on the PR with an overview of all violations found
- The PR check appears in GitHub’s status checks (can be configured as required or optional)
Configuring Which Guidelines Run on PRs
PR scanning is controlled at the individual guideline level, giving you granular control over what gets enforced and when. When creating or editing a guideline:- Navigate to the Guidelines page
- Create or edit a guideline
- Look for the Enforce On field (or scan level configuration)
- Choose the scope:
- Full Scan - Runs only during manual full repository scans
- Repository Scan - Runs during repository scans (same as Full)
- PR Scan - Runs automatically on every pull request
- All - Runs on both full scans and PR scans (recommended for most guidelines)
Managing PR Scan Results
When violations are found on a PR: Inline Comments:- Appear directly on the lines of code that violate guidelines
- Include the guideline name, severity, and brief explanation
- Link back to the full guideline in Pandorian dashboard
- Posted at the PR level with a complete list of violations
- Grouped by file and guideline
- Includes violation counts and severity breakdown
- Appears in GitHub’s checks section
- Can be configured as a required check to block merges (recommended)
- Links to detailed scan results in Pandorian dashboard
Repository-Level Configuration
To adjust which repositories use PR scanning:- Navigate to the Repositories page in Pandorian
- Find your repository
- Toggle PR scanning on/off (enabled by default)
- Configure whether PR scan failures should block merges (in GitHub’s branch protection rules)
CI/CD Integration
For teams that want custom enforcement workflows, Pandorian provides an API for direct integration into CI/CD pipelines.Integration Method
Pandorian uses direct API calls to trigger scans and retrieve results. This gives you full control over:- When scans run (on commit, nightly, before deploy, etc.)
- How failures are handled (block pipeline, send notifications, generate reports)
- Which guidelines to enforce in different environments
GitHub Actions Integration
Here’s an example workflow that runs Pandorian scans on every push and blocks the pipeline if violations are found:- Generate an API key from Pandorian dashboard (Settings → API Keys)
- Add secrets to your GitHub repository:
PANDORIAN_API_KEYPANDORIAN_ORG_ID
- Commit the workflow file to
.github/workflows/pandorian.yml
CircleCI Integration
Blocking vs Reporting Mode
Blocking Mode (recommended for production):- Pipeline fails if violations are found
- Prevents non-compliant code from being deployed
- Set exit code 1 when violations > 0
- Pipeline continues regardless of violations
- Scan results logged for visibility
- Set exit code 0 always, just log violations
Slack Integration
Get notified when scans complete and violations are found.Setting Up Slack Notifications
- Navigate to Settings → Integrations in Pandorian dashboard
- Click Connect Slack
- Authorize Pandorian to access your Slack workspace
- Choose which channel receives notifications
- Configure notification preferences:
- Scan completion (all scans or only failed scans)
- New violations found
- Scan summary reports
Notification Types
Scan Completion:- Triggered when any scan finishes
- Includes violation count, severity breakdown, and link to results
- Alerts when new violations are introduced (PR scans)
- Shows file paths and guideline names
- Aggregated reports of organization-wide compliance
- Trends and improvement metrics
Enforcement Layer Positioning
Pandorian is designed as an enforcement layer that sits above your development tools—agnostic to how code is written (Cursor, Windsurf, manual reviews, AI review tools) and flexible in how it’s integrated.Integration Models
Model 1: Parallel to CI/CD- Pandorian runs alongside your existing CI/CD pipeline
- Catches issues that traditional linters and tests miss
- Works as an additional required check before merge
- Pandorian integrated directly into your pipeline (via API)
- Runs after tests, before deployment
- Blocks deployment if critical violations found
- Simplest setup—no CI/CD configuration required
- Automatic enforcement on all pull requests
- Developers see violations immediately in their workflow
VS Code Extension (Coming Soon)
We’re building a VS Code extension that will bring Pandorian directly into your editor: Planned Features:- Real-time guideline enforcement as you write code
- Inline suggestions and quick fixes
- Browse and search your organization’s guideline catalog
- One-click scanning of open files or workspace
- Integration with AI coding assistants
Best Practices
Start with PR Scanning: Enable automatic PR scanning first—this gives developers immediate feedback without additional configuration. Use CI/CD for Critical Paths: Add CI/CD integration for production deployments where you need absolute enforcement. Configure Severity Appropriately:- High severity → Block merges/deployments
- Medium severity → Require review/acknowledgment
- Low severity → Report only, don’t block
Troubleshooting
PR scans not running:- Verify GitHub App is installed for the repository
- Check that guidelines have PR Scan enforcement enabled
- Confirm repository has PR scanning active (Repositories page)
- Verify API key is valid and has correct permissions
- Check API endpoint URLs are correct
- Ensure scan completion polling doesn’t timeout
- Refine guideline descriptions to be more specific
- Adjust enforcement scope (Full vs PR vs All)
- Contact support for guideline tuning assistance (Pro and Enterprise tiers only)
Need Help?
- API documentation: API Reference
- Guideline management: Managing Guidelines
- Contact support: [email protected] (Pro and Enterprise tiers only)
