Rohit-2002's picture
Upload 6 files
b94ec37 verified
Raw
History Blame Contribute Delete
559 Bytes
POLICIES = {
"security": ["Always escalate security issues"],
"billing": ["Mention refund if duplicate charge"],
"account": ["Guide reset steps"]
}
def check_policy(action, category):
violations = []
if category == "security" and action.action_type != "escalate":
violations.append("Security issue not escalated")
if action.response_text:
if "password" in action.response_text.lower() and "reset" not in action.response_text.lower():
violations.append("Unsafe password handling")
return violations