@highflame/policy 2.1.7 → 2.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_schemas/guardrails/context.json +78 -0
- package/_schemas/guardrails/schema.cedarschema +28 -1
- package/_schemas/guardrails/templates/profiles/a2a_security/cross_origin.cedar +105 -0
- package/_schemas/guardrails/templates/profiles/a2a_security/escalation_detection.cedar +113 -0
- package/_schemas/guardrails/templates/profiles/a2a_security/identity_enforcement.cedar +118 -0
- package/_schemas/guardrails/templates/profiles/a2a_security/inter_agent_injection.cedar +134 -0
- package/_schemas/guardrails/templates/profiles/a2a_security/supply_chain.cedar +117 -0
- package/_schemas/guardrails/templates/profiles/advanced_detection/pii.cedar +73 -0
- package/_schemas/guardrails/templates/profiles/advanced_detection/secrets.cedar +66 -0
- package/_schemas/guardrails/templates/profiles/advanced_detection/threat_severity.cedar +35 -0
- package/_schemas/guardrails/templates/profiles/code_agent/encoding.cedar +55 -0
- package/_schemas/guardrails/templates/profiles/code_agent/path_security.cedar +148 -0
- package/_schemas/guardrails/templates/profiles/code_agent/supply_chain.cedar +120 -0
- package/_schemas/guardrails/templates/templates.json +121 -6
- package/dist/guardrails-context.gen.d.ts +5 -0
- package/dist/guardrails-context.gen.js +5 -0
- package/dist/guardrails-defaults.gen.js +1315 -6
- package/dist/service-schemas.gen.d.ts +1 -1
- package/dist/service-schemas.gen.js +41 -1
- package/package.json +1 -1
|
@@ -1400,6 +1400,1101 @@ forbid (
|
|
|
1400
1400
|
)
|
|
1401
1401
|
};
|
|
1402
1402
|
`;
|
|
1403
|
+
const GUARDRAILS_CODE_AGENT_PATH_SECURITY_CEDAR = `// =============================================================================
|
|
1404
|
+
// Code Agent — Path Security
|
|
1405
|
+
// =============================================================================
|
|
1406
|
+
// Blocks access to sensitive file paths including environment files, credential
|
|
1407
|
+
// files, system directories, and credential directories. Also blocks destructive
|
|
1408
|
+
// file operations (delete, rmdir, unlink) by default.
|
|
1409
|
+
//
|
|
1410
|
+
// Adapted from Overwatch IDE security policies for Guardrails namespace.
|
|
1411
|
+
//
|
|
1412
|
+
// Compliance:
|
|
1413
|
+
// NIST 800-53 AC-6 (Least Privilege)
|
|
1414
|
+
// NIST 800-53 SC-28 (Protection of Information at Rest)
|
|
1415
|
+
// MITRE ATT&CK T1552 (Unsecured Credentials)
|
|
1416
|
+
// MITRE ATT&CK T1005 (Data from Local System)
|
|
1417
|
+
// CIS Benchmark 1.4 (Secrets Management)
|
|
1418
|
+
//
|
|
1419
|
+
// Category: security
|
|
1420
|
+
// Namespace: Guardrails
|
|
1421
|
+
// =============================================================================
|
|
1422
|
+
|
|
1423
|
+
// ---------------------------------------------------------------------------
|
|
1424
|
+
// Section 1: Environment File Protection
|
|
1425
|
+
// Environment files are the #1 source of accidental credential exposure.
|
|
1426
|
+
// ---------------------------------------------------------------------------
|
|
1427
|
+
|
|
1428
|
+
@id("code-block-env-files")
|
|
1429
|
+
@name("Block .env file access")
|
|
1430
|
+
@description("Block access to .env files that commonly contain secrets, API keys, and database credentials. Environment files are the #1 source of accidental credential exposure in development workflows.")
|
|
1431
|
+
@severity("high")
|
|
1432
|
+
@tags("profile,code-agent,path-security,env-files,secrets,nist-sc-28,mitre-t1552")
|
|
1433
|
+
@reject_message("Access to .env files is blocked because they commonly contain secrets, API keys, and database credentials. Use a secrets manager instead of .env files.")
|
|
1434
|
+
forbid (
|
|
1435
|
+
principal,
|
|
1436
|
+
action in [Guardrails::Action::"read_file", Guardrails::Action::"write_file", Guardrails::Action::"call_tool"],
|
|
1437
|
+
resource
|
|
1438
|
+
)
|
|
1439
|
+
when {
|
|
1440
|
+
context has path && context.path like "*.env*"
|
|
1441
|
+
};
|
|
1442
|
+
|
|
1443
|
+
// ---------------------------------------------------------------------------
|
|
1444
|
+
// Section 2: Credential File Protection
|
|
1445
|
+
// Blocks access to common credential and configuration files.
|
|
1446
|
+
// ---------------------------------------------------------------------------
|
|
1447
|
+
|
|
1448
|
+
@id("code-block-credential-files")
|
|
1449
|
+
@name("Block credential file access")
|
|
1450
|
+
@description("Block access to common credential files: .netrc, .npmrc, .pypirc, Docker config, Kubernetes config, cloud provider credentials, and service account files.")
|
|
1451
|
+
@severity("high")
|
|
1452
|
+
@tags("profile,code-agent,path-security,credential-files,secrets,nist-sc-28,mitre-t1555")
|
|
1453
|
+
@reject_message("Access to this credential file is blocked. Files like .netrc, .npmrc, .pypirc, and cloud provider config files commonly contain hardcoded credentials.")
|
|
1454
|
+
forbid (
|
|
1455
|
+
principal,
|
|
1456
|
+
action in [Guardrails::Action::"read_file", Guardrails::Action::"write_file", Guardrails::Action::"call_tool"],
|
|
1457
|
+
resource
|
|
1458
|
+
)
|
|
1459
|
+
when {
|
|
1460
|
+
context has path &&
|
|
1461
|
+
(context.path like "*/.netrc" ||
|
|
1462
|
+
context.path like "*/.npmrc" ||
|
|
1463
|
+
context.path like "*/.pypirc" ||
|
|
1464
|
+
context.path like "*/.docker/config.json" ||
|
|
1465
|
+
context.path like "*/.kube/config" ||
|
|
1466
|
+
context.path like "*/.config/gcloud/*" ||
|
|
1467
|
+
context.path like "*/credentials.json" ||
|
|
1468
|
+
context.path like "*/service-account*.json")
|
|
1469
|
+
};
|
|
1470
|
+
|
|
1471
|
+
// ---------------------------------------------------------------------------
|
|
1472
|
+
// Section 3: System Directory Protection
|
|
1473
|
+
// Blocks access to sensitive system directories.
|
|
1474
|
+
// ---------------------------------------------------------------------------
|
|
1475
|
+
|
|
1476
|
+
@id("code-block-system-paths")
|
|
1477
|
+
@name("Block system directory access")
|
|
1478
|
+
@description("Prevent access to sensitive system directories (/etc, /proc, /sys, /root, /var). These directories contain system configuration, process information, and credentials that agents must never access.")
|
|
1479
|
+
@severity("high")
|
|
1480
|
+
@tags("profile,code-agent,path-security,system-paths,nist-ac-6,mitre-t1005")
|
|
1481
|
+
@reject_message("Access blocked: this path targets a sensitive system directory. AI agents are restricted from accessing /etc, /proc, /sys, /root, and /var directories.")
|
|
1482
|
+
forbid (
|
|
1483
|
+
principal,
|
|
1484
|
+
action in [Guardrails::Action::"read_file", Guardrails::Action::"write_file", Guardrails::Action::"call_tool"],
|
|
1485
|
+
resource
|
|
1486
|
+
)
|
|
1487
|
+
when {
|
|
1488
|
+
context has path &&
|
|
1489
|
+
(context.path like "/etc/*" ||
|
|
1490
|
+
context.path like "/proc/*" ||
|
|
1491
|
+
context.path like "/sys/*" ||
|
|
1492
|
+
context.path like "/root/*" ||
|
|
1493
|
+
context.path like "/var/log/*" ||
|
|
1494
|
+
context.path like "/var/run/*")
|
|
1495
|
+
};
|
|
1496
|
+
|
|
1497
|
+
// ---------------------------------------------------------------------------
|
|
1498
|
+
// Section 4: Credential Directory Protection
|
|
1499
|
+
// Blocks access to SSH keys, cloud credentials, and key material.
|
|
1500
|
+
// ---------------------------------------------------------------------------
|
|
1501
|
+
|
|
1502
|
+
@id("code-block-credential-paths")
|
|
1503
|
+
@name("Block credential directory access")
|
|
1504
|
+
@description("Prevent access to SSH keys, cloud provider credentials, GPG keys, and other authentication material directories. These are primary targets for credential theft (MITRE T1552).")
|
|
1505
|
+
@severity("critical")
|
|
1506
|
+
@tags("profile,code-agent,path-security,credentials,ssh,aws,mitre-t1552")
|
|
1507
|
+
@reject_message("Access blocked: this path targets a credential or key directory (.ssh, .aws, .gnupg, .config/gcloud). AI agents must never access authentication material.")
|
|
1508
|
+
forbid (
|
|
1509
|
+
principal,
|
|
1510
|
+
action in [Guardrails::Action::"read_file", Guardrails::Action::"write_file", Guardrails::Action::"call_tool"],
|
|
1511
|
+
resource
|
|
1512
|
+
)
|
|
1513
|
+
when {
|
|
1514
|
+
context has path &&
|
|
1515
|
+
(context.path like "*/.ssh/*" ||
|
|
1516
|
+
context.path like "*/.aws/*" ||
|
|
1517
|
+
context.path like "*/.gnupg/*" ||
|
|
1518
|
+
context.path like "*/.config/gcloud/*" ||
|
|
1519
|
+
context.path like "*/.azure/*" ||
|
|
1520
|
+
context.path like "*.pem" ||
|
|
1521
|
+
context.path like "*/id_rsa*" ||
|
|
1522
|
+
context.path like "*/id_ed25519*" ||
|
|
1523
|
+
context.path like "*/id_ecdsa*")
|
|
1524
|
+
};
|
|
1525
|
+
|
|
1526
|
+
// ---------------------------------------------------------------------------
|
|
1527
|
+
// Section 5: Destructive File Operations
|
|
1528
|
+
// Blocks destructive file operations by default.
|
|
1529
|
+
// ---------------------------------------------------------------------------
|
|
1530
|
+
|
|
1531
|
+
@id("code-block-destructive-ops")
|
|
1532
|
+
@name("Block destructive file operations")
|
|
1533
|
+
@description("Block file deletion, directory removal, and other destructive operations. Agents should not have delete access by default — destructive operations require explicit human approval.")
|
|
1534
|
+
@severity("high")
|
|
1535
|
+
@tags("profile,code-agent,path-security,destructive,file-ops,nist-ac-3")
|
|
1536
|
+
@reject_message("Tool execution was blocked: destructive file operations (delete, rmdir, unlink) are restricted to prevent data loss. Request explicit human approval for destructive actions.")
|
|
1537
|
+
forbid (
|
|
1538
|
+
principal,
|
|
1539
|
+
action == Guardrails::Action::"call_tool",
|
|
1540
|
+
resource
|
|
1541
|
+
)
|
|
1542
|
+
when {
|
|
1543
|
+
context has tool_name &&
|
|
1544
|
+
(context.tool_name == "fs.delete" ||
|
|
1545
|
+
context.tool_name == "fs.rmdir" ||
|
|
1546
|
+
context.tool_name == "fs.unlink" ||
|
|
1547
|
+
context.tool_name == "fs.remove" ||
|
|
1548
|
+
context.tool_name == "delete_file" ||
|
|
1549
|
+
context.tool_name == "remove_directory")
|
|
1550
|
+
};
|
|
1551
|
+
`;
|
|
1552
|
+
const GUARDRAILS_CODE_AGENT_SUPPLY_CHAIN_CEDAR = `// =============================================================================
|
|
1553
|
+
// Code Agent — Supply Chain Security
|
|
1554
|
+
// =============================================================================
|
|
1555
|
+
// Detects and blocks MCP server poisoning, indirect prompt injection from tool
|
|
1556
|
+
// outputs, credential theft chains, and destructive operation sequences.
|
|
1557
|
+
//
|
|
1558
|
+
// These are agentic AI-specific attack vectors where tool descriptions, server
|
|
1559
|
+
// responses, or behavioral drift manipulate agent behavior.
|
|
1560
|
+
//
|
|
1561
|
+
// Adapted from Overwatch agent security and behavioral analysis policies for
|
|
1562
|
+
// the Guardrails namespace.
|
|
1563
|
+
//
|
|
1564
|
+
// Compliance:
|
|
1565
|
+
// OWASP ASI01 (Agent Goal Hijack)
|
|
1566
|
+
// OWASP ASI02 (Tool Misuse)
|
|
1567
|
+
// OWASP ASI04 (Supply Chain)
|
|
1568
|
+
// OWASP LLM01 (Prompt Injection) — indirect variant
|
|
1569
|
+
// OWASP MCP01-05
|
|
1570
|
+
// MITRE ATLAS AML.T0051 (Prompt Injection)
|
|
1571
|
+
// MITRE ATT&CK T1552 (Unsecured Credentials)
|
|
1572
|
+
//
|
|
1573
|
+
// Category: agentic_security
|
|
1574
|
+
// Namespace: Guardrails
|
|
1575
|
+
// =============================================================================
|
|
1576
|
+
|
|
1577
|
+
// ---------------------------------------------------------------------------
|
|
1578
|
+
// Section 1: MCP Server Poisoning
|
|
1579
|
+
// Blocks connections to MCP servers with poisoned tool descriptions.
|
|
1580
|
+
// Lower threshold than tool-level poisoning since it affects all tools.
|
|
1581
|
+
// ---------------------------------------------------------------------------
|
|
1582
|
+
|
|
1583
|
+
@id("code-block-server-poisoning")
|
|
1584
|
+
@name("Block poisoned MCP servers")
|
|
1585
|
+
@description("Block connections to MCP servers when tool poisoning patterns are detected in tool descriptions (score >= 60). Lower threshold than tool-level poisoning since server-level poisoning affects all tools on the server.")
|
|
1586
|
+
@severity("critical")
|
|
1587
|
+
@tags("profile,code-agent,supply-chain,tool-poisoning,mcp-security,owasp-asi04")
|
|
1588
|
+
@reject_message("MCP server connection blocked: tool poisoning patterns detected in server tool descriptions. Review server tools before connecting.")
|
|
1589
|
+
forbid (
|
|
1590
|
+
principal,
|
|
1591
|
+
action == Guardrails::Action::"connect_server",
|
|
1592
|
+
resource
|
|
1593
|
+
)
|
|
1594
|
+
when {
|
|
1595
|
+
context has tool_poisoning_score && context.tool_poisoning_score >= 60
|
|
1596
|
+
};
|
|
1597
|
+
|
|
1598
|
+
// ---------------------------------------------------------------------------
|
|
1599
|
+
// Section 2: Indirect Prompt Injection
|
|
1600
|
+
// Blocks injection from tool outputs and retrieved content — not direct
|
|
1601
|
+
// user input but external content that manipulates agent behavior.
|
|
1602
|
+
// Ref: EchoLeak CVE-2025-32711, IDEsaster (30+ CVEs)
|
|
1603
|
+
// ---------------------------------------------------------------------------
|
|
1604
|
+
|
|
1605
|
+
@id("code-block-indirect-injection")
|
|
1606
|
+
@name("Block indirect prompt injection")
|
|
1607
|
+
@description("Block tool execution when indirect prompt injection is detected in tool outputs, file contents, or retrieved documents (score >= 70). Defends against injection via external content that manipulates agent behavior.")
|
|
1608
|
+
@severity("critical")
|
|
1609
|
+
@tags("profile,code-agent,supply-chain,indirect-injection,owasp-llm01,owasp-asi01")
|
|
1610
|
+
@reject_message("Content blocked: indirect prompt injection detected in tool output or retrieved content. An external source may be attempting to hijack agent behavior.")
|
|
1611
|
+
forbid (
|
|
1612
|
+
principal,
|
|
1613
|
+
action == Guardrails::Action::"call_tool",
|
|
1614
|
+
resource
|
|
1615
|
+
)
|
|
1616
|
+
when {
|
|
1617
|
+
context has indirect_injection_score && context.indirect_injection_score >= 70
|
|
1618
|
+
};
|
|
1619
|
+
|
|
1620
|
+
@id("code-block-indirect-injection-sensitive")
|
|
1621
|
+
@name("Block indirect injection on sensitive tools")
|
|
1622
|
+
@description("Lower threshold (>= 50) for indirect injection when the tool is classified as sensitive. Even moderate injection risk on sensitive tools (shell, file write, network) warrants blocking.")
|
|
1623
|
+
@severity("critical")
|
|
1624
|
+
@tags("profile,code-agent,supply-chain,indirect-injection,sensitive-tools,owasp-asi02")
|
|
1625
|
+
@reject_message("Sensitive tool execution blocked: moderate indirect injection risk detected. Sensitive tools require higher confidence that content is safe.")
|
|
1626
|
+
forbid (
|
|
1627
|
+
principal,
|
|
1628
|
+
action == Guardrails::Action::"call_tool",
|
|
1629
|
+
resource
|
|
1630
|
+
)
|
|
1631
|
+
when {
|
|
1632
|
+
context has indirect_injection_score && context.indirect_injection_score >= 50 &&
|
|
1633
|
+
context has tool_is_sensitive && context.tool_is_sensitive == true
|
|
1634
|
+
};
|
|
1635
|
+
|
|
1636
|
+
// ---------------------------------------------------------------------------
|
|
1637
|
+
// Section 3: Behavioral Attack Patterns
|
|
1638
|
+
// Detects multi-step attack chains targeting credentials and workspace integrity.
|
|
1639
|
+
// ---------------------------------------------------------------------------
|
|
1640
|
+
|
|
1641
|
+
@id("code-block-credential-theft")
|
|
1642
|
+
@name("Block credential theft chains")
|
|
1643
|
+
@description("Block tool execution when a credential theft chain is detected — accessing SSH keys, cloud credentials, or API tokens followed by encoding, compression, or transfer operations. Multi-step attack pattern for autonomous credential harvesting.")
|
|
1644
|
+
@severity("critical")
|
|
1645
|
+
@tags("profile,code-agent,supply-chain,credential-theft,behavioral,mitre-t1552")
|
|
1646
|
+
@reject_message("Tool execution blocked: credential theft chain detected. The agent is performing a multi-step operation to harvest and exfiltrate credentials.")
|
|
1647
|
+
forbid (
|
|
1648
|
+
principal,
|
|
1649
|
+
action == Guardrails::Action::"call_tool",
|
|
1650
|
+
resource
|
|
1651
|
+
)
|
|
1652
|
+
when {
|
|
1653
|
+
context has suspicious_pattern && context.suspicious_pattern == true &&
|
|
1654
|
+
context has pattern_type && context.pattern_type == "credential_theft"
|
|
1655
|
+
};
|
|
1656
|
+
|
|
1657
|
+
@id("code-block-destructive-sequence")
|
|
1658
|
+
@name("Block destructive operation sequences")
|
|
1659
|
+
@description("Block tool execution when a destructive operation sequence is detected — bulk file deletions, permission changes, config overwrites, or repository manipulation patterns. Prevents agent-initiated workspace damage.")
|
|
1660
|
+
@severity("critical")
|
|
1661
|
+
@tags("profile,code-agent,supply-chain,destructive,behavioral,owasp-asi02")
|
|
1662
|
+
@reject_message("Tool execution blocked: destructive operation sequence detected. The agent is performing a pattern of destructive operations that could damage the workspace.")
|
|
1663
|
+
forbid (
|
|
1664
|
+
principal,
|
|
1665
|
+
action == Guardrails::Action::"call_tool",
|
|
1666
|
+
resource
|
|
1667
|
+
)
|
|
1668
|
+
when {
|
|
1669
|
+
context has suspicious_pattern && context.suspicious_pattern == true &&
|
|
1670
|
+
context has pattern_type && context.pattern_type == "destructive_sequence"
|
|
1671
|
+
};
|
|
1672
|
+
`;
|
|
1673
|
+
const GUARDRAILS_CODE_AGENT_ENCODING_CEDAR = `// =============================================================================
|
|
1674
|
+
// Code Agent — Encoding & Unicode Attack Protection
|
|
1675
|
+
// =============================================================================
|
|
1676
|
+
// Blocks invisible Unicode characters in tool arguments and file writes to
|
|
1677
|
+
// prevent encoding-based prompt injection and persistent invisible payloads.
|
|
1678
|
+
//
|
|
1679
|
+
// Tool arguments and file content should be plain text — invisible characters
|
|
1680
|
+
// (zero-width joiners, bidirectional overrides, tag characters) indicate
|
|
1681
|
+
// payload injection or encoding evasion attempts.
|
|
1682
|
+
//
|
|
1683
|
+
// Adapted from Overwatch encoding attack policies for Guardrails namespace.
|
|
1684
|
+
//
|
|
1685
|
+
// Ref: EchoLeak CVE-2025-32711 (invisible prompt injection via Unicode)
|
|
1686
|
+
// Rules File Backdoor (Pillar Security, March 2025)
|
|
1687
|
+
//
|
|
1688
|
+
// Compliance:
|
|
1689
|
+
// OWASP LLM01 (Prompt Injection) — encoding evasion
|
|
1690
|
+
// OWASP ASI01 (Agent Goal Hijack) — hidden instructions
|
|
1691
|
+
// NIST 800-53 SI-10 (Information Input Validation)
|
|
1692
|
+
//
|
|
1693
|
+
// Category: security
|
|
1694
|
+
// Namespace: Guardrails
|
|
1695
|
+
// =============================================================================
|
|
1696
|
+
|
|
1697
|
+
// Block tool calls with invisible characters in arguments
|
|
1698
|
+
@id("code-block-invisible-tool-args")
|
|
1699
|
+
@name("Block invisible characters in tool calls")
|
|
1700
|
+
@description("Block tool execution when invisible Unicode characters are detected in tool arguments or content. Tool arguments should be plain text/JSON — invisible characters in tool calls are almost certainly malicious payload injection.")
|
|
1701
|
+
@severity("critical")
|
|
1702
|
+
@tags("profile,code-agent,encoding,unicode,invisible-chars,tools,owasp-asi01")
|
|
1703
|
+
@reject_message("Tool execution blocked: invisible Unicode characters detected in tool arguments. Tool calls should contain only plain text — invisible characters indicate payload injection or encoding evasion.")
|
|
1704
|
+
forbid (
|
|
1705
|
+
principal,
|
|
1706
|
+
action == Guardrails::Action::"call_tool",
|
|
1707
|
+
resource
|
|
1708
|
+
)
|
|
1709
|
+
when {
|
|
1710
|
+
context has contains_invisible_chars && context.contains_invisible_chars == true
|
|
1711
|
+
};
|
|
1712
|
+
|
|
1713
|
+
// Block file writes with invisible characters
|
|
1714
|
+
@id("code-block-invisible-file-write")
|
|
1715
|
+
@name("Block invisible characters in file writes")
|
|
1716
|
+
@description("Block file writes when invisible Unicode characters are detected. Prevents persistence of invisible payloads in source code, config files, or documentation where they could later be processed by AI agents.")
|
|
1717
|
+
@severity("high")
|
|
1718
|
+
@tags("profile,code-agent,encoding,unicode,invisible-chars,file-write,owasp-asi01")
|
|
1719
|
+
@reject_message("File write blocked: invisible Unicode characters detected in content. Writing invisible characters to files can create persistent backdoors that affect AI agents processing those files later.")
|
|
1720
|
+
forbid (
|
|
1721
|
+
principal,
|
|
1722
|
+
action == Guardrails::Action::"write_file",
|
|
1723
|
+
resource
|
|
1724
|
+
)
|
|
1725
|
+
when {
|
|
1726
|
+
context has contains_invisible_chars && context.contains_invisible_chars == true
|
|
1727
|
+
};
|
|
1728
|
+
`;
|
|
1729
|
+
const GUARDRAILS_ADVANCED_DETECTION_SECRETS_CEDAR = `// =============================================================================
|
|
1730
|
+
// Advanced Detection — Granular Secrets
|
|
1731
|
+
// =============================================================================
|
|
1732
|
+
// Blocks specific high-risk credential types and API tokens using granular
|
|
1733
|
+
// secret_types matching. Goes beyond the boolean contains_secrets detection
|
|
1734
|
+
// to identify and block cloud provider keys, GitHub tokens, SSH keys,
|
|
1735
|
+
// database credentials, and API tokens.
|
|
1736
|
+
//
|
|
1737
|
+
// These policies benefit any Guardrails deployment — not just coding agents.
|
|
1738
|
+
//
|
|
1739
|
+
// Adapted from Overwatch granular secret type policies for Guardrails namespace.
|
|
1740
|
+
//
|
|
1741
|
+
// Compliance:
|
|
1742
|
+
// NIST 800-53 IA-5 (Authenticator Management)
|
|
1743
|
+
// NIST 800-53 SC-28 (Protection of Information at Rest)
|
|
1744
|
+
// MITRE ATT&CK T1552 (Unsecured Credentials)
|
|
1745
|
+
// CIS Benchmark 1.4 (Secrets Management)
|
|
1746
|
+
//
|
|
1747
|
+
// Category: security
|
|
1748
|
+
// Namespace: Guardrails
|
|
1749
|
+
// =============================================================================
|
|
1750
|
+
|
|
1751
|
+
// Block high-risk credential types across all actions
|
|
1752
|
+
@id("detection-block-high-risk-secret-types")
|
|
1753
|
+
@name("Block high-risk credential types")
|
|
1754
|
+
@description("Block content containing cloud provider keys (AWS, GCP, Azure), GitHub tokens, SSH private keys, or database connection strings. These credential types pose the highest exfiltration risk and must never pass through AI agents.")
|
|
1755
|
+
@severity("critical")
|
|
1756
|
+
@tags("profile,advanced-detection,secrets,aws,gcp,azure,github,ssh,database,nist-ia-5,mitre-t1552")
|
|
1757
|
+
@reject_message("Content blocked: high-risk credentials detected (cloud provider keys, GitHub tokens, SSH keys, or database credentials). Use a secrets manager — never pass credentials through AI agents.")
|
|
1758
|
+
forbid (
|
|
1759
|
+
principal,
|
|
1760
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::Action::"call_tool", Guardrails::Action::"read_file", Guardrails::Action::"write_file"],
|
|
1761
|
+
resource
|
|
1762
|
+
)
|
|
1763
|
+
when {
|
|
1764
|
+
context has secret_types &&
|
|
1765
|
+
(context.secret_types.contains("aws_access_key") ||
|
|
1766
|
+
context.secret_types.contains("aws_secret_key") ||
|
|
1767
|
+
context.secret_types.contains("gcp_service_account") ||
|
|
1768
|
+
context.secret_types.contains("azure_client_secret") ||
|
|
1769
|
+
context.secret_types.contains("github_token") ||
|
|
1770
|
+
context.secret_types.contains("github_pat") ||
|
|
1771
|
+
context.secret_types.contains("ssh_private_key") ||
|
|
1772
|
+
context.secret_types.contains("database_url"))
|
|
1773
|
+
};
|
|
1774
|
+
|
|
1775
|
+
// Block API keys and bearer tokens across all actions
|
|
1776
|
+
@id("detection-block-api-keys")
|
|
1777
|
+
@name("Block API keys and bearer tokens")
|
|
1778
|
+
@description("Block content containing generic API keys, bearer tokens, JWT tokens, and OAuth credentials. These are the most commonly leaked credential types in AI agent interactions.")
|
|
1779
|
+
@severity("high")
|
|
1780
|
+
@tags("profile,advanced-detection,secrets,api-key,bearer,jwt,oauth,nist-ia-5")
|
|
1781
|
+
@reject_message("Content blocked: API keys, bearer tokens, or OAuth credentials detected. These must never be passed through AI agent prompts or tool calls.")
|
|
1782
|
+
forbid (
|
|
1783
|
+
principal,
|
|
1784
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::Action::"call_tool", Guardrails::Action::"read_file", Guardrails::Action::"write_file"],
|
|
1785
|
+
resource
|
|
1786
|
+
)
|
|
1787
|
+
when {
|
|
1788
|
+
context has secret_types &&
|
|
1789
|
+
(context.secret_types.contains("api_key") ||
|
|
1790
|
+
context.secret_types.contains("bearer_token") ||
|
|
1791
|
+
context.secret_types.contains("jwt_token") ||
|
|
1792
|
+
context.secret_types.contains("oauth_token") ||
|
|
1793
|
+
context.secret_types.contains("oauth_secret"))
|
|
1794
|
+
};
|
|
1795
|
+
`;
|
|
1796
|
+
const GUARDRAILS_ADVANCED_DETECTION_PII_CEDAR = `// =============================================================================
|
|
1797
|
+
// Advanced Detection — PII
|
|
1798
|
+
// =============================================================================
|
|
1799
|
+
// Advanced PII detection policies using ML classifier confidence scoring,
|
|
1800
|
+
// bulk exposure thresholds, and file operation blocking. Goes beyond the
|
|
1801
|
+
// boolean pii_detected flag with layered detection:
|
|
1802
|
+
//
|
|
1803
|
+
// 1. Bulk PII exposure — 3+ PII matches indicates data dumps or CSV pastes
|
|
1804
|
+
// 2. ML classifier confidence — catches novel PII patterns that regex misses
|
|
1805
|
+
// 3. File operation PII — prevents PII persistence to disk
|
|
1806
|
+
//
|
|
1807
|
+
// These policies benefit any Guardrails deployment — not just coding agents.
|
|
1808
|
+
//
|
|
1809
|
+
// Adapted from Overwatch PII detection policies for Guardrails namespace.
|
|
1810
|
+
//
|
|
1811
|
+
// Compliance:
|
|
1812
|
+
// PCI DSS 3.4 (Payment Card Data)
|
|
1813
|
+
// GDPR Art. 32 (Security of Processing)
|
|
1814
|
+
// HIPAA §164.312 (Technical Safeguards)
|
|
1815
|
+
// CCPA §1798.150 (Data Protection)
|
|
1816
|
+
// NIST 800-53 SI-4 (Information System Monitoring)
|
|
1817
|
+
//
|
|
1818
|
+
// Category: privacy
|
|
1819
|
+
// Namespace: Guardrails
|
|
1820
|
+
// =============================================================================
|
|
1821
|
+
|
|
1822
|
+
// Block bulk PII exposure (3+ PII matches)
|
|
1823
|
+
@id("detection-block-bulk-pii")
|
|
1824
|
+
@name("Block bulk PII exposure")
|
|
1825
|
+
@description("Block content containing 3 or more PII matches. Multiple PII items in a single request indicates a data dump, CSV paste, or data exfiltration attempt. Single PII occurrences may be incidental — bulk exposure is always intentional or negligent.")
|
|
1826
|
+
@severity("critical")
|
|
1827
|
+
@tags("profile,advanced-detection,pii,bulk,data-exfiltration,gdpr-art-32,ccpa")
|
|
1828
|
+
@reject_message("Content blocked: multiple PII items detected (3+). Bulk personal data must never be processed through AI agents. Use data masking or tokenization for batch operations.")
|
|
1829
|
+
forbid (
|
|
1830
|
+
principal,
|
|
1831
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::Action::"call_tool"],
|
|
1832
|
+
resource
|
|
1833
|
+
)
|
|
1834
|
+
when {
|
|
1835
|
+
context has pii_count && context.pii_count >= 3
|
|
1836
|
+
};
|
|
1837
|
+
|
|
1838
|
+
// Block content with high ML PII classifier confidence
|
|
1839
|
+
@id("detection-block-pii-high-confidence")
|
|
1840
|
+
@name("Block high-confidence PII")
|
|
1841
|
+
@description("Block content when the ML PII classifier confidence exceeds threshold (80/100). Catches novel PII patterns including names, addresses, and identifiers that regex rules may miss — defense-in-depth behind the pii_detected boolean.")
|
|
1842
|
+
@severity("critical")
|
|
1843
|
+
@tags("profile,advanced-detection,pii,ml-classifier,privacy,compliance")
|
|
1844
|
+
@reject_message("Content blocked: the ML classifier detected personally identifiable information with high confidence. Even if specific PII types aren't identified, the content appears to contain personal data.")
|
|
1845
|
+
forbid (
|
|
1846
|
+
principal,
|
|
1847
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::Action::"call_tool"],
|
|
1848
|
+
resource
|
|
1849
|
+
)
|
|
1850
|
+
when {
|
|
1851
|
+
context has pii_confidence && context.pii_confidence >= 80
|
|
1852
|
+
};
|
|
1853
|
+
|
|
1854
|
+
// Block file operations containing PII
|
|
1855
|
+
@id("detection-block-pii-file-ops")
|
|
1856
|
+
@name("Block file operations with PII")
|
|
1857
|
+
@description("Block file reads and writes when PII is detected. Prevents agents from reading files containing personal data and from writing PII to new files where it could persist or be version-controlled.")
|
|
1858
|
+
@severity("high")
|
|
1859
|
+
@tags("profile,advanced-detection,pii,file-ops,data-protection,gdpr-art-32")
|
|
1860
|
+
@reject_message("File operation blocked: personally identifiable information was detected. Files containing PII must not be read or written through AI agents.")
|
|
1861
|
+
forbid (
|
|
1862
|
+
principal,
|
|
1863
|
+
action in [Guardrails::Action::"read_file", Guardrails::Action::"write_file"],
|
|
1864
|
+
resource
|
|
1865
|
+
)
|
|
1866
|
+
when {
|
|
1867
|
+
context has pii_detected && context.pii_detected == true
|
|
1868
|
+
};
|
|
1869
|
+
`;
|
|
1870
|
+
const GUARDRAILS_ADVANCED_DETECTION_THREAT_SEVERITY_CEDAR = `// =============================================================================
|
|
1871
|
+
// Advanced Detection — Threat Severity
|
|
1872
|
+
// =============================================================================
|
|
1873
|
+
// Severity-based catch-all policy that blocks any content flagged as critical
|
|
1874
|
+
// severity by detection engines. Acts as a safety net behind all other policies
|
|
1875
|
+
// — if any detector reports critical severity, the content is blocked regardless
|
|
1876
|
+
// of whether a specific category policy caught it.
|
|
1877
|
+
//
|
|
1878
|
+
// This policy benefits any Guardrails deployment — not just coding agents.
|
|
1879
|
+
//
|
|
1880
|
+
// Adapted from Overwatch threat severity aggregation for Guardrails namespace.
|
|
1881
|
+
//
|
|
1882
|
+
// Compliance:
|
|
1883
|
+
// NIST 800-53 SI-3 (Malicious Code Protection)
|
|
1884
|
+
// NIST 800-53 SI-4 (Information System Monitoring)
|
|
1885
|
+
//
|
|
1886
|
+
// Category: security
|
|
1887
|
+
// Namespace: Guardrails
|
|
1888
|
+
// =============================================================================
|
|
1889
|
+
|
|
1890
|
+
// Block any content with critical severity threats
|
|
1891
|
+
@id("detection-block-critical-severity")
|
|
1892
|
+
@name("Block critical severity threats")
|
|
1893
|
+
@description("Block all content when any detection engine reports critical severity. This is the ultimate catch-all — critical threats are blocked regardless of type or source. Acts as a safety net behind all other policies.")
|
|
1894
|
+
@severity("critical")
|
|
1895
|
+
@tags("profile,advanced-detection,severity,critical,catch-all,nist-si-3")
|
|
1896
|
+
@reject_message("Your content was blocked because security scanners detected a critical-severity threat. This content cannot be processed.")
|
|
1897
|
+
forbid (
|
|
1898
|
+
principal,
|
|
1899
|
+
action == Guardrails::Action::"process_prompt",
|
|
1900
|
+
resource
|
|
1901
|
+
)
|
|
1902
|
+
when {
|
|
1903
|
+
context has highest_severity && context.highest_severity == "critical"
|
|
1904
|
+
};
|
|
1905
|
+
`;
|
|
1906
|
+
const GUARDRAILS_A2A_CROSS_ORIGIN_CEDAR = `// =============================================================================
|
|
1907
|
+
// A2A Security — Cross-Origin Trust Boundary Enforcement
|
|
1908
|
+
// =============================================================================
|
|
1909
|
+
// Detects and blocks confused deputy attacks where an agent from one trust
|
|
1910
|
+
// domain attempts to operate in another. Cross-origin violations occur when:
|
|
1911
|
+
// - An agent proxies requests across security domains
|
|
1912
|
+
// - Mixed-security tool chains span trust boundaries
|
|
1913
|
+
// - URL injection redirects agent communication to untrusted origins
|
|
1914
|
+
//
|
|
1915
|
+
// Key A2A distinction from MAS: In multi-agent systems (shared orchestrator),
|
|
1916
|
+
// cross-origin is unlikely because all agents share a trust context. In A2A
|
|
1917
|
+
// (independent agents, separate trust domains), cross-origin is the PRIMARY
|
|
1918
|
+
// signal that trust boundaries are being violated.
|
|
1919
|
+
//
|
|
1920
|
+
// Shield cross-origin detector outputs discrete scores:
|
|
1921
|
+
// 90 — mixed localhost + external domain
|
|
1922
|
+
// 85 — URL injection in parameters
|
|
1923
|
+
// 80 — proxy/redirect patterns
|
|
1924
|
+
// 75 — multi-origin tool configs / JSON origin fields
|
|
1925
|
+
// 70 — mixed HTTP/HTTPS or ws/wss schemes
|
|
1926
|
+
// 65 — JSON arrays with multiple URLs
|
|
1927
|
+
// 60 — generic multi-domain patterns
|
|
1928
|
+
//
|
|
1929
|
+
// Compliance:
|
|
1930
|
+
// OWASP LLM08 (Excessive Agency)
|
|
1931
|
+
// OWASP ASI03 (Excessive Permissions)
|
|
1932
|
+
// MITRE ATLAS AML.T0051.002 (Indirect Prompt Injection via delegation)
|
|
1933
|
+
// NIST 800-53 AC-4 (Information Flow Enforcement)
|
|
1934
|
+
//
|
|
1935
|
+
// Category: agent_identity
|
|
1936
|
+
// Namespace: Guardrails
|
|
1937
|
+
// =============================================================================
|
|
1938
|
+
|
|
1939
|
+
// Block high-confidence cross-origin for any agent
|
|
1940
|
+
@id("a2a-cross-origin-block-critical")
|
|
1941
|
+
@name("Block critical cross-origin from any agent")
|
|
1942
|
+
@description("Block all agent requests when cross-origin trust boundary violation score exceeds 80. High-confidence cross-origin signals (mixed localhost/external, URL injection, proxy redirects) indicate confused deputy attacks regardless of agent trust level.")
|
|
1943
|
+
@severity("critical")
|
|
1944
|
+
@tags("profile,a2a-security,cross-origin,confused-deputy,trust-boundary,owasp-llm08")
|
|
1945
|
+
@reject_message("Request blocked: high-confidence cross-origin trust boundary violation detected (score >= 80). An external agent or service is attempting to operate across trust domains. Review the origin chain before retrying.")
|
|
1946
|
+
forbid (
|
|
1947
|
+
principal is Guardrails::Agent,
|
|
1948
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::Action::"call_tool"],
|
|
1949
|
+
resource
|
|
1950
|
+
)
|
|
1951
|
+
when {
|
|
1952
|
+
context has agent_id && context.agent_id != "" &&
|
|
1953
|
+
context has cross_origin_detected && context.cross_origin_detected == true &&
|
|
1954
|
+
context has cross_origin_score && context.cross_origin_score >= 80
|
|
1955
|
+
};
|
|
1956
|
+
|
|
1957
|
+
// Block cross-origin from unverified agents at any signal level
|
|
1958
|
+
@id("a2a-cross-origin-block-unverified")
|
|
1959
|
+
@name("Block cross-origin from unverified agents")
|
|
1960
|
+
@description("Unverified agents are blocked from any cross-origin activity at the lowest meaningful detection threshold (score >= 60). Cross-origin from an unverified source is a strong confused deputy indicator — the agent has no attestation AND is crossing trust boundaries.")
|
|
1961
|
+
@severity("high")
|
|
1962
|
+
@tags("profile,a2a-security,cross-origin,unverified,trust-boundary,owasp-asi03")
|
|
1963
|
+
@reject_message("Request blocked: cross-origin activity detected from an unverified agent. Unverified agents cannot operate across trust boundaries. Register the agent or use a verified agent.")
|
|
1964
|
+
forbid (
|
|
1965
|
+
principal is Guardrails::Agent,
|
|
1966
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::Action::"call_tool"],
|
|
1967
|
+
resource
|
|
1968
|
+
)
|
|
1969
|
+
when {
|
|
1970
|
+
context has agent_trust_level && context.agent_trust_level == "unverified" &&
|
|
1971
|
+
context has cross_origin_detected && context.cross_origin_detected == true &&
|
|
1972
|
+
context has cross_origin_score && context.cross_origin_score >= 60
|
|
1973
|
+
};
|
|
1974
|
+
|
|
1975
|
+
// Block cross-origin MCP server connections from non-first-party agents
|
|
1976
|
+
@id("a2a-cross-origin-block-server-connect")
|
|
1977
|
+
@name("Block cross-origin MCP server connections")
|
|
1978
|
+
@description("Non-first-party agents cannot connect to MCP servers when cross-origin signals are present (score >= 65). Server-level cross-origin has wide blast radius — a single compromised connection exposes all tools on that server.")
|
|
1979
|
+
@severity("critical")
|
|
1980
|
+
@tags("profile,a2a-security,cross-origin,mcp,server,trust-boundary,nist-ac-4")
|
|
1981
|
+
@reject_message("MCP server connection blocked: cross-origin trust violation detected. Non-first-party agents cannot connect to MCP servers when cross-origin signals are present.")
|
|
1982
|
+
forbid (
|
|
1983
|
+
principal is Guardrails::Agent,
|
|
1984
|
+
action == Guardrails::Action::"connect_server",
|
|
1985
|
+
resource
|
|
1986
|
+
)
|
|
1987
|
+
when {
|
|
1988
|
+
context has agent_trust_level && context.agent_trust_level != "first_party" &&
|
|
1989
|
+
context has cross_origin_detected && context.cross_origin_detected == true &&
|
|
1990
|
+
context has cross_origin_score && context.cross_origin_score >= 65
|
|
1991
|
+
};
|
|
1992
|
+
|
|
1993
|
+
// Block cross-origin tool calls on sensitive tools from any agent
|
|
1994
|
+
@id("a2a-cross-origin-block-sensitive-tools")
|
|
1995
|
+
@name("Block cross-origin on sensitive tools")
|
|
1996
|
+
@description("Any agent attempting to call sensitive tools while cross-origin signals are present (score >= 60) is blocked. Sensitive tools (write_file, http_post, send_email) amplify the impact of confused deputy attacks — an agent crossing trust boundaries should not have access to high-impact operations.")
|
|
1997
|
+
@severity("high")
|
|
1998
|
+
@tags("profile,a2a-security,cross-origin,sensitive-tools,confused-deputy,owasp-llm08")
|
|
1999
|
+
@reject_message("Sensitive tool execution blocked: cross-origin trust violation detected. Tool calls to sensitive tools are blocked when cross-origin signals are present from agent requests.")
|
|
2000
|
+
forbid (
|
|
2001
|
+
principal is Guardrails::Agent,
|
|
2002
|
+
action == Guardrails::Action::"call_tool",
|
|
2003
|
+
resource
|
|
2004
|
+
)
|
|
2005
|
+
when {
|
|
2006
|
+
context has agent_id && context.agent_id != "" &&
|
|
2007
|
+
context has cross_origin_detected && context.cross_origin_detected == true &&
|
|
2008
|
+
context has cross_origin_score && context.cross_origin_score >= 60 &&
|
|
2009
|
+
context has tool_is_sensitive && context.tool_is_sensitive == true
|
|
2010
|
+
};
|
|
2011
|
+
`;
|
|
2012
|
+
const GUARDRAILS_A2A_INTER_AGENT_INJECTION_CEDAR = `// =============================================================================
|
|
2013
|
+
// A2A Security — Inter-Agent Injection Defense
|
|
2014
|
+
// =============================================================================
|
|
2015
|
+
// Detects and blocks prompt injection that travels between independent agents:
|
|
2016
|
+
//
|
|
2017
|
+
// 1. INDIRECT INJECTION: Malicious content injected via tool outputs, RAG
|
|
2018
|
+
// retrieval, or API responses from one agent that manipulates another.
|
|
2019
|
+
// In A2A, this is the primary attack vector because agents consume each
|
|
2020
|
+
// other's outputs as trusted input.
|
|
2021
|
+
//
|
|
2022
|
+
// 2. MULTI-TURN PROGRESSIVE ATTACKS: Gradual context manipulation across
|
|
2023
|
+
// turns where each turn is benign individually but collectively builds
|
|
2024
|
+
// toward goal hijacking. The GRU-based deep context detector tracks
|
|
2025
|
+
// conversation state across turns.
|
|
2026
|
+
//
|
|
2027
|
+
// 3. ENCODED PAYLOAD DELIVERY: Base64, hex, or hash-encoded instructions
|
|
2028
|
+
// designed to bypass single-turn classifiers. In A2A communication,
|
|
2029
|
+
// encoded content is a strong indicator of injection evasion.
|
|
2030
|
+
//
|
|
2031
|
+
// Key A2A distinction: In MAS, the orchestrator controls all communication.
|
|
2032
|
+
// In A2A, each agent independently receives content from external agents,
|
|
2033
|
+
// making indirect injection the dominant threat vector.
|
|
2034
|
+
//
|
|
2035
|
+
// Compliance:
|
|
2036
|
+
// OWASP LLM01 (Prompt Injection) — indirect variant
|
|
2037
|
+
// OWASP ASI01 (Agent Goal Hijack)
|
|
2038
|
+
// MITRE ATLAS AML.T0051 (LLM Prompt Injection)
|
|
2039
|
+
// MITRE ATLAS AML.T0051.002 (Indirect Prompt Injection)
|
|
2040
|
+
// NIST 800-53 SI-10 (Information Input Validation)
|
|
2041
|
+
//
|
|
2042
|
+
// Category: agent_identity
|
|
2043
|
+
// Namespace: Guardrails
|
|
2044
|
+
// =============================================================================
|
|
2045
|
+
|
|
2046
|
+
// -----------------------------------------------------------------------------
|
|
2047
|
+
// Indirect Injection — Tool Output Poisoning
|
|
2048
|
+
// -----------------------------------------------------------------------------
|
|
2049
|
+
|
|
2050
|
+
// Block indirect injection from agent tool calls
|
|
2051
|
+
@id("a2a-indirect-injection-agent")
|
|
2052
|
+
@name("Block indirect injection from agent tool calls")
|
|
2053
|
+
@description("Block tool execution when indirect injection is detected in content received by an agent (score >= 60). Indirect injection travels through tool outputs, RAG retrieval, and API responses — the primary A2A attack vector because agents consume each other's outputs as trusted input. Lower threshold than code-agent (70) because cross-system content has higher adversarial surface.")
|
|
2054
|
+
@severity("critical")
|
|
2055
|
+
@tags("profile,a2a-security,indirect-injection,tool-output,owasp-lml01,mitre-t0051-002")
|
|
2056
|
+
@reject_message("Tool execution blocked: indirect prompt injection detected in content received by this agent (score >= 60). An external source may be attempting to hijack agent behavior through tool outputs or retrieved content.")
|
|
2057
|
+
forbid (
|
|
2058
|
+
principal is Guardrails::Agent,
|
|
2059
|
+
action == Guardrails::Action::"call_tool",
|
|
2060
|
+
resource
|
|
2061
|
+
)
|
|
2062
|
+
when {
|
|
2063
|
+
context has agent_id && context.agent_id != "" &&
|
|
2064
|
+
context has indirect_injection_score && context.indirect_injection_score >= 60
|
|
2065
|
+
};
|
|
2066
|
+
|
|
2067
|
+
// Stricter threshold for sensitive tools
|
|
2068
|
+
@id("a2a-indirect-injection-sensitive-agent")
|
|
2069
|
+
@name("Block moderate indirect injection on sensitive tools from agents")
|
|
2070
|
+
@description("Block sensitive tool execution from agents when indirect injection score exceeds 40. Sensitive tools (write_file, http_post, send_email) amplify the damage of indirect injection — a lower threshold compensates for the higher blast radius of sensitive operations in cross-system communication.")
|
|
2071
|
+
@severity("critical")
|
|
2072
|
+
@tags("profile,a2a-security,indirect-injection,sensitive-tools,owasp-asi01")
|
|
2073
|
+
@reject_message("Sensitive tool blocked: moderate indirect injection risk detected in agent-to-agent content (score >= 40). Sensitive tools require higher confidence that inter-agent content is safe.")
|
|
2074
|
+
forbid (
|
|
2075
|
+
principal is Guardrails::Agent,
|
|
2076
|
+
action == Guardrails::Action::"call_tool",
|
|
2077
|
+
resource
|
|
2078
|
+
)
|
|
2079
|
+
when {
|
|
2080
|
+
context has agent_id && context.agent_id != "" &&
|
|
2081
|
+
context has indirect_injection_score && context.indirect_injection_score >= 40 &&
|
|
2082
|
+
context has tool_is_sensitive && context.tool_is_sensitive == true
|
|
2083
|
+
};
|
|
2084
|
+
|
|
2085
|
+
// -----------------------------------------------------------------------------
|
|
2086
|
+
// Multi-Turn Progressive Attacks — Deep Context GRU Detection
|
|
2087
|
+
// -----------------------------------------------------------------------------
|
|
2088
|
+
|
|
2089
|
+
// Block multi-turn progressive injection for non-first-party agents
|
|
2090
|
+
@id("a2a-deep-context-injection-agent")
|
|
2091
|
+
@name("Block multi-turn progressive injection for agents")
|
|
2092
|
+
@description("Block non-first-party agents when the GRU-based deep context detector identifies multi-turn progressive injection (score >= 60). Each turn may be benign individually, but the GRU model tracks hidden state across the full conversation to detect gradual goal hijacking.")
|
|
2093
|
+
@severity("high")
|
|
2094
|
+
@tags("profile,a2a-security,multi-turn,deep-context,injection,owasp-lml01")
|
|
2095
|
+
@reject_message("Request blocked: multi-turn progressive injection detected across conversation history (deep context score >= 60). A gradual attack may be building context manipulation over multiple agent turns.")
|
|
2096
|
+
forbid (
|
|
2097
|
+
principal is Guardrails::Agent,
|
|
2098
|
+
action == Guardrails::Action::"process_prompt",
|
|
2099
|
+
resource
|
|
2100
|
+
)
|
|
2101
|
+
when {
|
|
2102
|
+
context has agent_trust_level && context.agent_trust_level != "first_party" &&
|
|
2103
|
+
context has multi_turn_detection && context.multi_turn_detection == true &&
|
|
2104
|
+
context has injection_deep_context_score && context.injection_deep_context_score >= 60
|
|
2105
|
+
};
|
|
2106
|
+
|
|
2107
|
+
// Block multi-turn progressive jailbreak for non-first-party agents
|
|
2108
|
+
@id("a2a-deep-context-jailbreak-agent")
|
|
2109
|
+
@name("Block multi-turn progressive jailbreak for agents")
|
|
2110
|
+
@description("Block non-first-party agents when the GRU-based deep context detector identifies multi-turn progressive jailbreak (score >= 60). Jailbreak attempts spread across turns are harder to detect with single-turn classifiers — the deep context model maintains conversation state to catch these patterns.")
|
|
2111
|
+
@severity("high")
|
|
2112
|
+
@tags("profile,a2a-security,multi-turn,deep-context,jailbreak,owasp-asi01")
|
|
2113
|
+
@reject_message("Request blocked: multi-turn progressive jailbreak detected across conversation history (deep context score >= 60). A gradual jailbreak attempt is building across multiple agent turns.")
|
|
2114
|
+
forbid (
|
|
2115
|
+
principal is Guardrails::Agent,
|
|
2116
|
+
action == Guardrails::Action::"process_prompt",
|
|
2117
|
+
resource
|
|
2118
|
+
)
|
|
2119
|
+
when {
|
|
2120
|
+
context has agent_trust_level && context.agent_trust_level != "first_party" &&
|
|
2121
|
+
context has multi_turn_detection && context.multi_turn_detection == true &&
|
|
2122
|
+
context has jailbreak_deep_context_score && context.jailbreak_deep_context_score >= 60
|
|
2123
|
+
};
|
|
2124
|
+
|
|
2125
|
+
// -----------------------------------------------------------------------------
|
|
2126
|
+
// Encoded Payload Delivery — Injection Evasion
|
|
2127
|
+
// -----------------------------------------------------------------------------
|
|
2128
|
+
|
|
2129
|
+
// Block encoded injection payloads between agents
|
|
2130
|
+
@id("a2a-encoded-injection-agent")
|
|
2131
|
+
@name("Block encoded payload delivery between agents")
|
|
2132
|
+
@description("Block agent requests when encoded payloads are detected (base64, hex, or suspicious hash content with score >= 60). In A2A communication, encoded content is a strong indicator of injection evasion — agents should communicate in plaintext, not encoded payloads.")
|
|
2133
|
+
@severity("high")
|
|
2134
|
+
@tags("profile,a2a-security,encoded-injection,evasion,base64,owasp-lml01")
|
|
2135
|
+
@reject_message("Request blocked: encoded payload detected in agent communication (base64, hex, or suspicious hash content). Encoded content in agent-to-agent messages indicates injection evasion or payload delivery.")
|
|
2136
|
+
forbid (
|
|
2137
|
+
principal is Guardrails::Agent,
|
|
2138
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::Action::"call_tool"],
|
|
2139
|
+
resource
|
|
2140
|
+
)
|
|
2141
|
+
when {
|
|
2142
|
+
context has agent_id && context.agent_id != "" &&
|
|
2143
|
+
context has encoded_content_detected && context.encoded_content_detected == true &&
|
|
2144
|
+
context has encoded_score && context.encoded_score >= 60
|
|
2145
|
+
};
|
|
2146
|
+
`;
|
|
2147
|
+
const GUARDRAILS_A2A_SUPPLY_CHAIN_CEDAR = `// =============================================================================
|
|
2148
|
+
// A2A Security — Supply Chain & Behavioral Drift
|
|
2149
|
+
// =============================================================================
|
|
2150
|
+
// Detects and blocks supply chain attacks specific to agent-to-agent ecosystems:
|
|
2151
|
+
//
|
|
2152
|
+
// 1. TOOL POISONING: External agents install or recommend MCP tools with
|
|
2153
|
+
// hidden instructions, system prompt injection, authority hijack, or
|
|
2154
|
+
// information suppression patterns in tool descriptions.
|
|
2155
|
+
//
|
|
2156
|
+
// 2. RUG PULL: An agent or tool that behaves normally during evaluation
|
|
2157
|
+
// but changes behavior after trust is established — "risk_spike" (sudden
|
|
2158
|
+
// risk increase) or "pattern_change" (behavioral deviation).
|
|
2159
|
+
//
|
|
2160
|
+
// 3. CREDENTIAL THEFT CHAINS: Multi-step attack where an agent reads
|
|
2161
|
+
// credential files, encodes them, and exfiltrates via network tools.
|
|
2162
|
+
// In A2A, this is higher risk because external agents have legitimate
|
|
2163
|
+
// reasons to call multiple tools in sequence.
|
|
2164
|
+
//
|
|
2165
|
+
// Key A2A distinction: In MAS, the orchestrator vets all tools centrally.
|
|
2166
|
+
// In A2A, each agent brings its own tool ecosystem, creating a supply chain
|
|
2167
|
+
// attack surface at every agent boundary.
|
|
2168
|
+
//
|
|
2169
|
+
// Compliance:
|
|
2170
|
+
// OWASP ASI04 (Supply Chain Vulnerabilities)
|
|
2171
|
+
// OWASP MCP01 (Tool Poisoning)
|
|
2172
|
+
// OWASP MCP03 (Tool Shadowing)
|
|
2173
|
+
// MITRE ATT&CK T1552 (Unsecured Credentials)
|
|
2174
|
+
// MITRE ATLAS AML.T0049 (Backdoor ML Model) — analogous to agent drift
|
|
2175
|
+
// NIST 800-53 SI-7 (Software, Firmware, and Information Integrity)
|
|
2176
|
+
//
|
|
2177
|
+
// Category: agent_identity
|
|
2178
|
+
// Namespace: Guardrails
|
|
2179
|
+
// =============================================================================
|
|
2180
|
+
|
|
2181
|
+
// -----------------------------------------------------------------------------
|
|
2182
|
+
// Tool Poisoning — Hidden Instructions in External Agent Tools
|
|
2183
|
+
// -----------------------------------------------------------------------------
|
|
2184
|
+
|
|
2185
|
+
// Block tool poisoning from non-first-party agents
|
|
2186
|
+
@id("a2a-tool-poisoning-agent")
|
|
2187
|
+
@name("Block tool poisoning from non-first-party agents")
|
|
2188
|
+
@description("Block tool execution when poisoning is detected from non-first-party agents (score >= 60). Tool poisoning includes hidden instructions, system prompt injection, authority hijack, and information suppression patterns in tool descriptions or arguments. Lower threshold than default (70) because external agent tool chains have higher supply chain risk.")
|
|
2189
|
+
@severity("critical")
|
|
2190
|
+
@tags("profile,a2a-security,supply-chain,tool-poisoning,owasp-mcp01,owasp-asi04")
|
|
2191
|
+
@reject_message("Tool execution blocked: tool poisoning detected in content from a non-first-party agent (score >= 60). Hidden instructions, authority hijack, or system prompt injection patterns found in tool descriptions or arguments.")
|
|
2192
|
+
forbid (
|
|
2193
|
+
principal is Guardrails::Agent,
|
|
2194
|
+
action == Guardrails::Action::"call_tool",
|
|
2195
|
+
resource
|
|
2196
|
+
)
|
|
2197
|
+
when {
|
|
2198
|
+
context has agent_trust_level && context.agent_trust_level != "first_party" &&
|
|
2199
|
+
context has tool_poisoning_detected && context.tool_poisoning_detected == true &&
|
|
2200
|
+
context has tool_poisoning_score && context.tool_poisoning_score >= 60
|
|
2201
|
+
};
|
|
2202
|
+
|
|
2203
|
+
// Block poisoned MCP server connections from agents
|
|
2204
|
+
@id("a2a-server-poisoning-agent")
|
|
2205
|
+
@name("Block poisoned server connections from agents")
|
|
2206
|
+
@description("Block MCP server connections when poisoning is detected from agent requests (score >= 55). Server-level poisoning has wider blast radius than individual tool poisoning — a single compromised server connection exposes all tools on that server. Lower threshold (55 vs 60) compensates for the amplified impact.")
|
|
2207
|
+
@severity("critical")
|
|
2208
|
+
@tags("profile,a2a-security,supply-chain,server-poisoning,mcp,owasp-mcp01")
|
|
2209
|
+
@reject_message("MCP server connection blocked: tool poisoning patterns detected in server from agent request (score >= 55). Server-level poisoning affects all tools and warrants a lower threshold than individual tool poisoning.")
|
|
2210
|
+
forbid (
|
|
2211
|
+
principal is Guardrails::Agent,
|
|
2212
|
+
action == Guardrails::Action::"connect_server",
|
|
2213
|
+
resource
|
|
2214
|
+
)
|
|
2215
|
+
when {
|
|
2216
|
+
context has agent_id && context.agent_id != "" &&
|
|
2217
|
+
context has tool_poisoning_detected && context.tool_poisoning_detected == true &&
|
|
2218
|
+
context has tool_poisoning_score && context.tool_poisoning_score >= 55
|
|
2219
|
+
};
|
|
2220
|
+
|
|
2221
|
+
// -----------------------------------------------------------------------------
|
|
2222
|
+
// Rug Pull — Behavioral Drift After Trust Establishment
|
|
2223
|
+
// -----------------------------------------------------------------------------
|
|
2224
|
+
|
|
2225
|
+
// Block after rug pull behavioral drift detection
|
|
2226
|
+
@id("a2a-rug-pull-agent")
|
|
2227
|
+
@name("Block rug pull behavioral drift from agents")
|
|
2228
|
+
@description("Block tool execution when behavioral drift is detected in agent tool usage (score >= 70). The rug pull detector compares current tool behavior against established baselines — a sudden risk spike or tool alternation pattern change after 3+ normal calls indicates the agent or tool has been compromised mid-session.")
|
|
2229
|
+
@severity("critical")
|
|
2230
|
+
@tags("profile,a2a-security,supply-chain,rug-pull,behavioral-drift,mitre-t0049")
|
|
2231
|
+
@reject_message("Tool execution blocked: behavioral drift detected in agent tool usage (rug pull score >= 70). The tool's behavior has deviated significantly from established patterns, indicating potential supply chain compromise.")
|
|
2232
|
+
forbid (
|
|
2233
|
+
principal is Guardrails::Agent,
|
|
2234
|
+
action == Guardrails::Action::"call_tool",
|
|
2235
|
+
resource
|
|
2236
|
+
)
|
|
2237
|
+
when {
|
|
2238
|
+
context has agent_id && context.agent_id != "" &&
|
|
2239
|
+
context has rug_pull_detected && context.rug_pull_detected == true &&
|
|
2240
|
+
context has rug_pull_score && context.rug_pull_score >= 70
|
|
2241
|
+
};
|
|
2242
|
+
|
|
2243
|
+
// -----------------------------------------------------------------------------
|
|
2244
|
+
// Credential Theft Chains — Multi-Step Exfiltration
|
|
2245
|
+
// -----------------------------------------------------------------------------
|
|
2246
|
+
|
|
2247
|
+
// Block agent-initiated credential theft chains
|
|
2248
|
+
@id("a2a-credential-theft-agent")
|
|
2249
|
+
@name("Block agent-initiated credential theft chains")
|
|
2250
|
+
@description("Block tool execution when credential theft patterns are detected from non-first-party agents. The pattern detector identifies multi-step sequences (read credentials → encode → exfiltrate) that indicate coordinated credential harvesting. In A2A, external agents have legitimate multi-tool workflows, making pattern-based detection essential to distinguish theft from normal usage.")
|
|
2251
|
+
@severity("critical")
|
|
2252
|
+
@tags("profile,a2a-security,supply-chain,credential-theft,exfiltration,mitre-t1552")
|
|
2253
|
+
@reject_message("Tool execution blocked: credential theft chain detected from a non-first-party agent. The agent is performing a multi-step operation to harvest and exfiltrate credentials. Only first-party agents may access credential-adjacent resources.")
|
|
2254
|
+
forbid (
|
|
2255
|
+
principal is Guardrails::Agent,
|
|
2256
|
+
action == Guardrails::Action::"call_tool",
|
|
2257
|
+
resource
|
|
2258
|
+
)
|
|
2259
|
+
when {
|
|
2260
|
+
context has agent_trust_level && context.agent_trust_level != "first_party" &&
|
|
2261
|
+
context has suspicious_pattern && context.suspicious_pattern == true &&
|
|
2262
|
+
context has pattern_type && context.pattern_type == "credential_theft"
|
|
2263
|
+
};
|
|
2264
|
+
`;
|
|
2265
|
+
const GUARDRAILS_A2A_IDENTITY_ENFORCEMENT_CEDAR = `// =============================================================================
|
|
2266
|
+
// A2A Security — Agent Identity Enforcement
|
|
2267
|
+
// =============================================================================
|
|
2268
|
+
// Enforces strict identity requirements for cross-system agent communication:
|
|
2269
|
+
//
|
|
2270
|
+
// 1. ANONYMOUS AGENT BLOCKING: Agents that claim agent_type but provide no
|
|
2271
|
+
// agent_id are likely spoofed or misconfigured — blocked from tool calls.
|
|
2272
|
+
//
|
|
2273
|
+
// 2. FRAMEWORK REGISTRATION: Unverified agents must declare their framework
|
|
2274
|
+
// (claude-code, langchain, crewai, etc.) for sensitive operations. Missing
|
|
2275
|
+
// framework on unverified agents indicates an ad-hoc or rogue integration.
|
|
2276
|
+
//
|
|
2277
|
+
// 3. SERVER CONNECTION RESTRICTIONS: Unverified agents cannot establish new
|
|
2278
|
+
// MCP server connections — limits blast radius of unknown agents.
|
|
2279
|
+
//
|
|
2280
|
+
// 4. AUTONOMOUS + UNVERIFIED = BLOCKED: The most dangerous combination is
|
|
2281
|
+
// an autonomous agent with no verification. No human oversight AND no
|
|
2282
|
+
// trust attestation means zero recovery if the agent is compromised.
|
|
2283
|
+
//
|
|
2284
|
+
// Key A2A distinction: In MAS, the orchestrator validates all sub-agents.
|
|
2285
|
+
// In A2A, each agent self-reports identity, so we must enforce identity
|
|
2286
|
+
// completeness and consistency at the policy layer.
|
|
2287
|
+
//
|
|
2288
|
+
// Compliance:
|
|
2289
|
+
// OWASP ASI05 (Identity Spoofing)
|
|
2290
|
+
// NIST 800-63 (Digital Identity Guidelines)
|
|
2291
|
+
// NIST 800-53 IA-2 (Identification and Authentication)
|
|
2292
|
+
// NIST 800-53 IA-8 (Identification and Authentication — Non-Organizational Users)
|
|
2293
|
+
//
|
|
2294
|
+
// Category: agent_identity
|
|
2295
|
+
// Namespace: Guardrails
|
|
2296
|
+
// =============================================================================
|
|
2297
|
+
|
|
2298
|
+
// -----------------------------------------------------------------------------
|
|
2299
|
+
// Anonymous Agent Detection — Incomplete Identity
|
|
2300
|
+
// -----------------------------------------------------------------------------
|
|
2301
|
+
|
|
2302
|
+
// Block agents with type but no ID from tool execution
|
|
2303
|
+
@id("a2a-block-anonymous-agent-tools")
|
|
2304
|
+
@name("Block anonymous agents from tool execution")
|
|
2305
|
+
@description("Block tool calls from agents that declare an agent_type but have no agent_id. This pattern (type present, ID absent) indicates a spoofed or misconfigured agent identity — legitimate agents always have both. Human proxies are exempt because they represent authenticated users, not independent agents.")
|
|
2306
|
+
@severity("critical")
|
|
2307
|
+
@tags("profile,a2a-security,identity,anonymous,spoofing,owasp-asi05,nist-ia-2")
|
|
2308
|
+
@reject_message("Tool execution blocked: agent identity is required for A2A tool calls. This request has an agent type but no agent ID, indicating an improperly configured or spoofed agent identity.")
|
|
2309
|
+
forbid (
|
|
2310
|
+
principal is Guardrails::Agent,
|
|
2311
|
+
action == Guardrails::Action::"call_tool",
|
|
2312
|
+
resource
|
|
2313
|
+
)
|
|
2314
|
+
when {
|
|
2315
|
+
context has agent_id && context.agent_id == "" &&
|
|
2316
|
+
context has agent_type && context.agent_type != "" &&
|
|
2317
|
+
context.agent_type != "human_proxy"
|
|
2318
|
+
};
|
|
2319
|
+
|
|
2320
|
+
// -----------------------------------------------------------------------------
|
|
2321
|
+
// Framework Registration — Unverified Agent Restrictions
|
|
2322
|
+
// -----------------------------------------------------------------------------
|
|
2323
|
+
|
|
2324
|
+
// Block unregistered framework unverified agents from sensitive tools
|
|
2325
|
+
@id("a2a-block-unregistered-framework")
|
|
2326
|
+
@name("Block unregistered frameworks from sensitive tools")
|
|
2327
|
+
@description("Block unverified agents with no declared framework from calling sensitive tools. In A2A, agent_framework identifies the SDK/runtime (claude-code, langchain, crewai, autogen). An unverified agent with no framework declaration is a black-box integration — it cannot be audited, patched, or trusted with sensitive operations.")
|
|
2328
|
+
@severity("high")
|
|
2329
|
+
@tags("profile,a2a-security,identity,framework,unverified,sensitive-tools,nist-ia-8")
|
|
2330
|
+
@reject_message("Sensitive tool blocked: unverified agent with no registered framework attempted to call a sensitive tool. Agents must declare their framework (e.g., claude-code, langchain, crewai) for A2A sensitive operations.")
|
|
2331
|
+
forbid (
|
|
2332
|
+
principal is Guardrails::Agent,
|
|
2333
|
+
action == Guardrails::Action::"call_tool",
|
|
2334
|
+
resource
|
|
2335
|
+
)
|
|
2336
|
+
when {
|
|
2337
|
+
context has agent_framework && context.agent_framework == "" &&
|
|
2338
|
+
context has agent_trust_level && context.agent_trust_level == "unverified" &&
|
|
2339
|
+
context has tool_is_sensitive && context.tool_is_sensitive == true
|
|
2340
|
+
};
|
|
2341
|
+
|
|
2342
|
+
// -----------------------------------------------------------------------------
|
|
2343
|
+
// Server Connection Restrictions
|
|
2344
|
+
// -----------------------------------------------------------------------------
|
|
2345
|
+
|
|
2346
|
+
// Block unverified agents from establishing MCP server connections
|
|
2347
|
+
@id("a2a-block-unverified-server-connect")
|
|
2348
|
+
@name("Block unverified agents from MCP server connections")
|
|
2349
|
+
@description("Unverified agents cannot establish new MCP server connections in A2A mode. Each server connection expands the agent's capability surface — unverified agents should use only pre-established connections from the orchestrator or host application.")
|
|
2350
|
+
@severity("high")
|
|
2351
|
+
@tags("profile,a2a-security,identity,unverified,mcp,server,nist-ia-8")
|
|
2352
|
+
@reject_message("MCP server connection blocked: unverified agents cannot establish new MCP server connections in A2A mode. Register the agent as verified_third_party or first_party to enable server connections.")
|
|
2353
|
+
forbid (
|
|
2354
|
+
principal is Guardrails::Agent,
|
|
2355
|
+
action == Guardrails::Action::"connect_server",
|
|
2356
|
+
resource
|
|
2357
|
+
)
|
|
2358
|
+
when {
|
|
2359
|
+
context has agent_trust_level && context.agent_trust_level == "unverified" &&
|
|
2360
|
+
context has agent_id && context.agent_id != ""
|
|
2361
|
+
};
|
|
2362
|
+
|
|
2363
|
+
// -----------------------------------------------------------------------------
|
|
2364
|
+
// Dangerous Combinations — Maximum Risk
|
|
2365
|
+
// -----------------------------------------------------------------------------
|
|
2366
|
+
|
|
2367
|
+
// Block unverified autonomous agents from all tool calls
|
|
2368
|
+
@id("a2a-block-autonomous-unverified")
|
|
2369
|
+
@name("Block unverified autonomous agents from all tool calls")
|
|
2370
|
+
@description("The combination of autonomous (no human oversight) and unverified (no trust attestation) is the most dangerous agent configuration. If compromised, there is no human to catch anomalies and no verification to limit blast radius. These agents are unconditionally blocked from all tool execution in A2A workflows.")
|
|
2371
|
+
@severity("critical")
|
|
2372
|
+
@tags("profile,a2a-security,identity,autonomous,unverified,owasp-asi05,nist-ia-2")
|
|
2373
|
+
@reject_message("Tool execution blocked: unverified autonomous agents are not permitted in A2A workflows. Autonomous agents operating without human oversight must be at least verified_third_party trust level.")
|
|
2374
|
+
forbid (
|
|
2375
|
+
principal is Guardrails::Agent,
|
|
2376
|
+
action == Guardrails::Action::"call_tool",
|
|
2377
|
+
resource
|
|
2378
|
+
)
|
|
2379
|
+
when {
|
|
2380
|
+
context has agent_type && context.agent_type == "autonomous" &&
|
|
2381
|
+
context has agent_trust_level && context.agent_trust_level == "unverified"
|
|
2382
|
+
};
|
|
2383
|
+
`;
|
|
2384
|
+
const GUARDRAILS_A2A_ESCALATION_DETECTION_CEDAR = `// =============================================================================
|
|
2385
|
+
// A2A Security — Escalation Detection & Circuit Breakers
|
|
2386
|
+
// =============================================================================
|
|
2387
|
+
// Detects progressive capability escalation across agent turns and applies
|
|
2388
|
+
// session-level circuit breakers tuned for adversarial A2A communication:
|
|
2389
|
+
//
|
|
2390
|
+
// 1. SESSION PEAK SCORES: When the maximum injection or jailbreak score
|
|
2391
|
+
// across all prior turns exceeds 70, non-first-party agents are restricted.
|
|
2392
|
+
// Unlike MAS boolean flags, A2A uses numeric peaks for graduated response.
|
|
2393
|
+
//
|
|
2394
|
+
// 2. CUMULATIVE RISK CIRCUIT BREAKER: When accumulated risk across turns
|
|
2395
|
+
// exceeds 150, sensitive tools are blocked for non-first-party agents.
|
|
2396
|
+
// Lower threshold than MAS (200) because cross-system communication has
|
|
2397
|
+
// higher adversarial surface area.
|
|
2398
|
+
//
|
|
2399
|
+
// 3. THREAT TURN ESCALATION: After 3+ turns with detected threats, unverified
|
|
2400
|
+
// agents are fully locked out. This catches turn-by-turn probing attacks
|
|
2401
|
+
// where an attacker incrementally tests boundaries.
|
|
2402
|
+
//
|
|
2403
|
+
// Key A2A distinction: In MAS, the orchestrator can reset or contain sessions.
|
|
2404
|
+
// In A2A, independent agents have no shared circuit breaker, so policy must
|
|
2405
|
+
// enforce escalation detection at the evaluation layer.
|
|
2406
|
+
//
|
|
2407
|
+
// Compliance:
|
|
2408
|
+
// OWASP LLM01 (Prompt Injection) — multi-turn variant
|
|
2409
|
+
// MITRE ATLAS AML.T0051 (LLM Prompt Injection)
|
|
2410
|
+
// NIST 800-53 SI-4 (System Monitoring)
|
|
2411
|
+
// NIST 800-53 IR-4 (Incident Handling)
|
|
2412
|
+
//
|
|
2413
|
+
// Category: agent_identity
|
|
2414
|
+
// Namespace: Guardrails
|
|
2415
|
+
// =============================================================================
|
|
2416
|
+
|
|
2417
|
+
// -----------------------------------------------------------------------------
|
|
2418
|
+
// Session Peak Score Monitoring
|
|
2419
|
+
// -----------------------------------------------------------------------------
|
|
2420
|
+
|
|
2421
|
+
// Block non-first-party agents when session injection peak is high
|
|
2422
|
+
@id("a2a-session-injection-peak-block")
|
|
2423
|
+
@name("Block agents when session injection peak is high")
|
|
2424
|
+
@description("Block non-first-party agents from tool calls and prompt processing when the maximum injection score across all prior turns exceeds 70. Unlike MAS policies that use boolean session_injection_detected, A2A uses the numeric peak score for graduated response — a session with a prior score of 75 is more dangerous than one with 45, even though both set the boolean flag.")
|
|
2425
|
+
@severity("critical")
|
|
2426
|
+
@tags("profile,a2a-security,escalation,session-peak,injection,owasp-lml01,nist-si-4")
|
|
2427
|
+
@reject_message("Request blocked: this session has a prior injection detection peak of 70+. Non-first-party agents are restricted after high injection signals to prevent progressive capability escalation.")
|
|
2428
|
+
forbid (
|
|
2429
|
+
principal is Guardrails::Agent,
|
|
2430
|
+
action in [Guardrails::Action::"call_tool", Guardrails::Action::"process_prompt"],
|
|
2431
|
+
resource
|
|
2432
|
+
)
|
|
2433
|
+
when {
|
|
2434
|
+
context has agent_trust_level && context.agent_trust_level != "first_party" &&
|
|
2435
|
+
context has session_max_injection_score && context.session_max_injection_score >= 70
|
|
2436
|
+
};
|
|
2437
|
+
|
|
2438
|
+
// Block non-first-party agents when session jailbreak peak is high
|
|
2439
|
+
@id("a2a-session-jailbreak-peak-block")
|
|
2440
|
+
@name("Block agents when session jailbreak peak is high")
|
|
2441
|
+
@description("Block non-first-party agents from prompt processing when the maximum jailbreak score across all prior turns exceeds 70. A high jailbreak peak indicates the session's guardrails may have been partially eroded — subsequent agent requests in this session should be treated as potentially manipulated.")
|
|
2442
|
+
@severity("critical")
|
|
2443
|
+
@tags("profile,a2a-security,escalation,session-peak,jailbreak,owasp-lml01,nist-si-4")
|
|
2444
|
+
@reject_message("Request blocked: this session has a prior jailbreak detection peak of 70+. Non-first-party agents are restricted after high jailbreak signals to prevent progressive manipulation.")
|
|
2445
|
+
forbid (
|
|
2446
|
+
principal is Guardrails::Agent,
|
|
2447
|
+
action == Guardrails::Action::"process_prompt",
|
|
2448
|
+
resource
|
|
2449
|
+
)
|
|
2450
|
+
when {
|
|
2451
|
+
context has agent_trust_level && context.agent_trust_level != "first_party" &&
|
|
2452
|
+
context has session_max_jailbreak_score && context.session_max_jailbreak_score >= 70
|
|
2453
|
+
};
|
|
2454
|
+
|
|
2455
|
+
// -----------------------------------------------------------------------------
|
|
2456
|
+
// Cumulative Risk Circuit Breaker
|
|
2457
|
+
// -----------------------------------------------------------------------------
|
|
2458
|
+
|
|
2459
|
+
// Lock down non-first-party agents at high cumulative risk
|
|
2460
|
+
@id("a2a-cumulative-risk-agent-lockdown")
|
|
2461
|
+
@name("Lock down non-first-party agents at high cumulative risk")
|
|
2462
|
+
@description("Block non-first-party agents from sensitive tools when cumulative session risk exceeds 150. Lower threshold than MAS (200) because A2A sessions with cross-system agents should trip the circuit breaker earlier — independent agents cannot coordinate session recovery the way an orchestrator can.")
|
|
2463
|
+
@severity("high")
|
|
2464
|
+
@tags("profile,a2a-security,escalation,cumulative-risk,circuit-breaker,nist-ir-4")
|
|
2465
|
+
@reject_message("Sensitive tool blocked: session cumulative risk exceeds 150. Non-first-party agents are restricted from sensitive tools in elevated-risk sessions to prevent progressive capability gain.")
|
|
2466
|
+
forbid (
|
|
2467
|
+
principal is Guardrails::Agent,
|
|
2468
|
+
action == Guardrails::Action::"call_tool",
|
|
2469
|
+
resource
|
|
2470
|
+
)
|
|
2471
|
+
when {
|
|
2472
|
+
context has agent_trust_level && context.agent_trust_level != "first_party" &&
|
|
2473
|
+
context has session_cumulative_risk_score && context.session_cumulative_risk_score > 150 &&
|
|
2474
|
+
context has tool_is_sensitive && context.tool_is_sensitive == true
|
|
2475
|
+
};
|
|
2476
|
+
|
|
2477
|
+
// -----------------------------------------------------------------------------
|
|
2478
|
+
// Threat Turn Escalation — Probing Detection
|
|
2479
|
+
// -----------------------------------------------------------------------------
|
|
2480
|
+
|
|
2481
|
+
// Block unverified agents after repeated threat turns
|
|
2482
|
+
@id("a2a-threat-turn-escalation-block")
|
|
2483
|
+
@name("Block unverified agents after repeated threat turns")
|
|
2484
|
+
@description("Block unverified agents from all tool calls after 3+ threat turns are detected in the session. Lower threshold than MAS (5) because repeated threats from an unverified agent's session indicate adversarial probing — the attacker is incrementally testing boundaries. Three threat turns is sufficient evidence of active reconnaissance.")
|
|
2485
|
+
@severity("critical")
|
|
2486
|
+
@tags("profile,a2a-security,escalation,threat-turns,probing,unverified,nist-ir-4")
|
|
2487
|
+
@reject_message("Tool execution blocked: 3+ threat turns detected in this session. Unverified agents are locked out after repeated threat signals to prevent adversarial escalation via turn-by-turn probing.")
|
|
2488
|
+
forbid (
|
|
2489
|
+
principal is Guardrails::Agent,
|
|
2490
|
+
action == Guardrails::Action::"call_tool",
|
|
2491
|
+
resource
|
|
2492
|
+
)
|
|
2493
|
+
when {
|
|
2494
|
+
context has agent_trust_level && context.agent_trust_level == "unverified" &&
|
|
2495
|
+
context has session_threat_turns && context.session_threat_turns > 2
|
|
2496
|
+
};
|
|
2497
|
+
`;
|
|
1403
2498
|
// =============================================================================
|
|
1404
2499
|
// CATEGORIES
|
|
1405
2500
|
// =============================================================================
|
|
@@ -1608,6 +2703,105 @@ export const GUARDRAILS_TEMPLATES = [
|
|
|
1608
2703
|
severity: 'critical',
|
|
1609
2704
|
tags: ['profile', 'multi-agent', 'cross-turn', 'a2a', 'pii', 'secrets', 'injection', 'circuit-breaker'],
|
|
1610
2705
|
},
|
|
2706
|
+
{
|
|
2707
|
+
id: 'code-agent-path-security',
|
|
2708
|
+
name: 'Code Agent — Path Security',
|
|
2709
|
+
description: 'Block access to .env files, credential files, system directories, credential directories, and destructive file operations for coding agents',
|
|
2710
|
+
category: 'security',
|
|
2711
|
+
cedarText: GUARDRAILS_CODE_AGENT_PATH_SECURITY_CEDAR,
|
|
2712
|
+
severity: 'high',
|
|
2713
|
+
tags: ['profile', 'code-agent', 'path-security', 'credentials', 'system-paths'],
|
|
2714
|
+
},
|
|
2715
|
+
{
|
|
2716
|
+
id: 'code-agent-supply-chain',
|
|
2717
|
+
name: 'Code Agent — Supply Chain Security',
|
|
2718
|
+
description: 'Block MCP server poisoning, indirect prompt injection from tool outputs, credential theft patterns, and destructive operation sequences for coding agents',
|
|
2719
|
+
category: 'agentic_security',
|
|
2720
|
+
cedarText: GUARDRAILS_CODE_AGENT_SUPPLY_CHAIN_CEDAR,
|
|
2721
|
+
severity: 'critical',
|
|
2722
|
+
tags: ['profile', 'code-agent', 'supply-chain', 'tool-poisoning', 'indirect-injection'],
|
|
2723
|
+
},
|
|
2724
|
+
{
|
|
2725
|
+
id: 'code-agent-encoding',
|
|
2726
|
+
name: 'Code Agent — Encoding Attacks',
|
|
2727
|
+
description: 'Block invisible Unicode characters in tool arguments and file writes to prevent encoding-based prompt injection for coding agents',
|
|
2728
|
+
category: 'security',
|
|
2729
|
+
cedarText: GUARDRAILS_CODE_AGENT_ENCODING_CEDAR,
|
|
2730
|
+
severity: 'high',
|
|
2731
|
+
tags: ['profile', 'code-agent', 'encoding', 'unicode', 'invisible-chars'],
|
|
2732
|
+
},
|
|
2733
|
+
{
|
|
2734
|
+
id: 'advanced-detection-secrets',
|
|
2735
|
+
name: 'Advanced Detection — Granular Secrets',
|
|
2736
|
+
description: 'Granular secret type blocking for high-risk credentials (cloud provider keys, GitHub tokens, SSH keys, database URLs) and API keys/tokens',
|
|
2737
|
+
category: 'security',
|
|
2738
|
+
cedarText: GUARDRAILS_ADVANCED_DETECTION_SECRETS_CEDAR,
|
|
2739
|
+
severity: 'critical',
|
|
2740
|
+
tags: ['profile', 'advanced-detection', 'secrets', 'credentials', 'cloud-keys'],
|
|
2741
|
+
},
|
|
2742
|
+
{
|
|
2743
|
+
id: 'advanced-detection-pii',
|
|
2744
|
+
name: 'Advanced Detection — PII',
|
|
2745
|
+
description: 'Bulk PII exposure blocking, high-confidence ML PII detection, and PII in file operations for advanced threat detection',
|
|
2746
|
+
category: 'privacy',
|
|
2747
|
+
cedarText: GUARDRAILS_ADVANCED_DETECTION_PII_CEDAR,
|
|
2748
|
+
severity: 'critical',
|
|
2749
|
+
tags: ['profile', 'advanced-detection', 'pii', 'privacy', 'ml-classifier'],
|
|
2750
|
+
},
|
|
2751
|
+
{
|
|
2752
|
+
id: 'advanced-detection-threat-severity',
|
|
2753
|
+
name: 'Advanced Detection — Threat Severity',
|
|
2754
|
+
description: 'Block any content flagged with critical severity by detection engines as a catch-all safety net',
|
|
2755
|
+
category: 'security',
|
|
2756
|
+
cedarText: GUARDRAILS_ADVANCED_DETECTION_THREAT_SEVERITY_CEDAR,
|
|
2757
|
+
severity: 'critical',
|
|
2758
|
+
tags: ['profile', 'advanced-detection', 'severity', 'critical', 'catch-all'],
|
|
2759
|
+
},
|
|
2760
|
+
{
|
|
2761
|
+
id: 'a2a-cross-origin',
|
|
2762
|
+
name: 'A2A Security — Cross-Origin Trust Boundaries',
|
|
2763
|
+
description: 'Block confused deputy attacks and trust boundary violations from cross-system agent communication — critical cross-origin blocking, unverified agent restrictions, sensitive tool protection',
|
|
2764
|
+
category: 'agent_identity',
|
|
2765
|
+
cedarText: GUARDRAILS_A2A_CROSS_ORIGIN_CEDAR,
|
|
2766
|
+
severity: 'critical',
|
|
2767
|
+
tags: ['profile', 'a2a-security', 'cross-origin', 'confused-deputy', 'trust-boundary'],
|
|
2768
|
+
},
|
|
2769
|
+
{
|
|
2770
|
+
id: 'a2a-inter-agent-injection',
|
|
2771
|
+
name: 'A2A Security — Inter-Agent Injection Defense',
|
|
2772
|
+
description: 'Block indirect prompt injection via tool outputs, multi-turn progressive attacks using deep context models, and encoded payload delivery between independent agents',
|
|
2773
|
+
category: 'agent_identity',
|
|
2774
|
+
cedarText: GUARDRAILS_A2A_INTER_AGENT_INJECTION_CEDAR,
|
|
2775
|
+
severity: 'critical',
|
|
2776
|
+
tags: ['profile', 'a2a-security', 'indirect-injection', 'multi-turn', 'encoded-injection', 'deep-context'],
|
|
2777
|
+
},
|
|
2778
|
+
{
|
|
2779
|
+
id: 'a2a-supply-chain',
|
|
2780
|
+
name: 'A2A Security — Supply Chain & Behavioral Drift',
|
|
2781
|
+
description: 'Block tool poisoning from external agent ecosystems, rug pull behavioral drift, and credential theft chains initiated by compromised agents',
|
|
2782
|
+
category: 'agent_identity',
|
|
2783
|
+
cedarText: GUARDRAILS_A2A_SUPPLY_CHAIN_CEDAR,
|
|
2784
|
+
severity: 'critical',
|
|
2785
|
+
tags: ['profile', 'a2a-security', 'supply-chain', 'tool-poisoning', 'rug-pull', 'credential-theft'],
|
|
2786
|
+
},
|
|
2787
|
+
{
|
|
2788
|
+
id: 'a2a-identity-enforcement',
|
|
2789
|
+
name: 'A2A Security — Agent Identity Enforcement',
|
|
2790
|
+
description: 'Enforce strict identity requirements for cross-system agents — block anonymous agents, require framework registration, prevent unverified autonomous agents',
|
|
2791
|
+
category: 'agent_identity',
|
|
2792
|
+
cedarText: GUARDRAILS_A2A_IDENTITY_ENFORCEMENT_CEDAR,
|
|
2793
|
+
severity: 'critical',
|
|
2794
|
+
tags: ['profile', 'a2a-security', 'identity', 'spoofing', 'framework', 'autonomous'],
|
|
2795
|
+
},
|
|
2796
|
+
{
|
|
2797
|
+
id: 'a2a-escalation-detection',
|
|
2798
|
+
name: 'A2A Security — Escalation Detection & Circuit Breakers',
|
|
2799
|
+
description: 'Detect progressive capability escalation across turns with session peak score monitoring and cumulative risk circuit breakers tuned for adversarial A2A communication',
|
|
2800
|
+
category: 'agent_identity',
|
|
2801
|
+
cedarText: GUARDRAILS_A2A_ESCALATION_DETECTION_CEDAR,
|
|
2802
|
+
severity: 'critical',
|
|
2803
|
+
tags: ['profile', 'a2a-security', 'escalation', 'circuit-breaker', 'session-peak', 'cumulative-risk'],
|
|
2804
|
+
},
|
|
1611
2805
|
];
|
|
1612
2806
|
// =============================================================================
|
|
1613
2807
|
// TEMPLATES METADATA
|
|
@@ -1839,6 +3033,105 @@ export const GUARDRAILS_TEMPLATES_JSON = `{
|
|
|
1839
3033
|
"file": "profiles/multi_agent/agent_safety.cedar",
|
|
1840
3034
|
"severity": "critical",
|
|
1841
3035
|
"tags": ["profile", "multi-agent", "cross-turn", "a2a", "pii", "secrets", "injection", "circuit-breaker"]
|
|
3036
|
+
},
|
|
3037
|
+
{
|
|
3038
|
+
"id": "code-agent-path-security",
|
|
3039
|
+
"name": "Code Agent — Path Security",
|
|
3040
|
+
"description": "Block access to .env files, credential files, system directories, credential directories, and destructive file operations for coding agents",
|
|
3041
|
+
"category": "security",
|
|
3042
|
+
"file": "profiles/code_agent/path_security.cedar",
|
|
3043
|
+
"severity": "high",
|
|
3044
|
+
"tags": ["profile", "code-agent", "path-security", "credentials", "system-paths"]
|
|
3045
|
+
},
|
|
3046
|
+
{
|
|
3047
|
+
"id": "code-agent-supply-chain",
|
|
3048
|
+
"name": "Code Agent — Supply Chain Security",
|
|
3049
|
+
"description": "Block MCP server poisoning, indirect prompt injection from tool outputs, credential theft patterns, and destructive operation sequences for coding agents",
|
|
3050
|
+
"category": "agentic_security",
|
|
3051
|
+
"file": "profiles/code_agent/supply_chain.cedar",
|
|
3052
|
+
"severity": "critical",
|
|
3053
|
+
"tags": ["profile", "code-agent", "supply-chain", "tool-poisoning", "indirect-injection"]
|
|
3054
|
+
},
|
|
3055
|
+
{
|
|
3056
|
+
"id": "code-agent-encoding",
|
|
3057
|
+
"name": "Code Agent — Encoding Attacks",
|
|
3058
|
+
"description": "Block invisible Unicode characters in tool arguments and file writes to prevent encoding-based prompt injection for coding agents",
|
|
3059
|
+
"category": "security",
|
|
3060
|
+
"file": "profiles/code_agent/encoding.cedar",
|
|
3061
|
+
"severity": "high",
|
|
3062
|
+
"tags": ["profile", "code-agent", "encoding", "unicode", "invisible-chars"]
|
|
3063
|
+
},
|
|
3064
|
+
{
|
|
3065
|
+
"id": "advanced-detection-secrets",
|
|
3066
|
+
"name": "Advanced Detection — Granular Secrets",
|
|
3067
|
+
"description": "Granular secret type blocking for high-risk credentials (cloud provider keys, GitHub tokens, SSH keys, database URLs) and API keys/tokens",
|
|
3068
|
+
"category": "security",
|
|
3069
|
+
"file": "profiles/advanced_detection/secrets.cedar",
|
|
3070
|
+
"severity": "critical",
|
|
3071
|
+
"tags": ["profile", "advanced-detection", "secrets", "credentials", "cloud-keys"]
|
|
3072
|
+
},
|
|
3073
|
+
{
|
|
3074
|
+
"id": "advanced-detection-pii",
|
|
3075
|
+
"name": "Advanced Detection — PII",
|
|
3076
|
+
"description": "Bulk PII exposure blocking, high-confidence ML PII detection, and PII in file operations for advanced threat detection",
|
|
3077
|
+
"category": "privacy",
|
|
3078
|
+
"file": "profiles/advanced_detection/pii.cedar",
|
|
3079
|
+
"severity": "critical",
|
|
3080
|
+
"tags": ["profile", "advanced-detection", "pii", "privacy", "ml-classifier"]
|
|
3081
|
+
},
|
|
3082
|
+
{
|
|
3083
|
+
"id": "advanced-detection-threat-severity",
|
|
3084
|
+
"name": "Advanced Detection — Threat Severity",
|
|
3085
|
+
"description": "Block any content flagged with critical severity by detection engines as a catch-all safety net",
|
|
3086
|
+
"category": "security",
|
|
3087
|
+
"file": "profiles/advanced_detection/threat_severity.cedar",
|
|
3088
|
+
"severity": "critical",
|
|
3089
|
+
"tags": ["profile", "advanced-detection", "severity", "critical", "catch-all"]
|
|
3090
|
+
},
|
|
3091
|
+
{
|
|
3092
|
+
"id": "a2a-cross-origin",
|
|
3093
|
+
"name": "A2A Security — Cross-Origin Trust Boundaries",
|
|
3094
|
+
"description": "Block confused deputy attacks and trust boundary violations from cross-system agent communication — critical cross-origin blocking, unverified agent restrictions, sensitive tool protection",
|
|
3095
|
+
"category": "agent_identity",
|
|
3096
|
+
"file": "profiles/a2a_security/cross_origin.cedar",
|
|
3097
|
+
"severity": "critical",
|
|
3098
|
+
"tags": ["profile", "a2a-security", "cross-origin", "confused-deputy", "trust-boundary"]
|
|
3099
|
+
},
|
|
3100
|
+
{
|
|
3101
|
+
"id": "a2a-inter-agent-injection",
|
|
3102
|
+
"name": "A2A Security — Inter-Agent Injection Defense",
|
|
3103
|
+
"description": "Block indirect prompt injection via tool outputs, multi-turn progressive attacks using deep context models, and encoded payload delivery between independent agents",
|
|
3104
|
+
"category": "agent_identity",
|
|
3105
|
+
"file": "profiles/a2a_security/inter_agent_injection.cedar",
|
|
3106
|
+
"severity": "critical",
|
|
3107
|
+
"tags": ["profile", "a2a-security", "indirect-injection", "multi-turn", "encoded-injection", "deep-context"]
|
|
3108
|
+
},
|
|
3109
|
+
{
|
|
3110
|
+
"id": "a2a-supply-chain",
|
|
3111
|
+
"name": "A2A Security — Supply Chain & Behavioral Drift",
|
|
3112
|
+
"description": "Block tool poisoning from external agent ecosystems, rug pull behavioral drift, and credential theft chains initiated by compromised agents",
|
|
3113
|
+
"category": "agent_identity",
|
|
3114
|
+
"file": "profiles/a2a_security/supply_chain.cedar",
|
|
3115
|
+
"severity": "critical",
|
|
3116
|
+
"tags": ["profile", "a2a-security", "supply-chain", "tool-poisoning", "rug-pull", "credential-theft"]
|
|
3117
|
+
},
|
|
3118
|
+
{
|
|
3119
|
+
"id": "a2a-identity-enforcement",
|
|
3120
|
+
"name": "A2A Security — Agent Identity Enforcement",
|
|
3121
|
+
"description": "Enforce strict identity requirements for cross-system agents — block anonymous agents, require framework registration, prevent unverified autonomous agents",
|
|
3122
|
+
"category": "agent_identity",
|
|
3123
|
+
"file": "profiles/a2a_security/identity_enforcement.cedar",
|
|
3124
|
+
"severity": "critical",
|
|
3125
|
+
"tags": ["profile", "a2a-security", "identity", "spoofing", "framework", "autonomous"]
|
|
3126
|
+
},
|
|
3127
|
+
{
|
|
3128
|
+
"id": "a2a-escalation-detection",
|
|
3129
|
+
"name": "A2A Security — Escalation Detection & Circuit Breakers",
|
|
3130
|
+
"description": "Detect progressive capability escalation across turns with session peak score monitoring and cumulative risk circuit breakers tuned for adversarial A2A communication",
|
|
3131
|
+
"category": "agent_identity",
|
|
3132
|
+
"file": "profiles/a2a_security/escalation_detection.cedar",
|
|
3133
|
+
"severity": "critical",
|
|
3134
|
+
"tags": ["profile", "a2a-security", "escalation", "circuit-breaker", "session-peak", "cumulative-risk"]
|
|
1842
3135
|
}
|
|
1843
3136
|
],
|
|
1844
3137
|
"profiles": [
|
|
@@ -1853,10 +3146,10 @@ export const GUARDRAILS_TEMPLATES_JSON = `{
|
|
|
1853
3146
|
{
|
|
1854
3147
|
"id": "code-agent",
|
|
1855
3148
|
"name": "Code Agent",
|
|
1856
|
-
"description": "Optimized for coding assistants — tool risk controls, shell blocking, loop detection, exfiltration prevention, budget enforcement",
|
|
3149
|
+
"description": "Optimized for coding assistants — tool risk controls, shell blocking, loop detection, exfiltration prevention, budget enforcement, path security, supply chain defense, and encoding attack protection",
|
|
1857
3150
|
"severity": "high",
|
|
1858
|
-
"tags": ["code-agent", "tools", "agentic", "exfiltration"],
|
|
1859
|
-
"template_ids": ["code-agent-agentic-security", "code-agent-security"]
|
|
3151
|
+
"tags": ["code-agent", "tools", "agentic", "exfiltration", "path-security", "supply-chain", "encoding"],
|
|
3152
|
+
"template_ids": ["code-agent-agentic-security", "code-agent-security", "code-agent-path-security", "code-agent-supply-chain", "code-agent-encoding"]
|
|
1860
3153
|
},
|
|
1861
3154
|
{
|
|
1862
3155
|
"id": "data-pipeline",
|
|
@@ -1868,11 +3161,27 @@ export const GUARDRAILS_TEMPLATES_JSON = `{
|
|
|
1868
3161
|
},
|
|
1869
3162
|
{
|
|
1870
3163
|
"id": "multi-agent",
|
|
1871
|
-
"name": "Multi-Agent Orchestration",
|
|
1872
|
-
"description": "Production-grade
|
|
3164
|
+
"name": "Multi-Agent Orchestration (MAS)",
|
|
3165
|
+
"description": "Production-grade guardrails for multi-agent systems with shared orchestration — tiered trust access control, autonomous agent safeguards, cross-turn PII/secrets containment, injection escalation response, cumulative risk circuit breakers. For independent agent-to-agent communication across separate trust domains, use the A2A Security profile",
|
|
1873
3166
|
"severity": "critical",
|
|
1874
|
-
"tags": ["multi-agent", "
|
|
3167
|
+
"tags": ["multi-agent", "mas", "trust", "cross-turn", "circuit-breaker"],
|
|
1875
3168
|
"template_ids": ["agent-identity-trust", "multi-agent-trust", "multi-agent-safety"]
|
|
3169
|
+
},
|
|
3170
|
+
{
|
|
3171
|
+
"id": "a2a-security",
|
|
3172
|
+
"name": "A2A Security",
|
|
3173
|
+
"description": "Production-grade security for independent agent-to-agent communication across separate trust domains — cross-origin trust enforcement, inter-agent injection defense (indirect, multi-turn, encoded), supply chain protection (tool poisoning, rug pull), identity enforcement, and escalation circuit breakers",
|
|
3174
|
+
"severity": "critical",
|
|
3175
|
+
"tags": ["a2a-security", "cross-origin", "injection", "supply-chain", "identity", "escalation"],
|
|
3176
|
+
"template_ids": ["a2a-cross-origin", "a2a-inter-agent-injection", "a2a-supply-chain", "a2a-identity-enforcement", "a2a-escalation-detection"]
|
|
3177
|
+
},
|
|
3178
|
+
{
|
|
3179
|
+
"id": "advanced-detection",
|
|
3180
|
+
"name": "Advanced Detection",
|
|
3181
|
+
"description": "Production-grade advanced threat detection — granular secret type blocking, ML-based PII detection, bulk exposure prevention, and critical severity catch-all for high-security environments",
|
|
3182
|
+
"severity": "critical",
|
|
3183
|
+
"tags": ["advanced-detection", "secrets", "pii", "severity", "ml-detection"],
|
|
3184
|
+
"template_ids": ["advanced-detection-secrets", "advanced-detection-pii", "advanced-detection-threat-severity"]
|
|
1876
3185
|
}
|
|
1877
3186
|
]
|
|
1878
3187
|
}
|