Files
agentforge/policies/default/versions/v1.yaml
T

62 lines
1.9 KiB
YAML

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