---
name: guardian-policy
description: Security policy for content scanning, threat assessment, blacklist management, and audit trails
title: Guardian Policy
category: core
status: active
metadata:
  triggers:
  - security scan
  - blacklist
  - content check
  - guardian
  - threat assessment
---
## Instructions

Enforce security policy through content scanning, blacklist management, and audit trails.

### Blacklist Management

The blacklist lives in `agnt-system/security/blacklist.md` as a markdown table with:
- **value** — the blocked pattern (URL, domain, phrase, contact)
- **category** — type of threat: `url`, `domain`, `email`, `phone`, `phrase`, `pattern`
- **reason** — why it's blocked
- **source** — who added it: `user` (manual) or `agent` (recommended)
- **status** — `active` (enforced) or `pending` (agent recommendation, needs user approval)

### Content Scanning

Scan all outgoing content against the blacklist:
- Email bodies and recipients
- Channel messages (WhatsApp, Telegram, etc.)
- Task outputs and deliverables
- Any content the agent generates for external sharing

Scan returns:
- **clean** — no matches found
- **flagged** — matches found, with details of which entries matched and where

### Agent Recommendations

The agent can recommend blacklist entries (status: pending) when it detects:
- Suspicious URLs in ingested content
- Known phishing patterns in emails
- Contacts that the user has expressed distrust toward
- Content patterns that violate the user's stated preferences

Pending recommendations require user approval before becoming active.

### Threat Assessment Criteria

| Severity | Examples | Action |
|----------|----------|--------|
| Critical | Known malware URLs, phishing domains | Block immediately, alert user |
| High | Suspicious links, unknown senders requesting sensitive info | Flag for review |
| Medium | Unrecognized domains in automated content | Log, include in daily report |
| Low | Mildly suspicious patterns | Note in audit trail |

### Audit Trail

Every security-relevant action is logged:
- Blacklist additions and removals
- Content scan results (especially flagged items)
- Agent recommendations and their approval/rejection
- Contract enforcement decisions (allowed/blocked/confirmed)

## Rules

- User-added blacklist entries are always active — no approval needed
- Agent-added entries are always pending until user approves
- Never silently block content — always inform the user why
- Blacklist scanning is case-insensitive
- Duplicate entries are detected and skipped
- The blacklist is a defense layer, not a content filter — it blocks threats, not disagreements