@armoriq/policy-ir 0.1.3 → 0.1.4
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/dist/index.cjs +19 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/vectors.cjs +1 -0
- package/dist/vectors.cjs.map +1 -1
- package/dist/vectors.js +1 -0
- package/dist/vectors.js.map +1 -1
- package/package.json +5 -6
- package/vectors/compile.json +1 -0
package/dist/vectors.js
CHANGED
|
@@ -954,6 +954,7 @@ spec:
|
|
|
954
954
|
var compile_default = [
|
|
955
955
|
{ 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" } } },
|
|
956
956
|
{ 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"] } },
|
|
957
|
+
{ id: "VC-15b", name: "FERPA, ITAR and EAR section identifiers compile with no 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 Read:\n - action: allow\n controls: [FERPA-99.31, ITAR-120.50, EAR-734.13]\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"] } },
|
|
957
958
|
{ 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"] } },
|
|
958
959
|
{ 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 } } },
|
|
959
960
|
{ 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"] } },
|