Skip to main content

System Policies Reference

Reference page. This is the canonical inventory of every built-in policy, its category, and its default action. Use it to look up what ships out of the box before you write a custom policy. New to policies? Start with Policy-as-Code and Policy Hierarchy.

AxonFlow ships with 85 built-in system policies:

  • 70 pattern-based system policies evaluated by the Agent for low-latency enforcement
  • 15 condition-based system policies evaluated by the Orchestrator for context-aware governance

These policies give engineers a strong production baseline for LLM security, PII protection, prompt-injection defense, secret detection, and runtime compliance controls.

System policies are immutable (tier=system) - you cannot edit or delete them, but in v11 every edition can disable, re-enable or re-action each one for an organization (see Customizing System Policies).

The Action column is the stored action

The Action column below is the action stored on the policy row as shipped - the out-of-the-box posture (ADR-036, v6.2.0+). Out of the box, SQL injection, PII, and sensitive-data detections warn (the request flows through unchanged but the detection is recorded), while the unambiguously dangerous classes block: admin-table access, Indonesian KTP, and prompt-injection ship as block. Singapore PII ships as redact.

This is deliberate (observe-first): false positives that hard-block legitimate traffic teach users to bypass the system. To harden enforcement, record an organization detection-posture override for the category (for example pii=block or sqli=block), or change that one policy for your organization: in v11 every edition can disable, re-enable or re-action a shipped policy, while the v10.x tenant-policy write routes answer 409 LEGACY_POLICY_WRITE_FROZEN. Since v11 no environment variable or profile sets an action: AXONFLOW_PROFILE and the *_ACTION variables are ignored with a boot warning (see Governance Profiles (removed in v11)).

For detection categories the stored action decides unless the organization records an override for that category. What the Action column means at runtime has the per-plane matrix and the resolution order.

Overview​

CategoryEvaluationCountSeverity RangeDefault Action
Security - SQL Injection (security-sqli)Pattern-Based (Agent)38Critical - MediumWarn
Security - Admin Access (security-admin)Pattern-Based (Agent)4High - MediumBlock
Security - Dangerous Instructions (security-dangerous)Pattern-Based (Agent)4HighBlock
Sensitive Data / Secrets (sensitive-data)Pattern-Based (Agent)6HighWarn
PII - Global (pii-global)Pattern-Based (Agent)7Critical - LowWarn / Log
PII - United States (pii-us)Pattern-Based (Agent)2CriticalWarn
PII - European Union (pii-eu)Pattern-Based (Agent)1CriticalWarn
PII - India (pii-india)Pattern-Based (Agent)2CriticalWarn
PII - Singapore (pii-singapore)Pattern-Based (Agent)5Critical - LowRedact
PII - Indonesia (pii-indonesia)Pattern-Based (Agent)1CriticalBlock
Risk Management (dynamic-risk)Condition-Based (Orchestrator)2-Warn / Alert
Compliance (dynamic-compliance)Condition-Based (Orchestrator)3-Block
Security Controls (dynamic-security)Condition-Based (Orchestrator)2-Block
Cost Management (dynamic-cost)Condition-Based (Orchestrator)2-Block / Warn
Access Control (dynamic-access)Condition-Based (Orchestrator)1-Block
Media Safety (media-safety)Condition-Based (Orchestrator)2-Block / Alert
Media Biometric (media-biometric)Condition-Based (Orchestrator)1-Log
Media PII (media-pii)Condition-Based (Orchestrator)1-Block
Media Document (media-document)Condition-Based (Orchestrator)1-Alert + Log

Pattern-based total: 70 · Condition-based total: 15 · All system policies: 85.

"Secret/unsafe-code" detection

Generic secret detection (API keys, tokens, passwords, connection strings) ships as the sensitive-data category below. Language-specific code secret/unsafe patterns (e.g. provider-specific API-key formats, eval()/pickle) are surfaced today only as audit metadata on generated-code responses, not as enforced policies. Enforced agent-traffic code-secret/unsafe-code detection is tracked as potential net-new work, not a shipped system policy.


What the Action column means at runtime​

The Action column in the tables on this page is the action each policy is seeded with. In v11 the platform compiles these rows into the policies its decision engine runs, and the action each one takes on each plane is listed in Shipped Policy Posture. For the three detection categories (pii-*, security-sqli, security-dangerous), an organization's recorded detection-posture override replaces it on the platform's policies, and any shipped policy's action can be changed for a single organization. No environment variable or profile takes part.

