@armoriq/policy-ir 0.1.0

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.
@@ -0,0 +1,73 @@
1
+ [
2
+ {
3
+ "name": "empty object",
4
+ "input": {},
5
+ "canonical": "{}"
6
+ },
7
+ {
8
+ "name": "keys sorted bytewise",
9
+ "input": {
10
+ "9": 6,
11
+ "10": 5,
12
+ "b": 1,
13
+ "a": 2,
14
+ "B": 3,
15
+ "_": 4
16
+ },
17
+ "canonical": "{\"10\":5,\"9\":6,\"B\":3,\"_\":4,\"a\":2,\"b\":1}"
18
+ },
19
+ {
20
+ "name": "nested and arrays keep order",
21
+ "input": {
22
+ "z": [
23
+ 3,
24
+ 1,
25
+ {
26
+ "y": null,
27
+ "x": [
28
+ true,
29
+ false
30
+ ]
31
+ }
32
+ ],
33
+ "a": "x"
34
+ },
35
+ "canonical": "{\"a\":\"x\",\"z\":[3,1,{\"x\":[true,false],\"y\":null}]}"
36
+ },
37
+ {
38
+ "name": "undefined members dropped, null kept",
39
+ "input": {
40
+ "b": null,
41
+ "c": 0
42
+ },
43
+ "canonical": "{\"b\":null,\"c\":0}"
44
+ },
45
+ {
46
+ "name": "ascii escapes",
47
+ "input": {
48
+ "s": "quote \" backslash \\ tab \t newline \n é ✓ 😀"
49
+ },
50
+ "canonical": "{\"s\":\"quote \\\" backslash \\\\ tab \\t newline \\n \\u00e9 \\u2713 \\ud83d\\ude00\"}"
51
+ },
52
+ {
53
+ "name": "numbers",
54
+ "input": {
55
+ "i": 42,
56
+ "f": 0.5,
57
+ "neg": -1,
58
+ "exp": 1e+21,
59
+ "small": 1e-7,
60
+ "zero": 0,
61
+ "negzero": 0
62
+ },
63
+ "canonical": "{\"exp\":1e+21,\"f\":0.5,\"i\":42,\"neg\":-1,\"negzero\":0,\"small\":1e-7,\"zero\":0}"
64
+ },
65
+ {
66
+ "name": "unicode key",
67
+ "input": {
68
+ "ключ": 1,
69
+ "key": 2
70
+ },
71
+ "canonical": "{\"key\":2,\"\\u043a\\u043b\\u044e\\u0447\":1}"
72
+ }
73
+ ]
@@ -0,0 +1,17 @@
1
+ [
2
+ {"id":"VC-14","name":"schemaHash of the declared tool is bound on every args condition (FR-14)","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\nspec:\n tools:\n default: hold\n rules:\n create_payment:\n - when: {args.amount: {gt: 5000}}\n action: hold\n approval: {approvers: 2, roles: [finance_lead]}\n - action: allow\n approvalDefaults: {approvers: 1, roles: [admin]}\n","inventory":[{"name":"create_payment","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true},{"name":"Read","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","inputSchema":{"type":"object","properties":{"file_path":{"type":"string"}}},"declared":true},{"name":"create_issue","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__create_issue","capabilities":["destructive"]},{"name":"list_issues","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__list_issues","capabilities":[]},{"name":"delete_repo","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__delete_repo","capabilities":["destructive"]},{"name":"observed_only","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":null,"declared":false}],"expect":{"errors":[],"warnings":[],"statementIds":["st-create-payment-0","st-create-payment-1"],"bindings":{"st-create-payment-0":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}}},
3
+ {"id":"VC-15","name":"an unknown control identifier compiles with a warning naming it","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\nspec:\n tools:\n default: hold\n rules:\n Read:\n - action: allow\n controls: [SOC2-CC6.1, NOT-A-CONTROL]\n approvalDefaults: {approvers: 1, roles: [admin]}\n","inventory":[{"name":"create_payment","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true},{"name":"Read","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","inputSchema":{"type":"object","properties":{"file_path":{"type":"string"}}},"declared":true},{"name":"create_issue","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__create_issue","capabilities":["destructive"]},{"name":"list_issues","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__list_issues","capabilities":[]},{"name":"delete_repo","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__delete_repo","capabilities":["destructive"]},{"name":"observed_only","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":null,"declared":false}],"expect":{"errors":[],"warnings":["unknown_control"],"statementIds":["st-read-0"]}},
4
+ {"id":"VC-8","name":"a rule key not in the inventory compiles with a warning","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\nspec:\n tools:\n default: hold\n rules:\n nonexistent_tool: block\n approvalDefaults: {approvers: 1, roles: [admin]}\n","inventory":[{"name":"create_payment","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true},{"name":"Read","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","inputSchema":{"type":"object","properties":{"file_path":{"type":"string"}}},"declared":true},{"name":"create_issue","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__create_issue","capabilities":["destructive"]},{"name":"list_issues","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__list_issues","capabilities":[]},{"name":"delete_repo","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__delete_repo","capabilities":["destructive"]},{"name":"observed_only","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":null,"declared":false}],"expect":{"errors":[],"warnings":["unknown_tool_key"],"statementIds":["st-nonexistent-tool-0"]}},
5
+ {"id":"VC-8b","name":"an observed-only tool compiles without a binding and says so","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\nspec:\n tools:\n default: hold\n rules:\n observed_only:\n - when: {args.x: {exists: true}}\n action: block\n approvalDefaults: {approvers: 1, roles: [admin]}\n","inventory":[{"name":"create_payment","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true},{"name":"Read","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","inputSchema":{"type":"object","properties":{"file_path":{"type":"string"}}},"declared":true},{"name":"create_issue","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__create_issue","capabilities":["destructive"]},{"name":"list_issues","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__list_issues","capabilities":[]},{"name":"delete_repo","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__delete_repo","capabilities":["destructive"]},{"name":"observed_only","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":null,"declared":false}],"expect":{"errors":[],"warnings":["observed_only_tool"],"bindings":{"st-observed-only-0":null}}},
6
+ {"id":"VC-9","name":"an args key the schema does not declare compiles with a warning","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\nspec:\n tools:\n default: hold\n rules:\n create_payment:\n - when: {args.nonexistent: {gt: 5}}\n action: block\n approvalDefaults: {approvers: 1, roles: [admin]}\n","inventory":[{"name":"create_payment","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true},{"name":"Read","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","inputSchema":{"type":"object","properties":{"file_path":{"type":"string"}}},"declared":true},{"name":"create_issue","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__create_issue","capabilities":["destructive"]},{"name":"list_issues","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__list_issues","capabilities":[]},{"name":"delete_repo","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__delete_repo","capabilities":["destructive"]},{"name":"observed_only","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":null,"declared":false}],"expect":{"errors":[],"warnings":["unknown_argument"]}},
7
+ {"id":"VC-3","name":"exact and glob keys lower with their tier and the exact key binds","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\nspec:\n tools:\n default: hold\n rules:\n mcp__github__create_issue: hold\n \"mcp__github__*\": allow\n approvalDefaults: {approvers: 1, roles: [admin]}\n","inventory":[{"name":"create_payment","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true},{"name":"Read","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","inputSchema":{"type":"object","properties":{"file_path":{"type":"string"}}},"declared":true},{"name":"create_issue","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__create_issue","capabilities":["destructive"]},{"name":"list_issues","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__list_issues","capabilities":[]},{"name":"delete_repo","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__delete_repo","capabilities":["destructive"]},{"name":"observed_only","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":null,"declared":false}],"expect":{"errors":[],"warnings":[],"statementIds":["st-mcp-github-create-issue-0","st-mcp-github-0"]}},
8
+ {"id":"VC-4","name":"two same-length globs matching one real tool is a compile error","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\nspec:\n tools:\n default: hold\n rules:\n \"mcp__github__*\": allow\n \"*_create_issue\": block\n approvalDefaults: {approvers: 1, roles: [admin]}\n","inventory":[{"name":"create_payment","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true},{"name":"Read","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","inputSchema":{"type":"object","properties":{"file_path":{"type":"string"}}},"declared":true},{"name":"create_issue","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__create_issue","capabilities":["destructive"]},{"name":"list_issues","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__list_issues","capabilities":[]},{"name":"delete_repo","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__delete_repo","capabilities":["destructive"]},{"name":"observed_only","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":null,"declared":false}],"expect":{"errors":["ambiguous_glob"],"warnings":[]}},
9
+ {"id":"VC-3c","name":"a bare name declared on two owners asks for the qualified form","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\nspec:\n tools:\n default: hold\n rules:\n shared_tool: allow\n approvalDefaults: {approvers: 1, roles: [admin]}\n","inventory":[{"name":"shared_tool","owner":{"type":"mcp_server","id":"srv-a","name":"a"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true},{"name":"shared_tool","owner":{"type":"mcp_server","id":"srv-b","name":"b"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true}],"expect":{"errors":["ambiguous_tool_key"],"warnings":[]}},
10
+ {"id":"VC-14c","name":"a capability key compiles as a capability statement and the report lists uncovered tools","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\nspec:\n tools:\n default: hold\n rules:\n destructive: hold\n approvalDefaults: {approvers: 1, roles: [admin]}\n","inventory":[{"name":"create_payment","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true},{"name":"Read","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","inputSchema":{"type":"object","properties":{"file_path":{"type":"string"}}},"declared":true},{"name":"create_issue","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__create_issue","capabilities":["destructive"]},{"name":"list_issues","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__list_issues","capabilities":[]},{"name":"delete_repo","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__delete_repo","capabilities":["destructive"]},{"name":"observed_only","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":null,"declared":false}],"expect":{"errors":[],"warnings":[],"statementIds":["st-destructive-0"],"report":{"sections":{"tools":"enforced"},"notCoveredByCapabilityRules":["Read","create_payment","mcp__github__list_issues","observed_only"]}}},
11
+ {"id":"VC-11","name":"enforceability on an enterprise target: files and network argument-only, skills and secrets inert","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\nspec:\n tools:\n default: hold\n rules:\n Read: allow\n approvalDefaults: {approvers: 1, roles: [admin]}\n files: {deny: [\"~/.ssh/**\"]}\n network: {default: block, allow: [\"*.github.com\"]}\n skills: {hold: [\"*:deploy*\"]}\n secrets: {envBlocklist: [AWS_SECRET_ACCESS_KEY]}\n","inventory":[{"name":"create_payment","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true},{"name":"Read","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","inputSchema":{"type":"object","properties":{"file_path":{"type":"string"}}},"declared":true},{"name":"create_issue","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__create_issue","capabilities":["destructive"]},{"name":"list_issues","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__list_issues","capabilities":[]},{"name":"delete_repo","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__delete_repo","capabilities":["destructive"]},{"name":"observed_only","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":null,"declared":false}],"expect":{"errors":[],"warnings":[],"statementIds":["st-read-0","st-files-block-0","st-network-allow-0","st-skills-hold-0","st-secrets-block-0"],"report":{"sections":{"tools":"enforced","files":"argument-only","network":"argument-only","skills":"inert","secrets":"inert"},"notCoveredByCapabilityRules":[]}}},
12
+ {"id":"VC-11b","name":"enforceability on a local device: every section enforced","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\ntarget: {device: local}\nspec:\n tools:\n default: hold\n rules:\n Read: allow\n approvalDefaults: {approvers: 1, roles: [admin]}\n files: {deny: [\"~/.ssh/**\"], allowOutsideWorkspace: false}\n secrets: {envBlocklist: [GITHUB_TOKEN]}\n","inventory":[],"expect":{"errors":[],"warnings":["unknown_tool_key"],"statementIds":["st-read-0","st-files-block-0","st-files-block-1","st-secrets-block-0"],"report":{"sections":{"tools":"enforced","files":"enforced","secrets":"enforced"},"notCoveredByCapabilityRules":[]}}},
13
+ {"id":"VC-12","name":"a group target compiles with layer group","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n group: payments\nspec:\n tools:\n default: hold\n rules:\n Read: allow\n approvalDefaults: {approvers: 1, roles: [admin]}\n","inventory":[{"name":"create_payment","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true},{"name":"Read","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","inputSchema":{"type":"object","properties":{"file_path":{"type":"string"}}},"declared":true},{"name":"create_issue","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__create_issue","capabilities":["destructive"]},{"name":"list_issues","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__list_issues","capabilities":[]},{"name":"delete_repo","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__delete_repo","capabilities":["destructive"]},{"name":"observed_only","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":null,"declared":false}],"expect":{"errors":[],"warnings":[],"statementIds":["st-read-0"]}},
14
+ {"id":"VC-16","name":"member rule expiry earlier than its scope wins; scope expiry bounds a rule with none","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\nspec:\n tools:\n default: hold\n rules:\n create_payment: block\n approvalDefaults: {approvers: 1, roles: [admin]}\n members:\n \"alice@armoriq.io\":\n tools:\n rules:\n create_payment:\n - action: allow\n expiresAt: 2026-06-01T00:00:00Z\n Read: allow\n expiresAt: 2026-12-31T00:00:00Z\n","inventory":[{"name":"create_payment","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true},{"name":"Read","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":"sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","inputSchema":{"type":"object","properties":{"file_path":{"type":"string"}}},"declared":true},{"name":"create_issue","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__create_issue","capabilities":["destructive"]},{"name":"list_issues","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__list_issues","capabilities":[]},{"name":"delete_repo","owner":{"type":"mcp_server","id":"srv-github","name":"github"},"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","inputSchema":{"type":"object","properties":{"amount":{"type":"number"},"recipient":{"type":"string"}}},"declared":true,"qualifiedName":"mcp__github__delete_repo","capabilities":["destructive"]},{"name":"observed_only","owner":{"type":"agent","id":"agent-1","name":"support-agent"},"schemaHash":null,"declared":false}],"expect":{"errors":[],"warnings":["loosening_grant","loosening_grant"],"statementIds":["st-create-payment-0","st-create-payment-alice-armoriq-io-0","st-read-alice-armoriq-io-0"],"expiries":{"st-create-payment-alice-armoriq-io-0":"2026-06-01T00:00:00.000Z","st-read-alice-armoriq-io-0":"2026-12-31T00:00:00.000Z"}}},
15
+ {"id":"VC-18c","name":"under device-first a products overlay may only tighten","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\ntarget: {device: local}\nspec:\n tools:\n default: hold\n rules:\n Bash: hold\n approvalDefaults: {approvers: 1, roles: [admin]}\n products:\n claude-code: {tools: {rules: {Bash: allow}}}\n","inventory":[],"expect":{"errors":["device_first_loosening"],"warnings":["loosening_grant","unknown_tool_key","unknown_tool_key"]}},
16
+ {"id":"VC-18d","name":"under agent-first a products overlay may loosen, flagged for review","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\nprecedence: agent-first\ntarget: {device: local}\nspec:\n tools:\n default: hold\n rules:\n Bash: hold\n approvalDefaults: {approvers: 1, roles: [admin]}\n products:\n claude-code: {tools: {rules: {Bash: allow}}}\n","inventory":[],"expect":{"errors":[],"warnings":["loosening_grant","unknown_tool_key","unknown_tool_key"],"statementIds":["st-bash-0","st-bash-claude-code-0"]}}
17
+ ]
@@ -0,0 +1,19 @@
1
+ [
2
+ {"id":"VC-1","name":"the full v2 document parses and validates","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\n mcpServers: [github]\nspec:\n tools:\n default: hold\n rules:\n Read: allow\n \"mcp__github__*\": allow\n destructive: hold\n file.write:\n - when: {path: {glob: \"**/*.tf\"}}\n action: hold\n controls: [SOC2-CC8.1]\n - action: allow\n Bash:\n - when: {command: {matches: '(^|\\s)rm\\s+-[a-zA-Z]*[rf]'}}\n action: block\n reason: recursive force delete\n controls: [SOC2-CC6.1]\n - when: {program: {in: [ls, grep, cat, git]}, writeRedirection: {eq: false}}\n action: allow\n - action: hold\n create_payment:\n - when: {args.amount: {gt: 5000}}\n action: hold\n approval: {approvers: 2, roles: [finance_lead]}\n controls: [SOC2-CC6.1, SOC2-CC7.2]\n - action: allow\n files:\n deny: [\"~/.ssh/**\", \"**/.env*\", \"**/*.pem\"]\n allowOutsideWorkspace: false\n network:\n default: block\n allow: [\"*.github.com\", {host: api.stripe.com, reason: payments}]\n deny: [{host: 169.254.169.254, reason: AWS IMDS credentials endpoint}]\n skills:\n default: allow\n hold: [\"*:deploy*\"]\n members:\n \"alice@armoriq.io\":\n tools:\n rules:\n create_payment:\n - action: allow\n expiresAt: 2026-12-31T00:00:00Z\n expiresAt: never\n \"bob@armoriq.io\":\n tools: {rules: {search_transactions: block}}\n \"team:interns\":\n tools: {default: block}\n capture:\n arguments: true\n redact: [\"*token*\", \"*secret*\", \"authorization\"]\n maxBytesPerCall: 16384\n sample: 1.0\n approvalDefaults: {approvers: 1, roles: [admin]}\n","expect":{"errors":[],"warnings":["loosening_grant"]}},
3
+ {"id":"VC-2","name":"an unknown key is a compile error","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\n mcpServers: [github]\nspec:\n tools:\n default: hold\n rules:\n Read: allow\n denyTools: [rm]\n","expect":{"errors":["unknown_key"],"warnings":[]}},
4
+ {"id":"VC-2b","name":"a v1 status field is an unknown key","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\n mcpServers: [github]\nspec:\n tools:\n default: hold\n rules:\n Read: allow\n status: active\n","expect":{"errors":["unknown_key"],"warnings":[]}},
5
+ {"id":"VC-5","name":"a variant after an unconditional one is unreachable","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\n mcpServers: [github]\nspec:\n tools:\n default: hold\n rules:\n Bash:\n - action: allow\n - when: {args.command: {matches: 'rm'}}\n action: block\n","expect":{"errors":["unreachable_variant"],"warnings":[]}},
6
+ {"id":"VC-6","name":"a hold with no approver and no approvalDefaults is an error","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\n mcpServers: [github]\nspec:\n tools:\n default: hold\n rules:\n create_payment: hold\n","expect":{"errors":["hold_without_approver"],"warnings":[]}},
7
+ {"id":"VC-6b","name":"a hold resolved by approvalDefaults is clean","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\n mcpServers: [github]\nspec:\n tools:\n default: hold\n rules:\n create_payment: hold\n approvalDefaults: {approvers: 1, roles: [admin]}\n","expect":{"errors":[],"warnings":[]}},
8
+ {"id":"VC-6c","name":"an approval that names nobody is unresolvable","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\n mcpServers: [github]\nspec:\n tools:\n default: hold\n rules:\n create_payment:\n - action: hold\n approval: {approvers: 2}\n","expect":{"errors":["approval_unresolvable"],"warnings":[]}},
9
+ {"id":"VC-7","name":"a member grant that loosens the base is flagged for review","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\n mcpServers: [github]\nspec:\n tools:\n default: hold\n rules:\n create_payment: block\n members:\n \"alice@armoriq.io\":\n tools: {rules: {create_payment: allow}}\n","expect":{"errors":[],"warnings":["loosening_grant"]}},
10
+ {"id":"VC-7t","name":"a member rule that tightens the base is not flagged","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\n mcpServers: [github]\nspec:\n tools:\n default: hold\n rules:\n search_transactions: allow\n members:\n \"bob@armoriq.io\":\n tools: {rules: {search_transactions: block}}\n","expect":{"errors":[],"warnings":[]}},
11
+ {"id":"VC-17","name":"device: local is accepted","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\ntarget: {device: local}\nspec:\n tools:\n default: hold\n rules:\n Read: allow\n \"mcp__github__*\": allow\n destructive: hold\n file.write:\n - when: {path: {glob: \"**/*.tf\"}}\n action: hold\n controls: [SOC2-CC8.1]\n - action: allow\n Bash:\n - when: {command: {matches: '(^|\\s)rm\\s+-[a-zA-Z]*[rf]'}}\n action: block\n reason: recursive force delete\n controls: [SOC2-CC6.1]\n - when: {program: {in: [ls, grep, cat, git]}, writeRedirection: {eq: false}}\n action: allow\n - action: hold\n create_payment:\n - when: {args.amount: {gt: 5000}}\n action: hold\n approval: {approvers: 2, roles: [finance_lead]}\n controls: [SOC2-CC6.1, SOC2-CC7.2]\n - action: allow\n files:\n deny: [\"~/.ssh/**\", \"**/.env*\", \"**/*.pem\"]\n allowOutsideWorkspace: false\n network:\n default: block\n allow: [\"*.github.com\", {host: api.stripe.com, reason: payments}]\n deny: [{host: 169.254.169.254, reason: AWS IMDS credentials endpoint}]\n skills:\n default: allow\n hold: [\"*:deploy*\"]\n capture:\n arguments: true\n redact: [\"*token*\", \"*secret*\", \"authorization\"]\n maxBytesPerCall: 16384\n sample: 1.0\n approvalDefaults: {approvers: 1, roles: [admin]}\n","expect":{"errors":[],"warnings":[]}},
12
+ {"id":"VC-17b","name":"target product is an unknown key","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget: {product: armorclaude}\nspec:\n tools:\n default: hold\n rules:\n Read: allow\n \"mcp__github__*\": allow\n destructive: hold\n file.write:\n - when: {path: {glob: \"**/*.tf\"}}\n action: hold\n controls: [SOC2-CC8.1]\n - action: allow\n Bash:\n - when: {command: {matches: '(^|\\s)rm\\s+-[a-zA-Z]*[rf]'}}\n action: block\n reason: recursive force delete\n controls: [SOC2-CC6.1]\n - when: {program: {in: [ls, grep, cat, git]}, writeRedirection: {eq: false}}\n action: allow\n - action: hold\n create_payment:\n - when: {args.amount: {gt: 5000}}\n action: hold\n approval: {approvers: 2, roles: [finance_lead]}\n controls: [SOC2-CC6.1, SOC2-CC7.2]\n - action: allow\n files:\n deny: [\"~/.ssh/**\", \"**/.env*\", \"**/*.pem\"]\n allowOutsideWorkspace: false\n network:\n default: block\n allow: [\"*.github.com\", {host: api.stripe.com, reason: payments}]\n deny: [{host: 169.254.169.254, reason: AWS IMDS credentials endpoint}]\n skills:\n default: allow\n hold: [\"*:deploy*\"]\n members:\n \"alice@armoriq.io\":\n tools:\n rules:\n create_payment:\n - action: allow\n expiresAt: 2026-12-31T00:00:00Z\n expiresAt: never\n \"bob@armoriq.io\":\n tools: {rules: {search_transactions: block}}\n \"team:interns\":\n tools: {default: block}\n capture:\n arguments: true\n redact: [\"*token*\", \"*secret*\", \"authorization\"]\n maxBytesPerCall: 16384\n sample: 1.0\n approvalDefaults: {approvers: 1, roles: [admin]}\n","expect":{"errors":["target_form","unknown_key"],"warnings":[]}},
13
+ {"id":"VC-18","name":"products and precedence are local only","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\nprecedence: device-first\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\n mcpServers: [github]\nspec:\n tools:\n default: hold\n rules:\n Read: allow\n products:\n claude-code: {tools: {rules: {Bash: block}}}\n","expect":{"errors":["local_only_section","local_only_section"],"warnings":[]}},
14
+ {"id":"VC-18b","name":"members is enterprise only","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\ntarget: {device: local}\nspec:\n tools:\n default: hold\n rules:\n Read: allow\n members:\n \"alice@armoriq.io\": {tools: {rules: {Read: block}}}\n","expect":{"errors":["enterprise_only_section"],"warnings":[]}},
15
+ {"id":"VC-11c","name":"a condition takes exactly one operator","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\n mcpServers: [github]\nspec:\n tools:\n default: hold\n rules:\n create_payment:\n - when: {args.amount: {gt: 5000, lt: 9000}}\n action: block\n","expect":{"errors":["condition_operator"],"warnings":[]}},
16
+ {"id":"VC-11d","name":"a numeric operator rejects a string operand","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\n mcpServers: [github]\nspec:\n tools:\n default: hold\n rules:\n create_payment:\n - when: {args.amount: {gt: \"5000\"}}\n action: block\n","expect":{"errors":["condition_operand"],"warnings":[]}},
17
+ {"id":"VC-11e","name":"matches rejects a lookaround the Rego evaluator cannot run","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\n mcpServers: [github]\nspec:\n tools:\n default: hold\n rules:\n Bash:\n - when: {command: {matches: '(?=rm)'}}\n action: block\n","expect":{"errors":["condition_operand"],"warnings":[]}},
18
+ {"id":"VC-1b","name":"tools.default is required","yaml":"apiVersion: armor.io/v2\nkind: Policy\nmetadata:\n name: vector\n orgId: 11111111-1111-4111-8111-111111111111\ntarget:\n agent: aaaaaaaa-0000-4000-8000-000000000001\n mcpServers: [github]\nspec:\n tools:\n rules:\n Read: allow\n","expect":{"errors":["expected_verdict"],"warnings":[]}}
19
+ ]
@@ -0,0 +1,27 @@
1
+ [
2
+ {"id":"VE-1","name":"absent argument in when falls through to the next variant","bound":{"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-pay-hold","subject":null,"conditions":[{"field":"args.amount","op":"gt","value":5000,"schemaBinding":{"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}}],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":0},"effect":"hold","approval":{"approvers":2,"roles":["finance_lead"]}},{"id":"st-pay-allow","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":1,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":1},"effect":"allow"}]}},"input":{"tool":"create_payment","arguments":{"recipient":"acme"},"timestamp":"2026-09-18T12:00:00Z"},"expect":{"verdict":"allow","statementId":"st-pay-allow","layer":"agent","ruleKey":"create_payment"}},
3
+ {"id":"VE-8","name":"hold carries its resolved approval","bound":{"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-pay-hold","subject":null,"conditions":[{"field":"args.amount","op":"gt","value":5000,"schemaBinding":{"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}}],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":0},"effect":"hold","approval":{"approvers":2,"roles":["finance_lead"]}},{"id":"st-pay-allow","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":1,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":1},"effect":"allow"}]}},"input":{"tool":"create_payment","arguments":{"amount":9000},"timestamp":"2026-09-18T12:00:00Z","schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},"expect":{"verdict":"hold","statementId":"st-pay-hold","layer":"agent","ruleKey":"create_payment","approval":{"approvers":2,"roles":["finance_lead"]},"obligations":[]}},
4
+ {"id":"VE-2","name":"schema drift still evaluates by name and attaches schema_drift","bound":{"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-pay-hold","subject":null,"conditions":[{"field":"args.amount","op":"gt","value":5000,"schemaBinding":{"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}}],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":0},"effect":"hold","approval":{"approvers":2,"roles":["finance_lead"]}},{"id":"st-pay-allow","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":1,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":1},"effect":"allow"}]}},"input":{"tool":"create_payment","arguments":{"amount":9000},"timestamp":"2026-09-18T12:00:00Z","schemaHash":"sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"},"expect":{"verdict":"hold","statementId":"st-pay-hold","layer":"agent","ruleKey":"create_payment","obligations":[{"type":"schema_drift","statementId":"st-pay-hold","bound":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","observed":"sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"}]}},
5
+ {"id":"VE-3","name":"exact key beats glob key","bound":{"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-glob","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"mcp__github__*","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"mcp__github__*","keyTier":"glob","order":0},"effect":"allow"},{"id":"st-exact","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"mcp__github__create_issue","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"mcp__github__create_issue","keyTier":"exact","order":0},"effect":"hold"}]}},"input":{"tool":"mcp__github__create_issue","arguments":{},"timestamp":"2026-09-18T12:00:00Z"},"expect":{"verdict":"hold","statementId":"st-exact","layer":"agent","ruleKey":"mcp__github__create_issue"}},
6
+ {"id":"VE-3b","name":"longer glob beats shorter glob","bound":{"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-short","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"mcp__*","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"mcp__*","keyTier":"glob","order":0},"effect":"allow"},{"id":"st-long","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"mcp__github__*","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"mcp__github__*","keyTier":"glob","order":0},"effect":"hold"}]}},"input":{"tool":"mcp__github__delete_repo","arguments":{},"timestamp":"2026-09-18T12:00:00Z"},"expect":{"verdict":"hold","statementId":"st-long","layer":"agent","ruleKey":"mcp__github__*"}},
7
+ {"id":"VE-4","name":"floor merge: files.deny blocks a Read the agent allows","bound":{"floor":{"schemaVersion":"armor.policy.v2","policyId":"p-floor","target":{"org":"*"},"layer":"floor","defaults":{"tools":"allow","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-ssh","subject":null,"conditions":[{"field":"path","op":"glob","value":"**/.ssh/**"}],"expiresAt":"never","provenance":{"ruleKey":"files","variant":0,"source":"yaml","layer":"floor"},"match":{"capability":"files"},"effect":"block"}]},"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-read","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"Read","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"Read","keyTier":"exact","order":0},"effect":"allow"}]}},"input":{"tool":"Read","arguments":{"file_path":"/home/u/.ssh/id_rsa"},"timestamp":"2026-09-18T12:00:00Z","capabilities":["files"],"derived":{"path":"/home/u/.ssh/id_rsa"}},"expect":{"verdict":"block","statementId":"st-ssh","layer":"floor","ruleKey":"files"}},
8
+ {"id":"VE-4b","name":"floor capability rule does not fire outside its path glob","bound":{"floor":{"schemaVersion":"armor.policy.v2","policyId":"p-floor","target":{"org":"*"},"layer":"floor","defaults":{"tools":"allow","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-ssh","subject":null,"conditions":[{"field":"path","op":"glob","value":"**/.ssh/**"}],"expiresAt":"never","provenance":{"ruleKey":"files","variant":0,"source":"yaml","layer":"floor"},"match":{"capability":"files"},"effect":"block"}]},"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-read","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"Read","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"Read","keyTier":"exact","order":0},"effect":"allow"}]}},"input":{"tool":"Read","arguments":{"file_path":"/home/u/notes.md"},"timestamp":"2026-09-18T12:00:00Z","capabilities":["files"],"derived":{"path":"/home/u/notes.md"}},"expect":{"verdict":"allow","statementId":"st-read","layer":"agent","ruleKey":"Read"}},
9
+ {"id":"VE-5","name":"member overlay loosens the base for alice only","bound":{"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-base","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":0},"effect":"block"},{"id":"st-alice","subject":{"membershipId":"m-alice"},"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":0},"effect":"allow"}]}},"input":{"tool":"create_payment","arguments":{"amount":10},"timestamp":"2026-09-18T12:00:00Z","member":{"membershipId":"m-alice"}},"expect":{"verdict":"allow","statementId":"st-alice","layer":"member","ruleKey":"create_payment"}},
10
+ {"id":"VE-5a","name":"everyone else keeps the base verdict","bound":{"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-base","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":0},"effect":"block"},{"id":"st-alice","subject":{"membershipId":"m-alice"},"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":0},"effect":"allow"}]}},"input":{"tool":"create_payment","arguments":{"amount":10},"timestamp":"2026-09-18T12:00:00Z","member":{"membershipId":"m-carol"}},"expect":{"verdict":"block","statementId":"st-base","layer":"agent","ruleKey":"create_payment"}},
11
+ {"id":"VE-5b","name":"member overlay tightens the base for bob","bound":{"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-base","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"search_transactions","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"search_transactions","keyTier":"exact","order":0},"effect":"allow"},{"id":"st-bob","subject":{"email":"Bob@Example.com"},"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"search_transactions","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"search_transactions","keyTier":"exact","order":0},"effect":"block"}]}},"input":{"tool":"search_transactions","arguments":{},"timestamp":"2026-09-18T12:00:00Z","member":{"email":"bob@example.com"}},"expect":{"verdict":"block","statementId":"st-bob","layer":"member","ruleKey":"search_transactions"}},
12
+ {"id":"VE-5c","name":"org floor beats any member grant","bound":{"floor":{"schemaVersion":"armor.policy.v2","policyId":"p-floor","target":{"org":"*"},"layer":"floor","defaults":{"tools":"allow","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-floor","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"delete_all","variant":0,"source":"yaml","layer":"floor"},"match":{"tool":"delete_all","keyTier":"exact","order":0},"effect":"block"}]},"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-alice","subject":{"membershipId":"m-alice"},"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"delete_all","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"delete_all","keyTier":"exact","order":0},"effect":"allow"}]}},"input":{"tool":"delete_all","arguments":{},"timestamp":"2026-09-18T12:00:00Z","member":{"membershipId":"m-alice"}},"expect":{"verdict":"block","statementId":"st-floor","layer":"floor","ruleKey":"delete_all"}},
13
+ {"id":"VE-5d","name":"expired member rule is skipped","bound":{"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-base","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":0},"effect":"block"},{"id":"st-alice","subject":{"membershipId":"m-alice"},"conditions":[],"expiresAt":"2026-01-01T00:00:00Z","provenance":{"ruleKey":"create_payment","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":0},"effect":"allow"}]}},"input":{"tool":"create_payment","arguments":{},"timestamp":"2026-09-18T12:00:00Z","member":{"membershipId":"m-alice"}},"expect":{"verdict":"block","statementId":"st-base","layer":"agent","ruleKey":"create_payment"}},
14
+ {"id":"VE-5e","name":"member key specificity: membershipId beats email beats group","bound":{"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-group","subject":{"group":"finance"},"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"x","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"x","keyTier":"exact","order":0},"effect":"block"},{"id":"st-email","subject":{"email":"alice@example.com"},"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"x","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"x","keyTier":"exact","order":0},"effect":"hold"},{"id":"st-id","subject":{"membershipId":"m-alice"},"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"x","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"x","keyTier":"exact","order":0},"effect":"allow"}]}},"input":{"tool":"x","arguments":{},"timestamp":"2026-09-18T12:00:00Z","member":{"membershipId":"m-alice","email":"alice@example.com","groups":["finance"]}},"expect":{"verdict":"allow","statementId":"st-id","layer":"member","ruleKey":"x"}},
15
+ {"id":"VE-5f","name":"member key specificity: email beats group when no membershipId rule exists","bound":{"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-group","subject":{"group":"finance"},"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"x","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"x","keyTier":"exact","order":0},"effect":"block"},{"id":"st-email","subject":{"email":"alice@example.com"},"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"x","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"x","keyTier":"exact","order":0},"effect":"hold"}]}},"input":{"tool":"x","arguments":{},"timestamp":"2026-09-18T12:00:00Z","member":{"membershipId":"m-alice","email":"alice@example.com","groups":["finance"]}},"expect":{"verdict":"hold","statementId":"st-email","layer":"member","ruleKey":"x"}},
16
+ {"id":"VE-6","name":"unknown tool goes to the most specific tools.default, never a wildcard","bound":{"floor":{"schemaVersion":"armor.policy.v2","policyId":"p-floor","target":{"org":"*"},"layer":"floor","defaults":{"tools":"allow","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[]},"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-pay-hold","subject":null,"conditions":[{"field":"args.amount","op":"gt","value":5000,"schemaBinding":{"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}}],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":0},"effect":"hold","approval":{"approvers":2,"roles":["finance_lead"]}},{"id":"st-pay-allow","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":1,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":1},"effect":"allow"}]}},"input":{"tool":"brand_new_tool","arguments":{},"timestamp":"2026-09-18T12:00:00Z"},"expect":{"verdict":"hold","statementId":null,"layer":"agent","ruleKey":"tools.default"}},
17
+ {"id":"VE-7","name":"variant order: first match wins","bound":{"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-rm","subject":null,"conditions":[{"field":"args.command","op":"regex","value":"\\brm\\s+-rf\\b"}],"expiresAt":"never","provenance":{"ruleKey":"Bash","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"Bash","keyTier":"exact","order":0},"effect":"block"},{"id":"st-safe","subject":null,"conditions":[{"field":"program","op":"in","value":["git","ls","rm"]}],"expiresAt":"never","provenance":{"ruleKey":"Bash","variant":1,"source":"yaml","layer":"agent"},"match":{"tool":"Bash","keyTier":"exact","order":1},"effect":"allow"}]}},"input":{"tool":"Bash","arguments":{"command":"rm -rf /tmp/x"},"timestamp":"2026-09-18T12:00:00Z","derived":{"program":"rm"}},"expect":{"verdict":"block","statementId":"st-rm","layer":"agent","ruleKey":"Bash"}},
18
+ {"id":"VE-9","name":"provenance names the deciding statement, key and variant","bound":{"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-pay-hold","subject":null,"conditions":[{"field":"args.amount","op":"gt","value":5000,"schemaBinding":{"schemaHash":"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}}],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":0},"effect":"hold","approval":{"approvers":2,"roles":["finance_lead"]}},{"id":"st-pay-allow","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":1,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":1},"effect":"allow"}]}},"input":{"tool":"create_payment","arguments":{"amount":1},"timestamp":"2026-09-18T12:00:00Z"},"expect":{"verdict":"allow","statementId":"st-pay-allow","layer":"agent","ruleKey":"create_payment"}},
19
+ {"id":"VE-11","name":"agent policy overrides group policy, loosening","bound":{"group":{"schemaVersion":"armor.policy.v2","policyId":"p-group","target":{"group":"payments"},"layer":"group","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-g","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":0,"source":"yaml","layer":"group"},"match":{"tool":"create_payment","keyTier":"exact","order":0},"effect":"hold"}]},"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-a","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"create_payment","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"create_payment","keyTier":"exact","order":0},"effect":"allow"}]}},"input":{"tool":"create_payment","arguments":{},"timestamp":"2026-09-18T12:00:00Z"},"expect":{"verdict":"allow","statementId":"st-a","layer":"agent","ruleKey":"create_payment"}},
20
+ {"id":"VE-11b","name":"agent policy overrides group policy, tightening","bound":{"group":{"schemaVersion":"armor.policy.v2","policyId":"p-group","target":{"group":"payments"},"layer":"group","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-g","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"Read","variant":0,"source":"yaml","layer":"group"},"match":{"tool":"Read","keyTier":"exact","order":0},"effect":"allow"}]},"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-a","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"Read","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"Read","keyTier":"exact","order":0},"effect":"block"}]}},"input":{"tool":"Read","arguments":{},"timestamp":"2026-09-18T12:00:00Z"},"expect":{"verdict":"block","statementId":"st-a","layer":"agent","ruleKey":"Read"}},
21
+ {"id":"VE-12","name":"group policy applies when the agent policy is silent","bound":{"group":{"schemaVersion":"armor.policy.v2","policyId":"p-group","target":{"group":"payments"},"layer":"group","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-g","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"search_transactions","variant":0,"source":"yaml","layer":"group"},"match":{"tool":"search_transactions","keyTier":"exact","order":0},"effect":"hold"}]},"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-a","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"Read","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"Read","keyTier":"exact","order":0},"effect":"allow"}]}},"input":{"tool":"search_transactions","arguments":{},"timestamp":"2026-09-18T12:00:00Z"},"expect":{"verdict":"hold","statementId":"st-g","layer":"group","ruleKey":"search_transactions"}},
22
+ {"id":"VE-13","name":"floor beats both group and agent","bound":{"floor":{"schemaVersion":"armor.policy.v2","policyId":"p-floor","target":{"org":"*"},"layer":"floor","defaults":{"tools":"allow","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-f","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"delete_all","variant":0,"source":"yaml","layer":"floor"},"match":{"tool":"delete_all","keyTier":"exact","order":0},"effect":"block"}]},"group":{"schemaVersion":"armor.policy.v2","policyId":"p-group","target":{"group":"payments"},"layer":"group","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-g","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"delete_all","variant":0,"source":"yaml","layer":"group"},"match":{"tool":"delete_all","keyTier":"exact","order":0},"effect":"allow"}]},"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-a","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"delete_all","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"delete_all","keyTier":"exact","order":0},"effect":"allow"}]}},"input":{"tool":"delete_all","arguments":{},"timestamp":"2026-09-18T12:00:00Z"},"expect":{"verdict":"block","statementId":"st-f","layer":"floor","ruleKey":"delete_all"}},
23
+ {"id":"VE-13b","name":"a floor hold tightens an agent allow but yields to an agent block","bound":{"floor":{"schemaVersion":"armor.policy.v2","policyId":"p-floor","target":{"org":"*"},"layer":"floor","defaults":{"tools":"allow","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-f","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"deploy","variant":0,"source":"yaml","layer":"floor"},"match":{"tool":"deploy","keyTier":"exact","order":0},"effect":"hold"}]},"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-a","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"deploy","variant":0,"source":"yaml","layer":"agent"},"match":{"tool":"deploy","keyTier":"exact","order":0},"effect":"allow"}]}},"input":{"tool":"deploy","arguments":{},"timestamp":"2026-09-18T12:00:00Z"},"expect":{"verdict":"hold","statementId":"st-f","layer":"floor","ruleKey":"deploy"}},
24
+ {"id":"VE-14","name":"capability rule binds by tag only: tagged tool holds","bound":{"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"allow","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-destructive","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"destructive","variant":0,"source":"yaml","layer":"agent"},"match":{"capability":"destructive"},"effect":"hold"}]}},"input":{"tool":"mcp__jira__delete_issue","arguments":{},"timestamp":"2026-09-18T12:00:00Z","capabilities":["destructive"]},"expect":{"verdict":"hold","statementId":"st-destructive","layer":"agent","ruleKey":"destructive"}},
25
+ {"id":"VE-14b","name":"capability rule binds by tag only: untagged tool on the same server gets tools.default","bound":{"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"allow","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[{"id":"st-destructive","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"destructive","variant":0,"source":"yaml","layer":"agent"},"match":{"capability":"destructive"},"effect":"hold"}]}},"input":{"tool":"mcp__jira__list_issues","arguments":{},"timestamp":"2026-09-18T12:00:00Z","capabilities":[]},"expect":{"verdict":"allow","statementId":null,"layer":"agent","ruleKey":"tools.default"}},
26
+ {"id":"VE-15","name":"an expired document contributes nothing","bound":{"group":{"schemaVersion":"armor.policy.v2","policyId":"p-group","target":{"group":"payments"},"layer":"group","defaults":{"tools":"hold","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"2026-01-01T00:00:00Z","statements":[{"id":"st-g","subject":null,"conditions":[],"expiresAt":"never","provenance":{"ruleKey":"x","variant":0,"source":"yaml","layer":"group"},"match":{"tool":"x","keyTier":"exact","order":0},"effect":"block"}]},"agent":{"schemaVersion":"armor.policy.v2","policyId":"p-agent","target":{"agent":"aaaaaaaa-0000-4000-8000-000000000001"},"layer":"agent","defaults":{"tools":"allow","network":"block","files":"allow","skills":"allow"},"capture":{"arguments":true,"redact":["*token*"],"maxBytesPerCall":16384,"sample":1},"expiresAt":"never","statements":[]}},"input":{"tool":"x","arguments":{},"timestamp":"2026-09-18T12:00:00Z"},"expect":{"verdict":"allow","statementId":null,"layer":"agent","ruleKey":"tools.default"}}
27
+ ]
@@ -0,0 +1,115 @@
1
+ [
2
+ {
3
+ "name": "hold on create_payment above 5000",
4
+ "document": {
5
+ "schemaVersion": "armor.policy.v2",
6
+ "policyId": "11111111-1111-4111-8111-111111111111",
7
+ "target": {
8
+ "agent": "d5c85519-3b8e-4f1e-9d2a-000000000001",
9
+ "mcpServers": [
10
+ "github"
11
+ ]
12
+ },
13
+ "layer": "agent",
14
+ "defaults": {
15
+ "tools": "hold",
16
+ "network": "block",
17
+ "files": "allow",
18
+ "skills": "allow"
19
+ },
20
+ "capture": {
21
+ "arguments": true,
22
+ "redact": [
23
+ "*token*"
24
+ ],
25
+ "maxBytesPerCall": 16384,
26
+ "sample": 1
27
+ },
28
+ "expiresAt": "never",
29
+ "statements": [
30
+ {
31
+ "id": "st-pay-hold",
32
+ "subject": null,
33
+ "match": {
34
+ "tool": "create_payment",
35
+ "keyTier": "exact",
36
+ "order": 0
37
+ },
38
+ "effect": "hold",
39
+ "conditions": [
40
+ {
41
+ "field": "args.amount",
42
+ "op": "gt",
43
+ "value": 5000,
44
+ "schemaBinding": {
45
+ "schemaHash": "sha256:1111111111111111111111111111111111111111111111111111111111111111"
46
+ }
47
+ }
48
+ ],
49
+ "approval": {
50
+ "approvers": 2,
51
+ "roles": [
52
+ "finance_lead"
53
+ ]
54
+ },
55
+ "expiresAt": "never",
56
+ "provenance": {
57
+ "ruleKey": "create_payment",
58
+ "variant": 0,
59
+ "source": "yaml",
60
+ "layer": "agent"
61
+ }
62
+ },
63
+ {
64
+ "id": "st-files-ssh",
65
+ "subject": null,
66
+ "match": {
67
+ "capability": "files"
68
+ },
69
+ "effect": "block",
70
+ "conditions": [
71
+ {
72
+ "field": "path",
73
+ "op": "glob",
74
+ "value": "~/.ssh/**"
75
+ }
76
+ ],
77
+ "expiresAt": "never",
78
+ "provenance": {
79
+ "ruleKey": "files.deny",
80
+ "variant": 0,
81
+ "source": "yaml",
82
+ "layer": "agent"
83
+ }
84
+ }
85
+ ]
86
+ },
87
+ "policyHash": "sha256:007f204da14735e58b74d23a4909ee972d53cc2c8bd293217b71cab3d7b292bb"
88
+ },
89
+ {
90
+ "name": "org floor with no statements",
91
+ "document": {
92
+ "schemaVersion": "armor.policy.v2",
93
+ "policyId": "22222222-2222-4222-8222-222222222222",
94
+ "target": {
95
+ "org": "*"
96
+ },
97
+ "layer": "floor",
98
+ "defaults": {
99
+ "tools": "hold",
100
+ "network": "block",
101
+ "files": "allow",
102
+ "skills": "allow"
103
+ },
104
+ "capture": {
105
+ "arguments": false,
106
+ "redact": [],
107
+ "maxBytesPerCall": 0,
108
+ "sample": 0
109
+ },
110
+ "expiresAt": "2027-01-01T00:00:00Z",
111
+ "statements": []
112
+ },
113
+ "policyHash": "sha256:02a98fe3c5263f505f72562a87154fc3bd67f561ffb0f264f7fb5b90bd3d65c4"
114
+ }
115
+ ]