---
title: "Configure guardrails"
canonical: "https://support.appfire.com/space/RS/3641376799/Configure%20guardrails"
format: markdown
---
> Macro (aura-html)

** **QueueZero organizational settings include guardrails; a guardrail is additional context that is added to an agent prompt every time they write code in any space in your organization. There are a few types of guardrails, including **Platform**, **Default**, and **Custom**. 

- **Platform guardrails** are security guardrails native to QueueZero; they cannot be disabled, edited, or deleted. Only the actions taken can be modified.
- **Default guardrails** are created in all new organizations. They can be enabled, modified, or even deleted by an organization administrator.
- **Custom guardrails **can be added at the org level by organization owners, and at the space level by space admins. They can be created either freeform or using the provided Starter guardrails as inspiration.

Review Platform guardrails and their associated postures, or configure organization guardrails from **Organization settings** >** Guardrails**.

> 📝 By default, all organizations have six Platforma and three Default guardrails included based on standard best practices for code generation using AI models. The Default guardrails include excluding secrets and other sensitive data; always using parameterized SQL; and always implementing authorization when creating new API endpoints.

> Macro (47fa61b6-fe1c-40c9-b236-623cdbc35833/4d8fa66b-88bf-4899-a37e-5926131c46ac/static/multiexcerpt-fast-block-macro)
> 
> The following sections detail how to work with guardrails. 
> 
> ![Organization guardrails configuration in Appfire QueueZero](media://fee8f974-7447-42a6-b53d-6736e58f3b51)
> 
> ## Working with guardrails
> 
> > ℹ️ Guardrails can be gates - they can be configured to prevent a model from generating invalid or insecure code. They are checks that run automatically during code review, and depending on the guardrail configuration, your agent may be blocked, or the results are recorded to the work item under the **[Governance](https://appfire.atlassian.net/wiki/spaces/RS/pages/3641376826)**[ tab](https://appfire.atlassian.net/wiki/spaces/RS/pages/3641376826). See below for more information.
> 
> Existing guardrails are listed in a table at the top of the page with the following: 
> 
> - **Name**
> - **Enabled** - Turn the guardrail on or off across your entire organization.
> - **Locked** - Toggle to lock or unlock a guardrail. Locked guardrails cannot be overridden in individual Spaces.
> - **Updated** - The date the guardrail was last updated.
> - **Actions** - Edit or delete the guardrail.
> 
> ## Add or update a guardrail
> 
> To create a new guardrail, click **Add guardrail** in the upper right corner of the configuration screen. Alternatively, expand the **Starter guardrails** section at the bottom of the screen and click one of the template guardrails. 
> 
> To edit a guardrail, click **Edit** under **Actions** for that guardrail.
> 
> ![Appfire QueueZero screen for configuring a new guardrail](media://23b712e3-25ef-45a9-a8aa-88c888fd8981)
> 
> The configuration screen (Figure 2, above) will open with the following options: 
> 
> - **Name** - Give your guardrail a name.
> - **Rule** - The rule that will be added to context when the model executes a work item’s plan.
> 
> > ⚠️ **Automated enforcement **is only run against lines of code added during QueueZero’s code execution phase! Existing issues in the code will not be identified or flagged during verification.
> 
> - **Automated enforcement** - Configure how your rule is verified against generated code.
>   - **Detector** - Select which detector should be used, or provide a regular expression that identifies invalid code. See below for more information.
>   - **What the AI reviewer should check** - Describe what the model should check when running verification.
> 
> > 📝 **Note**: Any prompt added to **What the AI reviewer should check** is run in a separate, isolated AI check during code review. Results of this check cannot use tool calls, so results are informational only.
> 
>   - **Enforcement** - The level of enforcement used in verification. See [Code verification and governance](https://appfire.atlassian.net/wiki/spaces/RS/pages/3641376826) for more information.
>     - **Observe** - Add a monitored finding to the Governance tab in the work item view.
>     - **Warn** - Add a flagged warning to the Governance tab in the work item view.
>     - **Hold** - Draft a PR only. Errors will show during code execution.
>     - **Block** - Code will not be pushed.
>   - **Limit to paths** - The paths in your code repositories that should be included in verification; leave blank to include the entire repository. Anything generated outside these paths will not be verified.
> 
> Click **Add rule** to save your guardrail.
> 
> > ℹ️ Even when **Automated enforcement** is not configured, guardrails will still steer your model when it generates code. Enforcement only determines if verification is run after code generation.
> 
> ### Detectors
> 
> There are several options for detectors when configuring a guardrail, and each runs a different scan for various high-risk content in the code generated during execution. These scans run on the diff generated during the code review phase. Detectors are different from the prompts added to a guardrail (for example, in the **Rule** and **What the AI reviewer should check **configurations) because they are deterministic scans of the generated code instead of additions to the agent’s prompt.
> 
> Available detectors are: 
> 
> - **None** - Do not use a built-in detector. The model will use only its **Rule** and the additional details in **What the AI reviewer should check**, if any additional prompting is provided there.
> - **No hardcoded secrets** - Detects things like API keys, provider tokens, and other secret-looking values. Environment variables are excluded.
> - **No string-concatenated SQL** - Detects SQL built by directly combining strings with variables. Parameterized queries are allowed.
> - **No secrets in logs** - Detects sensitive values such as passwords, tokens, or API keys being logged. Redacted values are ignored.
> - **No personal data (PII)** - Detects things like emails, phone numbers, credit cards, national IDs, and AWS access key IDs. Detected values are masked in the stored finding.
> - **No changes to restricted paths** - Checks whether restricted files or paths were changed, such as CI config, Git/build hooks, package registry config, or credential files.
> - **No untrusted dependency additions** - Checks new or changed dependencies for typosquatting, suspicious install scripts, non-registry packages, unpinned versions, and known vulnerabilities.
> - **No changes outside the plan** - Checks whether the PR changes files not included in the approved plan. This applies when a plan is available and is currently advisory.
> - **Custom pattern** - Define your own regex to check added lines. Invalid or unsafe patterns are rejected so they don't break the scan.