An organization override replaces the stored action for the platform's policies in the category

A pii-* row that stores block denies on the decision API, gateway, MCP, and OpenAI-compatible planes unless the organization has recorded a weaker pii override, which then governs every platform pii-* policy for that organization. If a compliance requirement says a category must hard-deny, keep the row's block and do not record a weaker override, or record block for the category.

sensitive-data, the compliance categories (compliance-*, fincrime) and admin-access have no override category. Their shipped action decides unless your organization changes the policy itself.

Resolution order​

The effective action for a detection category resolves in this order, first match wins:

  1. Per-org detection override, set through Detection Posture (the portal write path is Enterprise; the enforcement planes honor overrides in both editions). pii reaches the 18 platform pii-* policies, sqli the 38 platform security-sqli policies, and dangerous_command the four platform policies in security-dangerous, which are the indirect prompt-injection guards; dangerous_query maps onto no policy category, and the 22 organization-editable policies are not reached.
  2. The shipped action of the matched policy on the plane being decided, as listed in Shipped Policy Posture. A policy your organization has changed decides with the action you set.

The environment variables that used to sit between these two (PII_ACTION, SQLI_ACTION, SENSITIVE_DATA_ACTION, DANGEROUS_COMMAND_ACTION, their GATEWAY_* / MCP_* variants, and the AXONFLOW_PROFILE defaults) were removed in v11 and are ignored with a boot warning. See Environment Variables Reference.

What each plane does with an action​

Each plane renders the resolved action in its own wire shape:

Planeblockredactwarn / log
Decision API (POST /api/v1/decide)denyallow plus a redact_pii obligationallow, recorded
Gateway pre-checkapproved=falseallow plus requires_redaction (masking is the caller-side contract)allow, recorded
MCP check-input / check_policyallowed=falseallowed, with the statement maskedallowed
MCP tools/execute, resources/queryHTTP 403refused (unsupported_obligation): this surface cannot mask the requestrecorded only
OpenAI-compatible (/v1/chat/completions)HTTP 400refused (unsupported_obligation): this surface cannot mask contentallow
Orchestrator response phasewithholdmasknothing

A redaction is mandatory, so a plane that cannot carry it out refuses the request rather than passing the content unmasked. The shipped policies bind each plane an action it can discharge; a redaction an organization's override makes mandatory is never downgraded.

In v10.x the proxy's POST /api/v1/request tier-aware pass read the row's stored action with no organization override applied, and Claude Code / Cowork OTEL ingest redacted at the collector whatever the action. In v11 both planes are decided by the policy decision engine like every other, with the actions the posture table lists for them.

When an override weakens a stored action​

From platform v9.19.0 to v10.x, a downward displacement (a stored block resolved to redact under a pii=redact override, say) put an advisory reason on the decision API's allow verdict. In v11 that reason is no longer emitted: the decision names the policy that decided, and a matched policy that attaches no obligation the wire carries is named in the allow verdict's reasons. axonflow_agent_policy_stored_action_displaced_total{category,stored,resolved} still counts displacements on the planes that resolve an action through the shared conversion, so an alert built on it keeps working.

Upward displacement (an override tightening a warn row to block) is the override doing its designed job and is not counted.

Worked example: sys_pii_indonesia_ktp​

The shipped policy's action is block on every plane that runs it.

  • No override: POST /api/v1/decide with a query that matches the policy's KTP pattern returns verdict=deny.
  • pii=redact override: the same request returns verdict=allow with a redact_pii obligation, and the policy in evaluated_policies.
  • pii=block override: the request returns verdict=deny.

If your compliance posture requires KTP or NIK to hard-deny, do not record a pii override weaker than block.

Authoring guidance​

Before relying on a policy's action, check three things: its shipped action on the plane in question (in Shipped Policy Posture), whether your organization has changed that policy, and whether it has recorded an override for the policy's detection category (GET /api/v1/detection-posture). Changing a policy and recording an override are both audited, and an override reaches every policy in its category.

Pattern-Based System Policies​

Security - SQL Injection (security-sqli)​

38 patterns covering all major SQL injection techniques.

UNION-Based Injection (2 patterns)​

IDNameSeverityAction
sys_sqli_union_selectUNION SELECT DetectionCriticalWarn
sys_sqli_union_injectionUNION Injection After TerminationCriticalWarn

Boolean-Based Blind Injection (3 patterns)​

IDNameSeverityAction
sys_sqli_or_trueOR True ConditionHighWarn
sys_sqli_or_stringOR String ConditionHighWarn
sys_sqli_and_falseAND False ConditionHighWarn

