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
Guidelines as Code
Learn how to sync engineering standards directly from your repository
While you can create guidelines via the Pandorian Dashboard, many high-velocity teams prefer to manage their standards directly within their code repositories. This “Guidelines as Code” approach allows you to treat your engineering requirements as “breathing documentation” that evolves alongside your features. If your team already uses tools like Claude Skills or internal markdown files to guide AI coding assistants, you can sync those same files to Pandorian. This ensures that the rules your AI uses to write code are the exact same rules Pandorian uses to validate code at the Pull Request level / Full Codebase scans.
How it Works
- Source Selection: In the ‘Integrations’ tab you designate a specific repository and a “base directory” (e.g.,
/docs/guidelines) where your standards live. - Automated Sync: Pandorian monitors this directory for
.mdfiles. - Enforcement: Any change to these files triggers an update in Pandorian upon every merge to the main branch. These updated guidelines are then immediately enforced across all your associated repositories during scans.
File Structure & Metadata
To be recognized by Pandorian, each Markdown file must contain a YAML frontmatter block. This block includes apandorian-metadata section that maps the file to the Pandorian engine.
Required Metadata Attributes
| Attribute | Type | Description |
|---|---|---|
id | string | A unique identifier for the guideline (e.g., scala-expert). |
language | string | The target language (e.g., scala, python, etc). |
title | string | The clear, actionable name of the rule. |
priority | string | The importance level (e.g., high, medium, low). |
category | string | The area of focus (e.g., security, performance, architecture). |
is_active | boolean | Toggle whether this guideline is currently being enforced. |
tags | list | A list of strings for easier filtering and organization. |
Supported Categories
Thecategory attribute must match one of the following supported values:
- Architecture
- Code Quality & Maintainability
- Reliability & Resilience
- Performance & Scalability
- Security
- Data & Storage
- Infrastructure & Environments
- Observability
Supported Languages
Thelanguage attribute must match one of the following supported values:
- c
- cobol
- cpp
- csharp
- dockerfile
- elixir
- go
- haskell
- java
- javascript
- kotlin
- lua
- perl
- php
- python
- ruby
- rust
- scala
- swift
- terraform
- typescript
Implementation Example
Create a file namedscala-expert.md in your designated guidelines directory:
Configuration Steps
- Navigate to Integrations > Connections > Github in the Pandorian Platform
- Select the repository containing your
.mdfiles - Provide the top-level directory path (e.g.,
/docs/guidelines) - Save to trigger an initial scan and import your guidelines
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
Policy as Code
Policy as Code lets you configure repository-level enforcement policy directly in Git, so Pandorian knows which guidelines to run and when to block pull requests - without requiring you to set these rules outside your codebase. The policy is defined inside the repo (using the.Pandorian/.policy file), and we apply it on every full / PR scan.
Example Policy
What this configuration means
- Scan scope: Scan this repository only for guidelines tagged with
v2. - Enforcement: For scan results, Pandorian uses severity thresholds to decide when to block the PR (merge-gating).
- High: Block when there are more than 1 High findings.
- Critical: Block when there are more than 2 Critical findings.
- Medium: Block when there are more than 5 Medium findings.
Repository Policy Schema
The following schema defines the policy rules available for a specific repository.Comprehensive Configuration Example
This example demonstrates a full.Pandorian/.policy file configuration including guideline tagging, severity thresholds, and exclusion rules.
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: support@pandorian.ai (Pro and Enterprise tiers only)
