VerifAIer Sentinel · governance engine
Verdict System & Rule Taxonomy
Deterministic escalation logic applied locally. No model inference. No cloud calls. Every verdict is reproducible from the same input under the same profile.
01 — verdict system
Three-State Verdict
The rule engine detected no pattern matches, or all matched findings fall below the active profile's escalation thresholds.
Minimum status override: profiles with
minimum_status: "yellow" cannot produce GREEN, regardless
of findings.
One or more findings are present and at least one escalation rule
targets yellow, or the profile enforces a
minimum_status of yellow.
escalate_to: "yellow" rule, or no red rule matched but
minimum_status is yellow.Human action: interaction should be reviewed before proceeding. Receipt exported with findings detail.
At least one finding triggered a escalate_to: "red"
escalation rule in the active profile. Interaction is flagged for
immediate action.
escalate_to: "red". The wildcard rule
"*" (sovereign profile) matches all types.Human action: interaction blocked at UI layer. Receipt written to audit vault with full escalation reason chain.
02 — finding taxonomy
Finding Types
Six types are produced by the active rule engine. Four are reserved for forward-compatible profile configuration (dashed border) — no current rule emits them.
Raw or template-literal SQL strings passed directly to an AI prompt without parameterization. Indicates potential for malicious query construction.
Presence of eval(), Function(), or similar dynamic code execution patterns in AI-generated or AI-augmented content.
Shell metacharacters or command chaining operators in prompt content that could be passed to a subprocess or command executor.
Patterns that attempt to circumvent authentication or authorization checks, such as always-true conditions in auth context.
API keys, tokens, or credentials pasted inline into prompt content. Detects common secret prefixes and high-entropy strings.
Indirect instruction patterns embedded in user content or retrieved data that attempt to override the AI system's behavioral instructions.
Credential material transmitted, stored, or logged in a manner inconsistent with security policy. Reserved for session and token handling audits.
User-controlled data passed to downstream processing without sanitization. Covers future schema validation and input boundary checks.
Explicit attempt to circumvent governance policy enforcement, such as disabling audit logging or suppressing findings.
Dynamic code execution beyond eval() scope — child processes, WASM loading, or runtime code generation from AI output.
03 — escalation logic
Escalation Chain
Deterministic invariant: given the same
findings[] array and profileId, the function
applyGovernancePolicy() always returns the same output.
No randomness. No external calls. No state mutation.
local_rules.js evaluates the captured interaction text with pure
RegExp functions. Each match produces a structured finding with
type, severity, match, and confidence.
No network. No model calls.
The active governance profile is resolved from the profile registry
(GOVERNANCE_PROFILES[profileId]). Unknown profile IDs
fall back to default silently.
For each finding, the profile's severity_overrides map
is consulted. If the finding type appears in the map, the override
replaces the rule engine's base severity. The original finding object
is never mutated — a new object is composed via Object.assign().
Each escalation rule is checked against the finding type. If a match
exists, the verdict is raised to the rule's escalate_to
status. The escalation reason string is appended to
escalationReasons[] in the output. Wildcard rules
(finding_type: "*") match all types.
After all findings are processed, the profile's
minimum_status is compared against the computed status.
The status rank is red > yellow > green. If the
profile minimum exceeds the computed status, the minimum wins.
Enterprise, Banking, and Government profiles set
minimum_status: "yellow".
applyGovernancePolicy() returns a pure object. No side
effects. The return value is consumed by audit_receipt.js
to compose the deterministic SHA-256 receipt.
04 — profile matrix
Severity by Profile
Effective severity after severity_overrides and escalation target
per profile. Cells show: effective severity /
escalation status. MIN = minimum_status floor (no escalation rule fired, but profile floor applies).
| Finding Type | Default | Developer | Enterprise | Banking | Government |
|---|---|---|---|---|---|
| SQL_INJECTION_RISK |
HIGH
|
HIGH
→ yellow
|
CRITICAL
→ red
|
CRITICAL
→ red
|
CRITICAL
→ red
|
| UNSAFE_EVAL |
HIGH
|
CRITICAL
→ red
|
HIGH
MIN: yellow
|
CRITICAL
→ red
|
CRITICAL
→ red
|
| SHELL_INJECTION_RISK |
HIGH
|
CRITICAL
→ red
|
HIGH
MIN: yellow
|
CRITICAL
→ red
|
CRITICAL
→ red
|
| AUTH_BYPASS_RISK |
HIGH
|
HIGH
|
CRITICAL
→ red
|
CRITICAL
→ red
|
CRITICAL
→ red
|
| HARDCODED_SECRET |
HIGH
|
HIGH
|
CRITICAL
→ red
|
CRITICAL
→ red
|
CRITICAL
→ red
|
| PROMPT_INJECTION_RISK |
MEDIUM
|
MEDIUM
|
HIGH
→ red
|
CRITICAL
→ red
|
CRITICAL
→ red
|
| INSECURE_CREDENTIAL_HANDLING forward-compatible |
MEDIUM
|
HIGH
→ yellow
|
CRITICAL
→ red
|
CRITICAL
→ red
|
CRITICAL
→ red
|
| UNVALIDATED_INPUT forward-compatible |
LOW
|
LOW
|
HIGH
MIN: yellow
|
HIGH
MIN: yellow
|
HIGH
MIN: yellow
|
| POLICY_BYPASS forward-compatible |
HIGH
|
HIGH
|
HIGH
MIN: yellow
|
CRITICAL
→ red
|
CRITICAL
MIN: yellow
|
| UNSAFE_EXECUTION forward-compatible |
HIGH
|
CRITICAL
→ red
|
HIGH
MIN: yellow
|
CRITICAL
→ red
|
CRITICAL
MIN: yellow
|
minimum_status: "yellow" — no clean GREEN verdict is possible under these profiles, regardless of findings.
05 — finding structure
Escalated Finding Object
{ // ── Original rule engine fields ──────────────────────────────────── "type": "SQL_INJECTION_RISK", // finding type from local_rules.js "match": "SELECT * FROM users WHERE id = ${userId}", "confidence": 0.94, // 0.0 – 1.0 from rule scorer "offset": 142, // character position in input // ── After applyGovernancePolicy() ───────────────────────────────── "severity": "CRITICAL", // overridden from "HIGH" by enterprise profile "governance_escalated": true, // escalation rule was triggered "governance_reason": "enterprise:sql_injection_always_red", // ── Written into audit receipt ───────────────────────────────────── "profile_id": "enterprise", "verdict_contribution": "red" // this finding set the final verdict }
Immutability invariant: applyGovernancePolicy()
uses Object.assign({}, finding, ...) — it never mutates
the input findings array. The original rule engine output is preserved
unchanged. The escalated object is a new allocation.
06 — profile reference
Profile Summary
| Profile ID | Regulatory Context | Risk Tolerance | Minimum Status | Audit Tier | Escalation Rules |
|---|---|---|---|---|---|
default |
none | medium | none | standard | 0 |
developer |
none | medium | none | developer | 5 |
enterprise |
enterprise_compliance | low | yellow | enterprise | 5 |
banking |
pci_dss_sox | very_low | yellow | regulated | 9 |
government |
fisma_fedramp | very_low | yellow | government | 7 |
sovereign |
sovereign_data | zero | yellow | sovereign | 1 (wildcard *) |
Local-first invariant: all six profiles are resolved
from the in-extension registry (GOVERNANCE_PROFILES) at
runtime. No profile data is fetched from a remote server.
Profile selection changes the deterministic outcome of the same input —
no model is re-queried.