Time-Based Blind Injection (4 patterns)​

IDNameSeverityAction
sys_sqli_sleepMySQL SLEEP FunctionCriticalWarn
sys_sqli_waitforSQL Server WAITFOR DELAYCriticalWarn
sys_sqli_pg_sleepPostgreSQL pg_sleepCriticalWarn
sys_sqli_benchmarkMySQL BENCHMARK FunctionCriticalWarn

Error-Based Injection (3 patterns)​

IDNameSeverityAction
sys_sqli_extractvalueEXTRACTVALUE FunctionHighWarn
sys_sqli_updatexmlUPDATEXML FunctionHighWarn
sys_sqli_convert_intCONVERT INT InjectionHighWarn

Stacked Queries (5 patterns)​

IDNameSeverityAction
sys_sqli_stacked_dropStacked DROP StatementCriticalWarn
sys_sqli_stacked_deleteStacked DELETE StatementCriticalWarn
sys_sqli_stacked_updateStacked UPDATE StatementCriticalWarn
sys_sqli_stacked_insertStacked INSERT StatementCriticalWarn
sys_sqli_stacked_execStacked EXEC StatementCriticalWarn

Comment-Based Injection (4 patterns)​

IDNameSeverityAction
sys_sqli_inline_commentInline Comment InjectionHighWarn
sys_sqli_line_comment_mysqlMySQL Line Comment InjectionHighWarn
sys_sqli_line_comment_dashDouble-Dash Comment InjectionHighWarn
sys_sqli_string_term_commentString-Terminator Comment InjectionHighWarn

Generic Patterns (9 patterns)​

IDNameSeverityAction
sys_sqli_select_fromSELECT FROM After TerminationCriticalWarn
sys_sqli_admin_bypassAuthentication BypassCriticalWarn
sys_sqli_hex_encodingHex-Encoded PayloadMediumWarn
sys_sqli_char_functionCHAR Function ObfuscationHighWarn
sys_sqli_concat_selectCONCAT with Embedded SELECTHighWarn
sys_sqli_information_schemaINFORMATION_SCHEMA AccessHighWarn
sys_sqli_sys_tablesSystem Tables AccessHighWarn
sys_sqli_load_fileLOAD_FILE FunctionCriticalWarn
sys_sqli_into_outfileINTO OUTFILE/DUMPFILECriticalWarn

Dangerous Query Patterns (8 patterns)​

IDNameSeverityAction
sys_sqli_drop_tableDROP TABLE StatementCriticalWarn
sys_sqli_drop_databaseDROP DATABASE StatementCriticalWarn
sys_sqli_truncateTRUNCATE TABLE StatementCriticalWarn
sys_sqli_alter_tableALTER TABLE StatementHighWarn
sys_sqli_delete_no_whereDELETE Without WHERECriticalWarn
sys_sqli_create_userCREATE USER StatementCriticalWarn
sys_sqli_grantGRANT Privileges StatementCriticalWarn
sys_sqli_revokeREVOKE Privileges StatementCriticalWarn

Security - Admin Access (security-admin)​

4 patterns guarding access to sensitive administrative tables and schemas.

IDNameSeverityActionDescription
sys_admin_users_tableUsers Table AccessHighBlockAccess to users table
sys_admin_audit_logAudit Log AccessHighBlockAccess to audit logs
sys_admin_config_tableConfiguration Table AccessHighBlockSystem config access
sys_admin_info_schemaInformation Schema AccessMediumBlockSystem schema access

Security - Dangerous Instructions (security-dangerous)​

4 patterns detecting indirect prompt-injection attempts in free-text that flows into the model (OWASP LLM01). These guard merchant/user-controlled fields and ship as block.

