# Core Concepts Source: https://docs.pandorian.ai/essentials/pandorian-core-concepts Understanding how Pandorian works ## What is a Guideline? A guideline is a software development rule or best practice written in natural language that explicitly declares an allowed or disallowed pattern — for example, "Always require..." or "Never allow\...". Guidelines are defined in Pandorian and subsequently enforced across your codebase. ### Anatomy of a Guideline Every guideline consists of: **Title:** A clear, actionable name that describes the rule (e.g., "Database Queries Must Use Parameterized Statements" or "Microservices Must Own Their Data Storage") **Description:** The rule written in natural language — what should or shouldn't happen in the code, including context, reasoning, and any exceptions. You can enrich the description with: * **Good examples** showing compliant patterns * **Bad examples** showing what to avoid * Specific frameworks, libraries, or internal conventions to reference * Any existing Markdown file can be pasted directly into the description **Tags:** Metadata that allows you to assign and scope each guideline. **Category:** The area of focus, such as Security, Architecture, Performance, or API Design. See the [full category list](https://docs.pandorian.ai/essentials/pandorian-integrations#supported-categories) below. **Enforcement Mode:** **Block** to block CI/CD and prevent merge on violation, or **Monitor** to surface violations without blocking development. **Languages:** Scopes the guideline to specific languages. Pandorian supports 20+ languages including Python, Java, JavaScript, TypeScript, Go, Scala, and more. [See all supported languages.](https://docs.pandorian.ai/essentials/pandorian-integrations#supported-languages) **Dynamic Context Providers (optional):** Connect external data sources to your guideline so enforcement stays in sync with your real-world configuration. Instead of hardcoding lists into the description, Pandorian fetches live context at scan time — for example, an approved library allowlist from your internal registry, or a list of sanctioned API routes from your API gateway. See [Dynamic Context Providers](https://docs.pandorian.ai/essentials/pandorian-integrations#dynamic-context-providers). ### Guideline Examples **Security:** *"All database operations must use parameterized queries instead of string concatenation to prevent SQL injection attacks. Never concatenate user input directly into SQL strings."* **Performance (C#):** *"Long-running operations must implement graceful cancellation using CancellationToken with periodic checks using ThrowIfCancellationRequested() within bounded time periods."* **Reliability & Resilience:** *"Systems must maintain partial functionality during network partitions using circuit breakers, fallback mechanisms, and feature toggles that preserve core services."* Guidelines capture your team's standards, architectural decisions, security requirements, and performance best practices in a centralized, enforceable format. They work across your entire tech stack and automatically adapt to your codebase's specific context. *** ## Scans Pandorian offers two scan modes depending on what you need. **PR Scan:** Analyzes only the changes introduced in a pull request. Runs via your source control integration (GitHub, GitLab, or Azure DevOps). Violations are flagged in the Pandorian UI for engineering managers to review and analyze, posted as inline comments on the PR, and surfaced as a status check in CI. *When is this used:* This is the day-to-day operating mode for Pandorian customers — enforcing guidelines on new code as it is written. **Full Repo Scan:** Analyzes an entire repository against selected guidelines. *When is this used:* For audits, onboarding new repositories, or getting a complete picture of where your codebase stands against your guidelines. *** ## Violations A violation is the result of scanned code that violates a guideline. Each violation includes the file path, line range, and an explanation of why the code violates the guideline. *** ## Enforcement Pandorian supports two enforcement modes: **Monitor** — surfaces violations for visibility without interrupting development. **Block** — blocks CI/CD pipelines and prevents merge when a violation is detected. # Guides Source: https://docs.pandorian.ai/essentials/pandorian-guides Practical guides for managing, scoping, enforcing, and administering Pandorian guidelines Pandorian helps engineering teams turn their standards into enforceable rules across repositories and pull requests. This guide covers the main workflows for managing guidelines, scoping where they apply, enforcing them in scans and pull requests, and onboarding your team. ## Manage Use these workflows to create, import, organize, and enrich the guidelines that Pandorian enforces. ### Creating a Guideline from Scratch Create a custom guideline when you want Pandorian to enforce a rule that is specific to your engineering organization, architecture, frameworks, internal libraries, or coding standards. To create a guideline: 1. Navigate to the **Guidelines** page. 2. Click **+ New Guideline**. 3. Select **Guideline**. 4. Fill in the required fields. 5. Click **Save changes**. A guideline includes the rule Pandorian should enforce, the language or languages it applies to, and the enforcement behavior. Required fields include: * **Guideline ID:** A unique, manually defined identifier for the guideline. * **Title:** A clear name for the rule. * **Description:** The actual instruction Pandorian should enforce. * **Category:** The engineering area this guideline belongs to. * **Language:** One or more languages this guideline applies to. * **Blocked mode:** Whether the guideline runs in Monitor mode or blocks the build. * **Active or inactive:** Whether the guideline is currently enforced. Supported categories include: * Architecture * Code Quality and Maintainability * Data and Storage * Infrastructure and Environments * Observability * Performance and Scalability * Reliability and Resilience * Security Guideline tags are optional. You can choose an existing tag or create a new one while creating the guideline. Tags help organize guidelines and can later be used in scan policies to control where groups of guidelines run. Scoping is not managed directly from the guideline creation form. Use **Scan Policies** to decide where tagged guidelines should run across repositories and paths. #### Writing a strong guideline A good guideline is specific, enforceable, and written in a way that Pandorian can evaluate against code. Strong guidelines usually include: * The rule the code must follow. * The reason the rule exists. * Examples of compliant or non-compliant patterns. * Any important exceptions. * Language, framework, or architecture context. Good example: > All database credentials must be loaded from environment variables or a secrets manager. Do not hardcode usernames, passwords, tokens, or connection strings directly in source code. This guideline is enforceable because it names the risky pattern, describes the expected behavior, and gives Pandorian enough context to identify violations. Weak example: > Write secure code. This guideline is too broad. It does not explain what secure code means, which patterns should be rejected, or what compliant code should look like. For deeper guidance on authoring enforceable guidelines, see [Authoring Enforceable Guidelines](https://pandorian.ai/research/authoring-enforceable-guidelines/). #### Testing a new guideline After creating a guideline, test it with a PR scan when possible. PR scans are usually the best way to validate a new guideline because they focus on changed code and give you faster feedback. You can also run a full repository scan, but full scans may be limited depending on your plan and should be used more selectively. A recommended rollout is: 1. Create the guideline. 2. Start in **Monitor only** mode. 3. Run it against a PR. 4. Review the violations. 5. Refine the guideline if needed. 6. Move to **Block Build** only after you trust the results. *** ### Using the Guideline Wizard The Guideline Wizard turns a plain-language description of what you want to enforce into a precise, enforceable guideline. Use it when you know the rule you want but don't want to write the guideline text yourself. To use the Guideline Wizard: 1. Navigate to the **Guidelines** page. 2. Click **+ New Guideline**. 3. Select **Guideline Wizard**. 4. Fill in the fields below. 5. Review the generated guideline, edit it if needed, and save. The wizard includes the following fields: * **Languages:** The language or languages the guideline should apply to. * **What do you want to enforce?** A short summary of the rule, up to 60 characters. Keep it specific and focus on one enforceable pattern. For example: *Prevent sensitive data from being logged.* * **Tell us more:** Describe what you want to prevent or require in your own words, up to 600 characters. Include examples if you have them. You don't need to phrase it as a rule; Pandorian handles that. * **Any exceptions? (optional):** Describe when the pattern should not be considered a violation, up to 400 characters. If you're not sure, leave it blank. * **Advanced context (optional):** Narrow the generated guideline to your cloud provider and runtime, so suggestions match your environment. #### Tips for better results * Describe one pattern per guideline. If you want to enforce several things, run the wizard once for each. * Name the risky pattern and the expected behavior, the same way you would when [writing a strong guideline](#writing-a-strong-guideline). * Use the exceptions field to cut noise early, for example by excluding test files or a specific internal wrapper. As with any new guideline, start in **Monitor only** mode and validate it with a PR scan or targeted scan before moving to **Block Build**. See [Testing a new guideline](#testing-a-new-guideline). *** ### Importing Guidelines from Confluence or Markdown Use imports when your engineering standards already exist in another place, such as Confluence pages or Markdown files used by engineering teams or AI coding agents. To import guidelines: 1. Navigate to the **Guidelines** page. 2. Click **+ New Guideline**. 3. Choose one of the import options: * **from Confluence** * **from File** * **from Library** Pandorian extracts the source text and returns editable guidelines for review. Imported guidelines are not active by default, so you can inspect and edit them before enabling enforcement. #### Importing from Confluence Use the Confluence import when your engineering standards live in Confluence. The flow is: 1. Connect your Confluence workspace. 2. Choose a Confluence space. 3. Select the page you want to import. 4. Let Pandorian extract potential guidelines from the page. 5. Review and edit the extracted guidelines. 6. Save the guidelines you want to use. Pandorian does not preserve Confluence page hierarchy as part of the guideline structure. The imported content is converted into editable guidelines that can be reviewed one by one. #### Importing from Markdown Use Markdown import when you have standards written in `.md` files. The flow is: 1. Click **+ New Guideline** from the Guidelines page. 2. Select **from File**. 3. Upload a `.md` file. 4. Review the guidelines Pandorian extracts. 5. Edit and save the guidelines you want to use. Pandorian supports one Markdown file per upload. Imported guidelines are reviewed one by one before activation. This is also useful for Markdown files used by AI agents or coding assistant skill systems. If your agent skills are stored as `.md` files, you can upload those files to Pandorian and turn the same instructions into enforceable guidelines. #### When to use Guidelines as Code instead Use **Guidelines as Code** when your team wants to manage guidelines directly from Git and review guideline changes through pull requests. *** ### Guidelines as Code Guidelines as Code lets teams manage Pandorian guidelines from Markdown files in Git. This is useful when engineering standards should be versioned, reviewed, and updated through the same workflow as code. Teams can use this to keep internal Markdown guidelines or AI coding assistant skill files aligned with the rules Pandorian enforces. Guidelines as Code is configured through the source control integration. For setup details, see [Guidelines as Code](/essentials/pandorian-integrations#guidelines-as-code). *** ### Using the Library Using the Library The Library gives you a starting point for common engineering standards across supported languages and categories. It is organized into Guidelines, individual standards you can add on their own, and Packages, curated guideline sets built around common use cases across domains such as Cloud Platforms, Containers/Kubernetes/IaC, Data and Storage, Messaging/Events/Jobs, APIs, Security, Compliance Frameworks, Regulatory Regimes, Industry, Architecture/Quality/Reliability/Observability, and language-specific best practices. To install a package: 1. Navigate to the Library page. 2. Browse or search for a package. 3. Click the package to view its contents. 4. Install the entire package, or select individual guidelines from within it. 5. Select the language you want the guidelines to run on. 6. After adding the guidelines, you can navigate to the guidelines page and choose the enforcement mode for each guideline you added. 7. Add tags if you want to use them with scan policies. You can browse and add individual guidelines the same way, without installing a full package. When you install a guideline from the Library, it becomes a guideline in your organization. It does not remain linked back to the Library, and it is fully editable so you can tailor it to your codebase. You can configure how it should behave in your environment, including whether it should run in Monitor mode or Block Build mode. Library guidelines cannot be scoped directly from within the Library itself. To scope them, add useful tags and then use Scan Policies to decide where those tagged guidelines should run. *** ### Guideline Version History Every guideline keeps a version history. When you edit and save a guideline, Pandorian saves the change as a new version, and earlier versions stay available to view. To view a previous version: 1. Navigate to the **Guidelines** page. 2. Open the guideline. 3. Use the version selector to browse its older versions and compare them with the latest one. Previous versions are read-only, and you can't revert a guideline to an older version. If you need an older version to keep running, you have two options: * **For specific repositories:** Use [Guideline Pins](#repository-overrides) in Scan Policies to lock those repositories to the older version. * **Everywhere:** Create a new guideline based on the older version's content. *** ### Dynamic Context Providers Some guidelines need live context, not just static text. Dynamic Context Providers let guidelines evaluate code against real-time data, such as approved libraries, internal API routes, active feature flags, or configuration flags. A provider can be configured with: * **Title** * **Command** * **Grep** * **Timeout** Use Dynamic Context Providers when a guideline depends on information that may change over time. For setup details, see [Dynamic Context Providers](/essentials/pandorian-integrations#dynamic-context-providers). *** ### Scan Policies Scan Policies let you define exactly which files Pandorian scans, which guidelines apply to them, and which files are excluded. These settings exist at both the repository and organization level, and are evaluated in a fixed order — the first one that applies to a file decides its outcome. Navigate to **Scan Policies** in the Pandorian dashboard to configure. #### Org Guidelines Scan Mode The Org Guidelines Scan Mode controls how your organization's guidelines run on pull requests. Only account Owners can change this setting. * **Run everywhere:** Org guidelines scan every PR in a matching language. For example, on a Java PR, every active Java guideline runs. * **Opt-In only:** Org guidelines scan only where they're scoped. Instead of every guideline that matches the PR's language running automatically, you decide which guidelines run and where, using Guideline Scoping in Repository Overrides. In Opt-In only mode, Organization Policy (organization-level Excluded Paths and Guideline Scoping) is disabled, because organization-wide rules don't apply. To edit Organization Policy, switch the Org Guidelines Scan Mode back to **Run everywhere**. This setting applies to PR scans only. Full repository, targeted, and scheduled scans always run the single guideline you select, so the scan mode doesn't affect them. Account-level guidelines aren't affected by this setting. They always scan every PR in a matching language. For more on account-level guidelines, see [Guidelines as Code](/essentials/pandorian-integrations#guidelines-as-code). #### Evaluation order For a file in a repository, Pandorian checks the following in order. As soon as one applies, evaluation stops for that file: 1. **Repository Included Paths** — If the repository has Included Paths configured and the file falls outside them, the file is not scanned. 2. **Repository-level Guideline Scoping** — If the file is covered by Guideline Scoping configured on this repository, it's scanned with only the guidelines scoped to that path. 3. **Organization-level Guideline Scoping** — If the file is covered by Guideline Scoping configured at the organization level, it's scanned with only the guidelines scoped to that path. 4. **Repository Excluded Paths** — If the file falls under an excluded path configured on this repository, it is not scanned. 5. **Organization Excluded Paths** — If the file falls under an excluded path configured at the organization level, it is not scanned. 6. **Default** — If none of the above apply, the file is scanned against every active guideline. > **Note:** Included Paths only exists as a repository-level setting. There's no organization-wide Included Paths gate — organization-wide inclusion is expressed through Guideline Scoping (step 3), not through a separate allowlist. > > Because Guideline Scoping (steps 2–3) is checked before Excluded Paths (steps 4–5), a file covered by Guideline Scoping is scanned even if it would otherwise fall under an excluded path — the Excluded Paths check is never reached for that file. If a path needs to be excluded no matter what, use Repository Included Paths (step 1); it's the only check nothing later can override. #### Path evaluation order at a glance ```mermaid theme={null} flowchart TD A[File in a repository] --> B{Is the file outside the
repository's Included Paths?} B -->|Yes| B1[Not scanned] B -->|No| C{Is it covered by repository
Guideline Scoping?} C -->|Yes| C1[Scanned with the scoped guidelines only] C -->|No| D{Is it covered by organization
Guideline Scoping?} D -->|Yes| D1[Scanned with the scoped guidelines only] D -->|No| E{Is it under a repository
Excluded Path?} E -->|Yes| E1[Not scanned] E -->|No| F{Is it under an organization
Excluded Path?} F -->|Yes| F1[Not scanned] F -->|No| G[Scanned with all active guidelines] ``` #### Organization Policy Organization-level policy applies across all repositories by default, and is checked after any repository-level settings. Organization Policy is available only when the [Org Guidelines Scan Mode](#org-guidelines-scan-mode) is set to **Run everywhere**. **Guideline Scoping:** Restrict a guideline group to specific paths across the organization. Rather than running all guidelines across the entire codebase, Guideline Scoping lets you target enforcement by tag — for example, applying security guidelines only to the auth service, or data guidelines only to migration files. Click **Add scoping** to configure. **Excluded Paths:** Paths that should never be scanned, applied org-wide — for files not already covered by Guideline Scoping. Use this to exclude vendor code, generated files, test fixtures, or any directory that shouldn't be subject to enforcement. Click **Exclude a path** to add an exclusion. #### Repository Overrides Repository overrides customize scan policy for a specific repository. Every repository-level setting is checked before its organization-level counterpart, so it takes precedence. Click **Add repository override** to configure. **Included Paths:** The paths Pandorian scans for this repository. If set, any file outside these paths is never scanned for this repo — this is the very first check Pandorian runs, and nothing later in the evaluation order can override it. Setting Included Paths also reduces scan time, since Pandorian only analyzes those paths instead of the entire repository. If no Included Paths are set for a repository, its full contents are eligible for scanning, subject to the rest of the evaluation order. **Guideline Scoping:** The same scoping mechanism as the organization level, but scoped to this repository only, and checked before organization-level Guideline Scoping. **Excluded Paths:** The same exclusion mechanism as the organization level, but scoped to this repository only, and checked before organization-level Excluded Paths — and, like all Excluded Paths, only reached if the file isn't already covered by Guideline Scoping. **Guideline Pins:** Lock a guideline to a specific version for this repository. By default, every guideline runs on its latest version. Pinning keeps the repository on a version you've already validated, so later edits to that guideline don't change its results here until you're ready. To pin, select the guideline, choose the version, and click **Pin**. Remove the pin to return the repository to the latest version. Guideline Pins exist only at the repository level and don't affect which files are scanned. #### Examples **Limiting a noisy repo's scan surface:** A repository contains generated code alongside application code. Set that repository's Included Paths to `/src` so nothing outside it is ever scanned — cutting scan time and noise regardless of any other setting. **Scoping compliance guidelines to sensitive services, org-wide:** Your organization has a set of guidelines tagged `pci-compliance`. Use organization-level Guideline Scoping to restrict them to repos or paths containing payment processing code. Every other repo is unaffected, and matching files are scanned with just those guidelines. **Scoping security guidelines to one repo's auth layer:** Security guidelines tagged `auth` should only apply to `/src/auth` in a single repository, not organization-wide. Use repository-level Guideline Scoping instead of organization-level — it's checked first and won't affect any other repo. **Guideline Scoping reaching a file you meant to exclude:** Your organization excludes `**/generated/**` org-wide. Repository-level Guideline Scoping applies `code-quality` guidelines to everything under `/src`, and `/src/generated` happens to fall inside that path. Because Guideline Scoping is checked before Excluded Paths, files in `/src/generated` are scanned with the `code-quality` guidelines — the org-wide exclusion is never reached for them. To exclude `/src/generated` no matter what, keep it outside that repository's Included Paths instead. **Overriding org defaults for a legacy repository:** Your org-wide policy excludes test files. A legacy repo requires the opposite — tests are the only place certain patterns are enforced. Add a repository-level Excluded Paths override for that repo's non-test files, without affecting the rest of the organization. **Keeping a critical repo on a validated guideline version:** You're refining a guideline that runs in Block Build mode, and the new version still needs testing. Pin your payments repository to `v1` so its builds keep running against the version you trust, while other repositories pick up the latest version. Remove the pin once the new version is validated. *** ### Policy as Code Policy as Code lets you configure repository-level settings as code, so Pandorian knows which guidelines to run and when to block pull requests without managing these rules outside the codebase. A Pandorian policy is defined in a `.pandorian/.policy` file inside the repository and applies to both full repository scans and PR scans. Policy as Code can define: * Which guideline tags apply to the repository. * Which files or directories should be excluded from scans. * Which guideline tags should apply only to specific paths. For setup details, see [Policy as Code](/essentials/pandorian-integrations#policy-as-code). *** ## Enforce Use these workflows to run scans, review violations, and enforce guidelines in pull requests. ### Running a Repository Scan Pandorian supports four scan types: * **Full repository scans** * **Targeted scans** * **Scheduled scans** * **PR scans** A full repository scan analyzes the entire repository against selected guidelines. A targeted scan analyzes a single path in the repository, so it finishes faster and is ideal for quickly validating a guideline. A PR scan analyzes the code changes in a pull request. Use PR scans when you want fast feedback on new changes. Use targeted scans when you want to validate a guideline against a specific area without scanning everything. Use full repository scans when you want to understand guideline compliance across a whole repository. #### Running a full repository scan To run a full repository scan: 1. Navigate to the **Repositories** page. 2. Select the repository you want to scan. 3. Click the play button. 4. Choose the guideline you want to scan against. 5. For the path, select the full repository (the repository root) — not a folder underneath it. This is what makes it a full scan rather than a targeted one. 6. Start the scan. Full repository scans analyze the repository while respecting configured scan policies, ignored paths, and repository overrides. #### Running a targeted scan A targeted scan runs against a single path in your repository instead of the whole thing. It's the quickest way to validate a guideline — confirm it behaves as expected on the code you care about without waiting for a full repository scan. Full repository scans remain available whenever you need complete coverage. Use a targeted scan when you want to: * Validate a new or edited guideline against a specific area of the codebase before rolling it out more widely. * Re-check a single service or directory after a fix, without re-scanning everything. * Iterate quickly, since a targeted scan only analyzes the path you select. To run a targeted scan: 1. Navigate to the **Repositories** page. 2. Click the **Play** button next to your repository. 3. Select the guideline and the path you want to scan. 4. Choose whether to apply your scan policies using the **scan policies** toggle (see below). 5. Start the scan. By default, a targeted scan respects your configured scan policies — Included Paths, Guideline Scoping, and Excluded Paths. Turn the **scan policies** toggle off to ignore those policies and scan the exact path you selected regardless of them, which is useful when you want to validate a guideline against a path that your policies would normally exclude or scope away. Leave it on to have the targeted scan behave consistently with your full repository and PR scans. The scan runs only against the path you chose and reports violations for the selected guideline, so results come back quickly. #### Scheduled Scans Scheduled scans run a repository scan automatically on a recurring schedule you define, so you get ongoing visibility into guideline compliance without kicking off a scan by hand each time. You configure scheduled scans from the **Repositories** page. Next to the **Play** button for a repository, click the **calendar** button to open the **Scheduled Scans** page for that repository, where you can review existing scheduled scans and add new ones. #### Adding a scheduled scan On the Scheduled Scans page, add a scheduled scan and configure it: 1. **Name** — Give the scheduled scan a name so you can recognize it later. 2. **Schedule** — Define when it runs using a cron expression. As you type, live text below the field translates the expression into plain-language run times, so you can confirm the schedule is what you intended before saving. 3. **Guideline and path** — Choose the guideline to scan against and the path to scan, the same way you would for a targeted scan. Select the repository root to scan the full repository, or a folder underneath it to scope the scheduled scan to that path. 4. **Scan policies** — Decide whether the scheduled scan should apply your configured scan policies (Included Paths, Guideline Scoping, and Excluded Paths) or ignore them, using the same toggle as a targeted scan. Once saved, the scan runs automatically on the schedule you defined. Results appear on the **Scans** page alongside your manual and PR scans. #### Running a PR scan PR scans run automatically after source control is connected. A PR scan is triggered when: * A new pull request is opened. * A developer pushes updates to an existing pull request. * A pull request is reopened. PR scans analyze the changes in the pull request and respect configured scan policies. #### Reviewing scan results Scan results show: * Repository * Scan ID * Violations count * Duration * Status * Guidelines checked When a scan includes violations, click into the result to see where the violations were found and which lines were affected. To run the scan again, click **Re-scan**. *** ### Viewing Violations from the Scans Page or Guidelines Page Pandorian gives you two main ways to view violations: from the **Scans** page or from the **Guidelines** page. Use the Scans page when you want to review the result of a specific scan. Use the Guidelines page when you want to understand all violations related to a specific guideline. #### Viewing violations from the Scans page The **Scans** page is best for reviewing scan-level results. Each scan shows information such as: * Started At * Scan ID * Violations * Duration * Status * Repository * Pull request, when relevant Open a scan to see whether it has violations and where those violations were found. You can filter scans by: * Scan type * PR status * Date range * Repository * With violations * Without violations Supported PR statuses include: * Opened * Merged * Closed Use these filters to focus on the scans that matter most, such as recent PR scans with violations or merged PRs that introduced guideline violations. #### Viewing violations from the Guidelines page The **Guidelines** page is best for understanding violations by guideline. From the Guidelines page, open a guideline or click its violation badge to see violations related to that rule across scans. This view is useful when you want to understand how widespread a guideline violation is, which repositories are affected, or whether a guideline is ready to move from Monitor mode to Block Build mode. *** ### Setting Up PR Enforcement as a CI Check Pandorian integrates with source control so guidelines can be enforced directly in pull requests. Supported source control providers include: * GitHub * GitLab * Azure DevOps Bitbucket is not currently supported. After source control is connected, PR scanning runs automatically when a pull request is opened, updated, or reopened. Pandorian can add inline comments on pull requests to show where violations were found. #### Monitor mode Monitor mode reports violations without blocking the build. Use Monitor mode when introducing new guidelines, testing guideline quality, or rolling Pandorian out gradually across teams. In Monitor mode, developers and engineering leaders can see violations, but the build is not blocked. #### Block Build mode Block Build mode blocks the build when violations are found. Use Block Build mode only after you have validated the guideline and trust the results. A recommended rollout is: 1. Start in Monitor mode. 2. Review real violations over time. 3. Refine the guideline if needed. 4. Move to Block Build mode when the team is confident in the rule. #### Skipping a CI check For a specific scan, you can skip the CI check from the Scans page. Click **Skip CI Check** to skip blocking behavior for that scan. The scan still runs, but the CI check is skipped for that specific PR. *** ### Reading Violation Reports Violation reports show where code does not comply with a guideline and what the developer can do next. A violation report can include: * Guideline title * Repository * File path * Line number * Code snippet * Explanation * Fix suggestion Pandorian does not show severity in the violation report. Confidence is handled internally. #### Viewing the affected code Click **View Code** to inspect the relevant code around the violation. Use this when you want to understand the exact context before taking action. #### Generating a fix Click **Generate Fix** to create remediation instructions. Generate Fix produces Markdown instructions that can be copied into an AI coding agent or used by a developer. The Markdown includes code suggestions, but it does not automatically create a patch or pull request. #### Archiving a violation Click **Archive Violation** when a finding is no longer relevant. Archived violations are excluded from future Jira ticket creation and reporting views. Use archive for findings that are accepted, irrelevant, or no longer useful to track. #### Creating Jira issues If Jira is connected, Pandorian can create Jira issues from guideline violations. From the **Guidelines** page, click the violation badge on a guideline, then click **Create Issue**. Pandorian generates a ticket draft containing all current open violations for that guideline in bulk. Before creating a Jira ticket, archive irrelevant violations so they are not included in the generated issue. For Jira setup details, see [Jira Integration](/essentials/pandorian-integrations#jira-integration). *** ## Analyze Use these workflows to see guideline coverage and violation trends across your organization at a glance. ### Analytics Dashboard Navigate to **Home** in the Pandorian dashboard for an organization-wide view of enforcement health, without digging into individual scans or guidelines one by one. #### Overview cards Three summary metrics sit at the top of the dashboard: * **Monitored Repositories** — how many repositories are connected and scanned. * **Active Guidelines** — how many guidelines are currently enabled across your organization. * **Total Violations** — the combined count of open and merged violations. #### Time range Use the time range selector at the top of the dashboard to choose the period the dashboard covers: * Last day * Last 7 days (default) * Last 30 days * Custom Violation metrics and statistics, including the Open and Merged panels below, update to match the selected range. Use a short range to watch recent activity, or a longer one to spot trends. #### Violations Stats Violations are split into two panels, both scoped to the selected time range: **Open Violations:** Findings currently in your pipeline — detected on pull requests that haven't merged yet. Use this to see what's about to land on your main branch if left unaddressed. **Merged Violations:** Findings that have already landed on your main branch. These are live in production code and reflect actual drift from your standards, not just proposed changes. Each panel breaks its violations down by category in a donut chart — Architecture, Code Quality & Maintainability, Data & Storage, Infrastructure & Environments, Observability, Performance & Scalability, Reliability & Resilience, and Security — and surfaces two ranked lists: * **Most Violated Guidelines** — the specific guidelines generating the most findings in that panel, ranked by count. Click **Show all** to see the complete list. * **Most Affected Repos** — which repositories contain the most violations for that panel. Because Open and Merged track different stages of the pipeline, the same guideline can show up in both lists with very different counts. A high Open count paired with a low Merged count usually means the team is catching violations before merge; a high Merged count means violations are reaching the main branch unaddressed. *** ## Admin Use these workflows to bring your team into Pandorian and manage access. ### Onboarding Users Admins can invite users from the **Users** page. To invite a user: 1. Navigate to the **Users** page. 2. Click **Invite user**. 3. Enter the user's name. 4. Enter the user's email address. 5. Choose a role. 6. Send the invite. Users receive an email invitation. Invites can expire, and admins can resend them when needed. Users are invited one at a time. #### Roles Pandorian supports four roles: **Owner** Full access to all organization settings and resources. Use this for the person responsible for the Pandorian organization, billing, security-sensitive settings, and top-level administration. **Admin** Administrative access with user management capabilities. Use this for team members who need to manage users and help administer the organization. **Maintainer** Can manage repositories and guidelines. Use this for platform engineers, architects, or engineering leads who own guideline creation, repository setup, and day-to-day rule management. **Member** Basic access to view and contribute. Use this for developers or stakeholders who need access to Pandorian but should not manage organization-wide settings. *** ### SSO Pandorian supports SSO for enterprise authentication. SSO is not self-serve in the product today. Contact the Pandorian team to configure SSO for your organization. Pandorian supports common SSO setups, including providers such as: * Google Workspace * Microsoft Entra ID or Azure AD * Okta * OneLogin Users can be created automatically on first login. SSO can be required for all users. Role mapping is supported, but roles are not automatically assigned unless configured as part of the SSO setup. Because SSO setup depends on the customer's identity provider, the Pandorian team will guide the configuration process and confirm the required metadata, domain settings, and testing steps during onboarding. ### Multi-Org Governance Pandorian can connect more than one git organization — across GitHub, GitLab, or Azure DevOps — to a single account. Each connected org gets its own view, with its own guidelines, scan history, and UI, all managed from that one account. Data is not merged between orgs. For setup details, see [Multi-Org Governance](/essentials/pandorian-integrations#multi-org-governance). *** ### Filtering Repositories by Custom Properties Pandorian syncs custom properties from your GitHub organization, so you can filter repositories in Pandorian using the same metadata your team already maintains in GitHub, such as team, service tier, business unit, or compliance scope. Custom properties are available for GitHub organizations only. Custom properties are managed in GitHub, not in Pandorian: 1. Define custom properties in your GitHub organization's settings and assign values to your repositories. 2. Pandorian stays in sync automatically. When a property changes in GitHub, the update is reflected in Pandorian right away. 3. On the **Repositories** page, filter repositories by property and value. Custom properties are used for filtering repositories only. They can't be used in Scan Policies. *** ### Plan and Usage The **Usage** page shows your current plan and how much of it you've used. It's available to Owners, Admins, Maintainers, and account Owners. * **Time left in your plan:** How much time remains on your plan, and the date it ends. * **Monthly limits:** Limits that reset every month, with the next reset date shown. These cover Pull Requests, Full Repository Scans, and Generated Fixes. * **Global limits:** Fixed limits included in your plan, which don't reset. These cover Users and Active Guidelines. Each limit shows how much you've used, the plan limit, how much remains, and the percentage used. Limits that aren't capped on your plan are marked **Unlimited**. # Integrations Source: https://docs.pandorian.ai/essentials/pandorian-integrations Learn how to integrate Pandorian with your development workflow Pandorian integrates into your existing SDLC to enforce guidelines continuously and automatically. This guide covers PR scanning, CI/CD integration, repository policy, and notifications. ## Source Control & Pull Request Scanning The fastest way to enforce guidelines is through automatic PR scanning via your source control integration. Pandorian supports **GitHub**, **GitLab**, and **Azure DevOps**. ### How PR Scanning Works Once you connect your source control manager during initial setup, PR scanning is automatically triggered on every new PR or push to an existing PR. **What happens during a PR scan:** 1. Developer opens or updates a pull request. 2. Pandorian scans only the modified files against guidelines. 3. Violations appear as inline comments on specific lines and as a summary comment on the PR (if opted in) 4. The PR check appears in your source control's status checks (configurable as required or optional) ### PR Actions **Rescan:** Re-trigger a scan for an existing PR with the current set of active guidelines applied to it. Useful after updating guidelines or resolving earlier violations. **Archive:** Archive individual findings that are no longer relevant — archived violations are excluded from future Jira ticket creation and reporting views. **Skip CI Check:** Manually skip the CI check for a specific PR. The scan will still run, but results will not block the PR build associated with it. *** ### Blocking vs. Monitoring Mode **Blocking Mode** (recommended for production): Pipeline fails if violations are found, preventing non-compliant code from being deployed. Set exit code 1 when violations > 0. **Monitoring Mode** (useful for gradual rollout): Pipeline continues regardless of violations. Scan results are logged for visibility. Set exit code 0 and log violations without blocking. *** ## Multi-Org Governance Multi-Org Governance connects multiple git organizations — any mix of GitHub, GitLab, and Azure DevOps — to a single Pandorian account. Use this when your engineering organization runs multiple git organizations by design (one per business unit or product line), or has inherited additional organizations through an acquisition. ### How It Works One Pandorian account can hold a separate view for each connected org. Every org keeps its own guidelines, scan history, and UI, exactly as it operated before joining — data is not merged between orgs. What changes is that all of them are now managed from that one account instead of separate logins. ### Connecting an Additional Org Connect each additional git organization the same way you connected your first — through the standard source control integration flow. Pandorian adds it as its own view under your account automatically. No repos move, no orgs get renamed, nothing migrates. ### Guidelines Are Not Shared Across Orgs Multi-Org Governance adds one place to manage from, not shared rules or shared data. Each connected org keeps the guidelines it already has. Standardizing guidelines across orgs is a decision your team makes deliberately, on its own timeline. *** ## Guidelines as Code High-velocity teams can manage guidelines directly within their code repositories, treating engineering standards as living documentation that evolves alongside the codebase. If your team already uses internal markdown files or AI coding assistant skills, you can sync those same files to Pandorian — ensuring the rules your AI uses to write code are the exact same rules Pandorian uses to validate it. ### How It Works 1. Designate a repository and base directory (e.g., `/docs/guidelines`) in the **Integrations** tab 2. Pandorian monitors that directory for `.md` files 3. Any merge to the main branch triggers an update — guidelines are immediately enforced across all associated repositories ### File Structure & Metadata Each Markdown file must contain a YAML frontmatter block with a `pandorian-metadata` section: | Attribute | Type | Description | | - | - | - | | `id` | string | Unique identifier (e.g., `scala-expert`) | | `language_ids` | string | Target languages (e.g., `scala`, `python`) | | `title` | string | Clear, actionable rule name | | `block_build` | boolean | `true` to block on violation; `false` defaults to monitor | | `category` | string | Area of focus (e.g., `security`, `performance`) | | `is_active` | boolean | Whether this guideline is currently enforced | | `account_level` | boolean | Whether this guideline should be globally enforced on all organizations within the account | | `tags` | list | Strings for filtering and organization | ### Supported Categories Architecture, Code Quality & Maintainability, Reliability & Resilience, Performance & Scalability, Security, Data & Storage, Infrastructure & Environments, Observability ### Supported Languages c, cobol, cpp, csharp, dockerfile, elixir, go, haskell, java, javascript, kotlin, lua, perl, php, python, ruby, rust, scala, swift, terraform, typescript, shell ### Implementation Example Create a file named `scala-expert.md` in your guidelines directory: ```yaml theme={null} --- pandorian-metadata: id: scala-expert language_ids: [scala] title: Scala Functional Programming Expert block_build: true category: Architecture is_active: true account_level: false tags: [scala, functional-programming, cats, fs2] --- # Scala Functional Programming Standards You are an elite Scala developer. When writing or reviewing code, ensure: - **Immutability First**: Always use `val` over `var` and prefer immutable collections. - **Referential Transparency**: Effects must be properly tracked in the type system using `IO`. - **Resource Management**: Use `Resource` for anything requiring cleanup. ### Prohibited Patterns - Never use `null`. Use `Option` instead. - Avoid `Thread.sleep`; use `IO.sleep` for non-blocking delays. ``` ### Configuration Steps 1. Navigate to **Integrations → Connections → Source Control** in the Pandorian platform 2. Select the repository containing your `.md` files 3. Provide the top-level directory path (e.g., `/docs/guidelines`) 4. Save to trigger an initial import ### Exporting from the Guidelines Manager If you've been managing guidelines through the Pandorian UI and want to move to a code-based workflow, you don't need to rewrite anything. Any guideline in the Guidelines Manager can be exported as a Markdown file that is already valid Guidelines-as-Code — frontmatter, metadata, and rule body included. **To export:** 1. Open the **Guidelines** tab 2. Select the guideline you want to export 3. Click **Export** 4. Commit the downloaded `.md` file(s) to your designated guidelines directory The exported file is already valid Guidelines-as-Code. It carries over `language_ids`, `title`, `block_build`, `category`, `is_active`, and `tags` exactly as configured in the UI, so you can paste the contents straight into your guidelines directory with no reformatting. ## Policy as Code Policy as Code lets you configure repository-level settings as code, so Pandorian knows which guidelines to run and when to block pull requests — without managing these rules outside your codebase. The policy is defined in a `.pandorian/.policy` file inside the repo and is applied on every full and PR scan. ### Repository Policy Schema ```yaml theme={null} # Exclusions — skip files or directories from analysis using glob patterns exclusions: - type: glob value: string case_sensitive: bool # Inclusions — apply specific guidelines (by tag) to specific paths inclusions: - tags: [string] rule: type: glob value: string case_sensitive: bool # Path Inclusions — restrict the entire scan to specific paths path_inclusions: - type: glob value: string case_sensitive: bool ``` ### Comprehensive Configuration Example ```yaml theme={null} exclusions: - type: glob value: "vendor/**" case_sensitive: true - type: glob value: "**/*.pb.go" case_sensitive: true - type: glob value: "**/*_test.go" case_sensitive: true - type: glob value: "node_modules/**" case_sensitive: true inclusions: - tags: [security] rule: type: glob value: "src/auth/**" case_sensitive: true - tags: [data-storage, performance] rule: type: glob value: "db/migrations/**" case_sensitive: true path_inclusions: - type: glob value: "src/**" case_sensitive: true ``` *** ## Dynamic Context Providers Dynamic Context Providers connect external data sources directly to your guidelines, ensuring they evaluate code against real-time context — approved libraries, internal API routes, active feature flags — rather than static hardcoded lists. ### Configuring a Provider When creating or editing a guideline, add a provider with: * **Title:** Descriptive name (e.g., "Approved Config Flags") * **Command:** The exact command Pandorian executes to fetch data (e.g., a `curl` to your internal API) * **Grep:** Optional regex to filter the command output to only the relevant data * **Timeout:** Maximum seconds to wait for the external source before timing out *** ## Slack Integration ### Setting Up Slack Notifications 1. Navigate to the **Integrations** tab 2. Click **Connect Slack** 3. Authorize Pandorian to access your Slack workspace 4. Choose the notification channel 5. Configure alerts for scan completed or scan failed events Each alert includes a direct link to the scan results in the Pandorian dashboard. *** ## Webhooks Webhooks send Pandorian alerts to your own HTTPS endpoint, such as a SIEM, an internal service, or an automation tool. A webhook alert is sent whenever a scan completes with at least one violation. ### Adding a Webhook Endpoint 1. Navigate to the **Integrations** tab 2. Add a webhooks endpoint 3. Enter a **Channel Name** to identify the endpoint (e.g., "SIEM intake") 4. Enter the **curl command** for your endpoint 5. Click **Test Connection** to confirm Pandorian can reach it 6. Click **Add Channel** ### How the Request Is Built Pandorian reads the method, URL, and headers from your curl command and sends the violation report as a JSON body. Any `-d` data in the command is ignored, and only `https` URLs are supported. Example curl command: ```bash theme={null} curl -X POST https://example.com/hooks/pandorian \ -H 'Authorization: Bearer ' ``` Use headers for any authentication your endpoint requires, such as a bearer token. *** ## Jira Integration Connect Pandorian to Jira to create issues directly from scan results, turning violations into actionable tickets without leaving the dashboard. ### Setting Up Jira 1. Navigate to **Integrations → Jira** in the Pandorian dashboard 2. Click **Connect** and sign in via Atlassian 3. Once authorized, the integration status shows **Configured** 4. Under **Configuration**, select your default Jira board and click **Save** ### Creating a Jira Issue from a Guideline From the **Guidelines** page, click the **Violations** badge on any guideline. Click **Create Issue** — Pandorian generates a ticket draft containing all current open violations for that guideline in bulk. The **Create Jira Issue** form is pre-populated with: | Field | Details | | - | - | | **Summary** | Pre-filled; editable | | **Description** | Auto-generated from guideline details, violation count, category, and repo context; editable | | **Issue Type** | Defaults to Task; editable | | **Priority** | Optional; editable | | **Assignee** | Optional; editable | | **Labels** | Optional; comma-separated | A **Ticket Preview** panel shows the rendered output before submission. > **Tip:** Archive irrelevant violations before creating a ticket — archived violations are excluded from the generated issue. ### Ticket History & Lifecycle A **Tickets** page in Pandorian shows all issues opened, so you can track escalations without leaving the dashboard. Pandorian does not automatically close, update, or comment on tickets — lifecycle is managed within Jira. # Introduction Source: https://docs.pandorian.ai/essentials/pandorian-introduction Get started with Pandorian ## Welcome to Pandorian Every engineering organization has standards. The hard part has never been writing them down — it's making them real in the code. As organizations grow, that gap widens. Teams fragment. Knowledge drifts. The same issues surface in code review again and again. And now AI is writing more code than ever, accelerating output and accelerating the problem at the same rate. Pandorian closes that gap. Pandorian is the governance layer for the age of AI-generated code — a control plane where engineering leadership defines what good looks like, and every pull request, every repository, and every line is held to that bar. Whether the author is a senior engineer or an autonomous agent. Write your guidelines in plain English, or import them from the documentation you already have. Pandorian turns them into enforceable standards that run on every change, in every repo. When AI becomes the workforce, governance becomes the work. This is where it lives. *** ## Why Pandorian Exists Engineering leaders set the standards. Enforcing them is a different problem. Guidelines live in Confluence pages, Slack threads, and the heads of your most senior engineers. Linters cover syntax. Code review catches some things, some of the time. But as codebases grow and AI accelerates output, the gap between what you expect and what ships keeps widening. Pandorian exists to close that gap — turning your existing standards into real-time enforcement across every pull request and every repository, without asking developers to change how they work. *** ## Who Pandorian is For Pandorian is built for engineering leaders who define the standards for the developer org: CTOs, VPs of Engineering, VP Platform, Chief Architects, and CISOs leading large teams and codebases. Pandorian is not a developer tool — it is a management tool to govern your codebase. It gives engineering leadership the enforcement layer they've been missing. # Quick Start Source: https://docs.pandorian.ai/essentials/pandorian-quick-start Get up and running with Pandorian in minutes This guide will walk you through setting up Pandorian and experiencing the core value: writing an engineering guideline in natural language, running a scan, and finding violations instantly. **Time to first scan:** \~10 minutes ## Prerequisites * Account with access to at least one repository * Repository admin permissions (required to install the source control integration) ## Step 1: Sign Up and Connect Your Source Control 1. Visit [app.pandorian.ai](https://app.pandorian.ai/) 2. Click **Sign Up** 3. Connect your source control provider — Pandorian supports **GitHub**, **GitLab**, and **Azure DevOps** 4. Complete the app installation and choose which repositories to connect Once connected, you'll see your repositories in the Pandorian dashboard. ## Step 2: Create Your First Guideline You have two options: create a custom guideline from scratch, or import from an existing source. ### Option A: Create a Custom Guideline 1. Navigate to the **Guidelines** page 2. Click **+ New Guideline** (top right) 3. Select **Create Guideline** 4. Fill out the guideline form: * **Guideline ID:** A unique identifier (e.g., `SEC-001`, `PERF-002`) * **Category:** Select a category (Security, Performance, Code Quality, etc.) * **Language:** Choose the programming language(s) this applies to * **Title:** Clear, actionable name for your rule * **Description:** Write your guideline in natural language. Be specific about what should or shouldn't happen in the code. * **Enforcement Mode:** Set to **Block** (fails CI/CD on violation) or **Monitor** (surfaces violations without blocking) * **Enforce On:** Which repositories this guideline applies to (default: ALL) **Example guideline:** Title: Production Flask Applications Must Use Production-Ready WSGI Servers Description: Flask's built-in development server must not be used in production environments. Applications must use production WSGI servers like Gunicorn, uWSGI, or Waitress with proper worker configuration to handle concurrent requests. 5. Click **Create Guideline** ### Option B: Import Guidelines Pandorian supports multiple import sources so you can turn existing documentation into live enforcement immediately: * **Confluence** — import directly from your team's Confluence pages * **Markdown files** — upload any internal documentation or standards docs * **Pandorian Library** — best practices and ready-built packages of guidelines grouped by use case, across Python, JavaScript, TypeScript, Java, Go, C#, Ruby, Rust, Kotlin, Scala, and more * **Policy as Code** — import structured policy definitions directly Browse or search by language, category, or priority and add guidelines to your organization in one click. Your first guidelines are set up. Every PR on your selected repositories will now be scanned against them. For advanced usage, see [Policy as Code](https://docs.pandorian.ai/essentials/pandorian-integrations#policy-as-code) to define where and when specific guidelines are enforced. ## Step 3: Review Scan Findings Once PRs start running, they will be scanned against your guidelines. There are two ways to view findings — per scan or per guideline. **Per Scan:** Navigate to the **Scans** page to see a list of all completed scans, sorted by most recent. Scans containing violations are flagged with a red violations icon. Click a scan to see the non-compliant files, then click a file to expand and view the violation description. Click **View Code** to see the violation within the code snippet. **Per Guideline:** Navigate to the **Guidelines** page. Any guideline with open violations displays a badge with the violation count. Click the badge to view all violations, and click any violation to view it within the code snippet. ## Step 4: Take Action on Violations **View in Context:** Click **View Code** to see the exact violation location with line numbers highlighted and guideline details in the side panel. **Generate Fix Instructions:** Click **Generate Fix** to create a markdown document with full context, step-by-step remediation instructions, and code suggestions. Feed this directly to AI coding tools like GitHub Copilot, Cursor, or Claude to implement fixes. **Create a Jira Ticket:** From the violations view, click **Create Issue** to open a pre-populated Jira ticket containing all open violations for that guideline. See [Jira Integration](https://docs.pandorian.ai/essentials/pandorian-integrations#jira-integration) for setup instructions. **Archive:** Archive findings that are no longer relevant to exclude them from reporting and future Jira tickets. **Rescan:** After updating a guideline or resolving violations, click **Rescan** to re-trigger the scan on an existing PR with the current set of active guidelines.