feat(policies): añade política default v1 con guardrails completos
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
name: default
|
||||||
|
versions:
|
||||||
|
- id: v1
|
||||||
|
hash: pending
|
||||||
|
author: Juan
|
||||||
|
message: Política base inicial con PII, injection, schema y reglas telco.
|
||||||
|
created_at: 2026-04-01T10:00:00Z
|
||||||
|
active_version: v1
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
name: default
|
||||||
|
version: v1
|
||||||
|
description: Política base aplicada a agentes de operación de plataforma de voz.
|
||||||
|
input_validators:
|
||||||
|
- type: detect_pii
|
||||||
|
config:
|
||||||
|
entities: [PERSON, EMAIL_ADDRESS, PHONE_NUMBER, ES_NIF, IP_ADDRESS, IBAN_CODE]
|
||||||
|
severity_on_match: block
|
||||||
|
- type: prompt_injection
|
||||||
|
config:
|
||||||
|
severity_on_match: block
|
||||||
|
- type: toxic_language
|
||||||
|
config:
|
||||||
|
threshold: 0.7
|
||||||
|
severity_on_match: warning
|
||||||
|
- type: forbidden_topics
|
||||||
|
config:
|
||||||
|
topics: ["instrucciones de explotación", "credenciales", "código malicioso"]
|
||||||
|
severity_on_match: block
|
||||||
|
|
||||||
|
output_validators:
|
||||||
|
- type: schema_match
|
||||||
|
config:
|
||||||
|
severity_on_mismatch: block
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
required: [severity, root_cause_hypothesis, proposed_actions]
|
||||||
|
properties:
|
||||||
|
severity:
|
||||||
|
type: string
|
||||||
|
enum: [low, medium, high, critical]
|
||||||
|
root_cause_hypothesis:
|
||||||
|
type: string
|
||||||
|
proposed_actions:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
required: [id, action, target, risk_score, rollback_plan, requires_approval]
|
||||||
|
properties:
|
||||||
|
id: {type: string}
|
||||||
|
action: {type: string}
|
||||||
|
target: {type: string}
|
||||||
|
risk_score: {type: integer, minimum: 1, maximum: 5}
|
||||||
|
rollback_plan: {type: string}
|
||||||
|
requires_approval: {type: boolean}
|
||||||
|
- type: pii_leakage
|
||||||
|
config:
|
||||||
|
entities: [EMAIL_ADDRESS, PHONE_NUMBER, ES_NIF, IP_ADDRESS]
|
||||||
|
severity_on_match: block
|
||||||
|
- type: forbidden_action_keywords
|
||||||
|
config:
|
||||||
|
keywords: ["DROP TABLE", "rm -rf", "shutdown -h now", "delete production", "format c:"]
|
||||||
|
severity_on_match: block
|
||||||
|
- type: telco_safety_rules
|
||||||
|
config:
|
||||||
|
rules:
|
||||||
|
- never_propose_action_targeting_production_without_rollback
|
||||||
|
- never_propose_mass_action_without_canary
|
||||||
|
severity_on_violation: block
|
||||||
|
|
||||||
|
on_validator_error: fail_closed
|
||||||
Reference in New Issue
Block a user