IDNameSeverityActionDescription
sys_dangerous_injection_overridePrompt Injection - Instruction OverrideHighBlock"Ignore/disregard previous instructions" and similar overrides
sys_dangerous_injection_role_overridePrompt Injection - Role ReassignmentHighBlockAttempts to reassign the assistant to a privileged/jailbreak persona
sys_dangerous_injection_system_exfilPrompt Injection - System Prompt ExfiltrationHighBlockAttempts to reveal/print/repeat the system prompt or hidden instructions
sys_dangerous_injection_bracket_markerPrompt Injection - Template/Bracket MarkerHighBlockInjected chat-template/role-delimiter markers ([system], <im_start>, ### system)

Sensitive Data / Secrets (sensitive-data)​

6 patterns detecting credentials and secrets in request/response content (generic, provider-agnostic).

IDNameSeverityActionDescription
sys_sensitive_api_keyAPI Key DetectionHighWarnGeneric API-key assignment patterns
sys_sensitive_tokenToken DetectionHighWarnBearer/access tokens in content
sys_sensitive_secretSecret DetectionHighWarnGeneric secret assignment patterns
sys_sensitive_passwordPassword DetectionHighWarnPassword values in content
sys_sensitive_credentialsCredentials DetectionHighWarnCombined credential patterns
sys_sensitive_connectionConnection String DetectionHighWarnDatabase/service connection strings

PII - Global (pii-global)​

7 universal patterns applicable in all regions.

IDNameSeverityActionDescription
sys_pii_credit_cardCredit Card NumberCriticalWarnVisa, MC, Amex, Discover, Diners, JCB
sys_pii_passportPassport NumberHighWarnGeneric passport format
sys_pii_dobDate of BirthHighLogCommon date formats
sys_pii_emailEmail AddressMediumLogStandard email format
sys_pii_phonePhone NumberMediumLogInternational formats
sys_pii_ip_addressIP AddressMediumLogIPv4 addresses
sys_pii_booking_refBooking ReferenceLowLogContext-anchored 6-char alphanumeric

PII - United States (pii-us)​

IDNameSeverityActionDescription
sys_pii_ssnSocial Security NumberCriticalWarnXXX-XX-XXXX format
sys_pii_bank_accountBank Account NumberCriticalWarnRouting + account number

PII - European Union (pii-eu)​

IDNameSeverityActionDescription
sys_pii_ibanIBANCriticalWarnInternational Bank Account Number

PII - India (pii-india)​

IDNameSeverityActionDescription
sys_pii_panPAN (Permanent Account Number)CriticalWarn10-char with entity-type validation
sys_pii_aadhaarAadhaar NumberCriticalWarn12-digit UID (DPDP Act 2023)

PII - Singapore (pii-singapore)​

Singapore-specific patterns support MAS FEAT-oriented governance and regional privacy controls in Community Edition. These ship as redact.

IDNameSeverityActionDescription
sys_pii_singapore_nricSingapore NRIC DetectionCriticalRedactNational Registration Identity Card pattern
sys_pii_singapore_finSingapore FIN DetectionCriticalRedactForeign Identification Number pattern
sys_pii_singapore_uenSingapore UEN DetectionHighRedactUnique Entity Number pattern
sys_pii_singapore_phoneSingapore Phone DetectionMediumRedact+65 phone numbers
sys_pii_singapore_postalSingapore Postal Code DetectionLowWarnSix-digit postal code pattern

PII - Indonesia (pii-indonesia)​

Indonesia KTP/NIK detection for OJK / BI / UU PDP compliance. The Community shared engine seeds the KTP menu entry as block; the Enterprise Indonesia PII detector additionally enforces NIK, NPWP, phone, and major-bank account patterns at runtime with NIK validation.

IDNameSeverityActionDescription
sys_pii_indonesia_ktpIndonesian KTP DetectionCriticalBlock16-digit KTP/NIK (keyword-anchored, NIK-validated)

Condition-Based System Policies​

Condition-based policies use context-aware rules evaluated by the Orchestrator. These provide runtime governance for risk, compliance, cost, and access control.

Policy ID Naming Convention​

System policy IDs follow the pattern: sys_ + category abbreviation + specific pattern name.

PrefixMeaningExample
sys_sqli_SQL injection patternsys_sqli_union_select
sys_admin_Admin access controlsys_admin_users_table
sys_dangerous_Prompt-injection guardsys_dangerous_injection_override
sys_sensitive_Secret / sensitive-data patternsys_sensitive_api_key
sys_pii_PII detection patternsys_pii_ssn
sys_dyn_Dynamic/condition-based policysys_dyn_high_risk_block
sys_media_Media-governance policy (image, document, biometric)sys_media_nsfw_block

Risk Management (dynamic-risk)​

IDNameConditionAction
sys_dyn_high_risk_blockBlock High-Risk Queriesrisk_score > 0.8Warn
sys_dyn_anomalous_accessAnomalous Access Detectionrisk_score > 0.6 and anomalous access patternAlert

sys_dyn_high_risk_block keeps the name it shipped with, but its shipped action is warn.

Condition example (as returned by GET /api/v1/policies):

{
"id": "sys_dyn_high_risk_block",
"name": "Block High-Risk Queries",
"type": "risk_based",
"category": "dynamic-risk",
"tier": "system",
"conditions": [
{"field": "risk_score", "operator": "greater_than", "value": 0.8}
],
"actions": [
{"type": "block", "config": {"reason": "Query risk score exceeds safety threshold"}}
],
"enabled": true
}

Compliance (dynamic-compliance)​

IDNameConditionAction
sys_dyn_hipaaHIPAA ComplianceHealthcare data keywords presentRedact + Log
sys_dyn_gdprGDPR ComplianceUser region in EU/EEA/UKRedact + Log
sys_dyn_financialFinancial Data ProtectionFinancial data keywords presentRedact + Log

Condition example (as returned by GET /api/v1/policies):

{
"id": "sys_dyn_hipaa",
"name": "HIPAA Compliance",
"type": "compliance",
"category": "dynamic-compliance",
"tier": "system",
"conditions": [
{"field": "query", "operator": "contains_any", "value": ["patient", "diagnosis", "treatment", "medical_record", "prescription"]}
],
"actions": [
{"type": "redact", "config": {"fields": ["patient_id", "ssn", "medical_record_number"]}},
{"type": "log", "config": {"compliance": "hipaa"}}
],
"enabled": true
}

Security Controls (dynamic-security)​

IDNameConditionAction
sys_dyn_tenant_isolationTenant IsolationCross-tenant tenant_id access attemptBlock
sys_dyn_debug_restrictDebug Mode Restrictiondebug query outside development environmentBlock

Cost Management (dynamic-cost)​

IDNameConditionAction
sys_dyn_expensive_queryExpensive Query Limitcost_estimate > 100Alert + Log
sys_dyn_llm_costLLM Cost OptimizationLLM chat and monthly_llm_usage > 1000Add risk + Alert

Access Control (dynamic-access)​

IDNameConditionAction
sys_dyn_sensitive_dataSensitive Data ControlQuery references salary, SSN, or medical recordsRedact

Media Safety (media-safety)​

Media-governance controls evaluate the classifier scores and flags attached to an image or document by the media pipeline, so they only fire on requests that carry media.

IDNameConditionAction
sys_media_nsfw_blockNSFW Content Blockingmedia.nsfw_score > 0.8Block
sys_media_violence_warnViolence Content Warningmedia.violence_score > 0.7Alert + Log

Media Biometric (media-biometric)​

IDNameConditionAction
sys_media_biometric_logBiometric Data Auditmedia.has_biometric_data is trueLog

Media PII (media-pii)​

IDNameConditionAction
sys_media_pii_blockImage PII Blockingmedia.has_pii is trueBlock

Media Document (media-document)​

IDNameConditionAction
sys_media_sensitive_doc_warnSensitive Document Detectionmedia.is_sensitive_document is trueAlert + Log

Querying System Policies​

List All System Policies​

const policies = await client.listStaticPolicies({
tier: 'system'
});

console.log(`Total system policies: ${policies.length}`);

Filter by Category​

// Get all SQL injection policies
const sqli = await client.listStaticPolicies({
tier: 'system',
category: 'security-sqli'
});

// Get all PII policies
const pii = await client.listStaticPolicies({
tier: 'system',
category: 'pii-global'
});

REST API​

# All system policies
curl "http://localhost:8080/api/v1/system-policies?tier=system"

# Filtered by category
curl "http://localhost:8080/api/v1/system-policies?tier=system&category=security-sqli"

Customizing System Policies​

You cannot modify a system policy's pattern or condition. In v11 your organization can, on every edition, disable a shipped policy, re-enable it, or change its action to block, redact, warn or log, for that organization only.

To change every policy in a detection category at once, record a detection-posture override for the category, for example pii=block. It re-actions the platform's policies in that category on the planes that apply organization overrides (the Decision API, Gateway Mode's pre-check, MCP, the OpenAI-compatible route, Proxy Mode's request, the orchestrator's response filter and the policy test surface), and not the 22 organization-editable policies, which your organization changes in its own typed policy document.

v10.x per-policy overrides

In v10.x a per-policy override was recorded through POST /api/v1/system-policies/{id}/override (the SDKs' createPolicyOverride), optionally with an expiration, and required an Enterprise license. Those routes are deprecated with the rest of the legacy system-policy family: the v11 policy decision engine does not read what they write, so an override recorded there changes no v11 decision. Overrides already recorded that way are carried into v11's per-policy control once, at upgrade.


Rollout Checklist​

Use this page as one layer of the broader governance rollout: