Skip to content

Security

Yunque Agent implements defense-in-depth security architecture with barriers at every stage from input to output.

Security Flow

Request → [Auth] → [RBAC] → [Input Guardrails] → [Approval] → [Execution] → [Output Guardrails] → [Audit] → Response

Guardrails

Input Guardrails

GuardrailFunction
PII RedactionAuto-detect and mask personal information (email, phone, SSN, credit card, etc.)
Injection DetectionDetect prompt injection (role override, system prompt leak, jailbreak attempts)
Content ModerationFilter harmful, illegal, or inappropriate content

Output Guardrails

GuardrailFunction
PII RedactionEnsure no PII in replies
Egress GuardSensitive data exfiltration detection
Audit LoggingEvery reply recorded in Merkle audit chain

Trust Score

Behavior-based progressive permission model:

Score RangePermission LevelCapabilities
0 – 29ReadOnlyFile read, web search
30 – 59WriteFile creation, editing
60 – 79NetworkHTTP requests, API calls
80 – 100ShellSystem command execution

Audit Trail

Immutable Merkle chain records every Agent action:

  • Each entry contains SHA-256 hash of the previous entry
  • Date-segmented structured audit files
  • GET /v1/audit/verify — Verify chain integrity
  • GET /v1/audit/events — Query audit events

RBAC

Fine-grained role-based access control:

  • Built-in roles: owner, admin, user, viewer
  • Custom roles with specific permission sets
  • 4-level inheritance: Global → Tenant → User → Session

Approval System

High-risk operations require explicit approval:

FeatureDescription
Risk Classification4-tier auto classification: safe / caution / danger / critical
Shell Guard40+ regex patterns for dangerous shell syntax
Tool GuardTool call risk assessment
Decision Optionsallow_once / allow_always / deny_always
Persistent RulesSession/user/global scope, stored in Ledger KV
IM IntegrationFeishu cards / Telegram buttons for direct approval

HTTP Security Headers

Auto-applied in production: CSP, HSTS, X-Content-Type-Options, X-Frame-Options.

First-Run Security

On first launch without a password, all API access is blocked (only auth/setup/health allowed) until a password is set via the setup wizard.

© 2025 云鸢科技(青岛)有限公司 × Dream Lab