@zivis/cli 0.1.0-alpha.33 → 0.1.0-alpha.35
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/LICENSE +201 -0
- package/README.md +31 -0
- package/dist/commands/app/index.d.ts +0 -8
- package/dist/commands/app/index.js +0 -12
- package/dist/commands/auth/bind.d.ts +0 -10
- package/dist/commands/auth/bind.js +0 -11
- package/dist/commands/auth/index.js +0 -1
- package/dist/commands/auth/init.js +12 -13
- package/dist/commands/auth/login.d.ts +0 -1
- package/dist/commands/auth/login.js +8 -3
- package/dist/commands/auth/logout.js +0 -3
- package/dist/commands/auth/sessions.js +0 -1
- package/dist/commands/auth/status.js +0 -2
- package/dist/commands/auth/token.d.ts +0 -13
- package/dist/commands/auth/token.js +0 -18
- package/dist/commands/check/index.d.ts +2 -0
- package/dist/commands/check/index.js +463 -0
- package/dist/commands/credits/index.js +0 -1
- package/dist/commands/inspect/index.d.ts +0 -15
- package/dist/commands/inspect/index.js +0 -23
- package/dist/commands/mcp/index.js +0 -9
- package/dist/commands/open/index.d.ts +0 -8
- package/dist/commands/open/index.js +0 -11
- package/dist/commands/scan/index.js +0 -6
- package/dist/commands/target/index.js +0 -3
- package/dist/commands/tm/index.js +0 -7
- package/dist/index.js +11 -1
- package/dist/internal/binding-token-mint.d.ts +0 -29
- package/dist/internal/binding-token-mint.js +0 -28
- package/dist/internal/extractor/adapters/go/index.d.ts +0 -4
- package/dist/internal/extractor/adapters/go/index.js +0 -6
- package/dist/internal/extractor/adapters/go/manifest.d.ts +0 -17
- package/dist/internal/extractor/adapters/go/manifest.js +1 -25
- package/dist/internal/extractor/adapters/go/parser.d.ts +0 -4
- package/dist/internal/extractor/adapters/go/parser.js +0 -5
- package/dist/internal/extractor/adapters/go/scanner.d.ts +0 -20
- package/dist/internal/extractor/adapters/go/scanner.js +0 -43
- package/dist/internal/extractor/adapters/python/index.d.ts +0 -3
- package/dist/internal/extractor/adapters/python/index.js +0 -4
- package/dist/internal/extractor/adapters/python/manifest.d.ts +0 -8
- package/dist/internal/extractor/adapters/python/manifest.js +3 -18
- package/dist/internal/extractor/adapters/python/parser.d.ts +0 -3
- package/dist/internal/extractor/adapters/python/parser.js +0 -4
- package/dist/internal/extractor/adapters/python/scanner.d.ts +0 -18
- package/dist/internal/extractor/adapters/python/scanner.js +1 -54
- package/dist/internal/extractor/adapters/typescript/index.d.ts +0 -7
- package/dist/internal/extractor/adapters/typescript/index.js +1 -21
- package/dist/internal/extractor/adapters/typescript/manifest.d.ts +0 -14
- package/dist/internal/extractor/adapters/typescript/manifest.js +1 -20
- package/dist/internal/extractor/adapters/typescript/parser.d.ts +0 -8
- package/dist/internal/extractor/adapters/typescript/parser.js +0 -9
- package/dist/internal/extractor/adapters/typescript/scanner.d.ts +0 -24
- package/dist/internal/extractor/adapters/typescript/scanner.js +0 -43
- package/dist/internal/extractor/graph-builder.d.ts +0 -25
- package/dist/internal/extractor/graph-builder.js +1 -39
- package/dist/internal/extractor/graph-types.d.ts +0 -10
- package/dist/internal/extractor/graph-types.js +0 -11
- package/dist/internal/extractor/index.d.ts +0 -14
- package/dist/internal/extractor/index.js +0 -13
- package/dist/internal/extractor/types.d.ts +0 -45
- package/dist/internal/extractor/types.js +0 -27
- package/dist/internal/extractor/walker.d.ts +0 -18
- package/dist/internal/extractor/walker.js +0 -18
- package/dist/internal/github-linkage-prompt.d.ts +7 -0
- package/dist/internal/github-linkage-prompt.js +95 -0
- package/dist/internal/ide-setup.d.ts +0 -23
- package/dist/internal/ide-setup.js +0 -53
- package/dist/internal/orgs.js +0 -1
- package/dist/internal/project-binding.d.ts +0 -1
- package/dist/internal/project-binding.js +0 -5
- package/dist/internal/target-auth/api-config.d.ts +0 -17
- package/dist/internal/target-auth/api-config.js +0 -18
- package/dist/internal/target-auth/config.d.ts +0 -12
- package/dist/internal/target-auth/config.js +0 -13
- package/dist/internal/target-auth/index.d.ts +0 -18
- package/dist/internal/target-auth/index.js +0 -19
- package/dist/internal/target-auth/keychain.d.ts +0 -18
- package/dist/internal/target-auth/keychain.js +3 -23
- package/dist/internal/target-auth/types.d.ts +0 -26
- package/dist/internal/target-auth/types.js +0 -10
- package/dist/internal/target-auth/workos.d.ts +0 -15
- package/dist/internal/target-auth/workos.js +0 -17
- package/package.json +13 -4
- package/dist/commands/app/index.js.map +0 -1
- package/dist/commands/auth/bind.js.map +0 -1
- package/dist/commands/auth/index.js.map +0 -1
- package/dist/commands/auth/init.js.map +0 -1
- package/dist/commands/auth/login.js.map +0 -1
- package/dist/commands/auth/logout.js.map +0 -1
- package/dist/commands/auth/sessions.js.map +0 -1
- package/dist/commands/auth/status.js.map +0 -1
- package/dist/commands/auth/token.js.map +0 -1
- package/dist/commands/credits/index.js.map +0 -1
- package/dist/commands/inspect/index.js.map +0 -1
- package/dist/commands/mcp/index.js.map +0 -1
- package/dist/commands/open/index.js.map +0 -1
- package/dist/commands/scan/index.js.map +0 -1
- package/dist/commands/target/index.js.map +0 -1
- package/dist/commands/tm/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal/binding-token-mint.js.map +0 -1
- package/dist/internal/extractor/adapters/go/index.js.map +0 -1
- package/dist/internal/extractor/adapters/go/manifest.js.map +0 -1
- package/dist/internal/extractor/adapters/go/parser.js.map +0 -1
- package/dist/internal/extractor/adapters/go/scanner.js.map +0 -1
- package/dist/internal/extractor/adapters/python/index.js.map +0 -1
- package/dist/internal/extractor/adapters/python/manifest.js.map +0 -1
- package/dist/internal/extractor/adapters/python/parser.js.map +0 -1
- package/dist/internal/extractor/adapters/python/scanner.js.map +0 -1
- package/dist/internal/extractor/adapters/typescript/index.js.map +0 -1
- package/dist/internal/extractor/adapters/typescript/manifest.js.map +0 -1
- package/dist/internal/extractor/adapters/typescript/parser.js.map +0 -1
- package/dist/internal/extractor/adapters/typescript/scanner.js.map +0 -1
- package/dist/internal/extractor/graph-builder.js.map +0 -1
- package/dist/internal/extractor/graph-types.js.map +0 -1
- package/dist/internal/extractor/index.js.map +0 -1
- package/dist/internal/extractor/types.js.map +0 -1
- package/dist/internal/extractor/walker.js.map +0 -1
- package/dist/internal/ide-setup.js.map +0 -1
- package/dist/internal/orgs.js.map +0 -1
- package/dist/internal/pattern-pack/index.d.ts +0 -123
- package/dist/internal/pattern-pack/index.js +0 -230
- package/dist/internal/pattern-pack/index.js.map +0 -1
- package/dist/internal/project-binding.js.map +0 -1
- package/dist/internal/target-auth/api-config.js.map +0 -1
- package/dist/internal/target-auth/config.js.map +0 -1
- package/dist/internal/target-auth/index.js.map +0 -1
- package/dist/internal/target-auth/keychain.js.map +0 -1
- package/dist/internal/target-auth/types.js.map +0 -1
- package/dist/internal/target-auth/workos.js.map +0 -1
- package/dist/pattern-packs/zivis-public-0.1.0/capsules/agents/privilege-separation.yaml +0 -228
- package/dist/pattern-packs/zivis-public-0.1.0/manifest.json +0 -31
- package/dist/pattern-packs/zivis-public-0.1.0/prompts/agents/privilege-separation/identify.md +0 -54
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workos.js","sourceRoot":"","sources":["../../../src/internal/target-auth/workos.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC1C,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAOvC,SAAS,QAAQ,CAAC,IAA0B;IAC1C,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,QAAQ;YACX,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;Q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AAC;QACP,2EAA2E;QAC3E,MAAM,aAAa,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACzD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,OAAO,IAAI,CAAC,CAAC;IACpD,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;IAC/B,OAAO,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC3C,CAAC;AAED,OAAO,EAAE,aAAa,IAAI,aAAa,EAAE,CAAC"}
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
# Detection Card: Privilege Separation (absent)
|
|
2
|
-
# Spec: docs/specs/PATTERN-MATCHING-LIBRARY-V1.md
|
|
3
|
-
# Schema: schemas/pattern-detection-card.schema.json
|
|
4
|
-
|
|
5
|
-
id: agents.privilege-separation
|
|
6
|
-
slug: privilege-separation
|
|
7
|
-
version: 0.1.0
|
|
8
|
-
category: agents
|
|
9
|
-
title: Privilege Separation
|
|
10
|
-
headline: Per-Subtask Capability Scoping
|
|
11
|
-
description: >
|
|
12
|
-
Detects agentic codebases where multiple agents share a single tool/capability
|
|
13
|
-
set without per-agent scoping. Absence of privilege separation means one
|
|
14
|
-
compromised agent inherits the full capability surface of the system.
|
|
15
|
-
detection_tier: public
|
|
16
|
-
scoring_tier: proprietary
|
|
17
|
-
|
|
18
|
-
applicable_languages:
|
|
19
|
-
- typescript
|
|
20
|
-
- javascript
|
|
21
|
-
- python
|
|
22
|
-
|
|
23
|
-
# Don't run this pattern unless an agent framework is actually present.
|
|
24
|
-
# Mirrors nuclei-style relevance gating to keep the noise floor low.
|
|
25
|
-
relevance_filter:
|
|
26
|
-
any_of:
|
|
27
|
-
- dependency: "langgraph"
|
|
28
|
-
direct_only: true
|
|
29
|
-
- dependency: "langchain"
|
|
30
|
-
direct_only: true
|
|
31
|
-
- dependency: "@langchain/langgraph"
|
|
32
|
-
direct_only: true
|
|
33
|
-
- dependency: "crewai"
|
|
34
|
-
direct_only: true
|
|
35
|
-
- dependency: "llama-index"
|
|
36
|
-
direct_only: true
|
|
37
|
-
- dependency: "openai-agents"
|
|
38
|
-
direct_only: true
|
|
39
|
-
- dependency: "autogen-agentchat"
|
|
40
|
-
direct_only: true
|
|
41
|
-
|
|
42
|
-
strategies:
|
|
43
|
-
# 1. AST: Find tool list assignments (Python — LangChain/LangGraph idiom).
|
|
44
|
-
- code: AST
|
|
45
|
-
language: python
|
|
46
|
-
expression: |
|
|
47
|
-
rule:
|
|
48
|
-
kind: assignment
|
|
49
|
-
pattern: $TOOLS = [$$$]
|
|
50
|
-
has:
|
|
51
|
-
stopBy: end
|
|
52
|
-
any:
|
|
53
|
-
- pattern: create_react_agent
|
|
54
|
-
- pattern: bind_tools
|
|
55
|
-
- pattern: AgentExecutor
|
|
56
|
-
evidence_fields: [file_path, line_span, symbol]
|
|
57
|
-
confidence_weight: 0.25
|
|
58
|
-
|
|
59
|
-
# 2. AST: TypeScript/JavaScript equivalent.
|
|
60
|
-
- code: AST
|
|
61
|
-
language: typescript
|
|
62
|
-
expression: |
|
|
63
|
-
rule:
|
|
64
|
-
any:
|
|
65
|
-
- pattern: const $TOOLS = [$$$]
|
|
66
|
-
- pattern: bindTools($$$)
|
|
67
|
-
- pattern: createReactAgent($$$)
|
|
68
|
-
evidence_fields: [file_path, line_span, symbol]
|
|
69
|
-
confidence_weight: 0.25
|
|
70
|
-
|
|
71
|
-
# 3. GRAPH: Two or more agent declarations share the same tool set.
|
|
72
|
-
# Predicate evaluated against extractor output (components/edges).
|
|
73
|
-
- code: GRAPH
|
|
74
|
-
expression: |
|
|
75
|
-
count(distinct agent_declaration) >= 2
|
|
76
|
-
AND any_pair(agents, lambda a, b: a.tool_set == b.tool_set)
|
|
77
|
-
evidence_fields: [graph_path, file_spans, node_ids]
|
|
78
|
-
confidence_weight: 0.35
|
|
79
|
-
|
|
80
|
-
# 4. META: Absence of per-agent capability scope OR explicit authz layer.
|
|
81
|
-
- code: META
|
|
82
|
-
expression: |
|
|
83
|
-
NOT exists_any_of(
|
|
84
|
-
per_agent_tool_filter,
|
|
85
|
-
capability_token_check,
|
|
86
|
-
authorization_layer_around_tool_dispatch,
|
|
87
|
-
langgraph_state_machine_with_per_node_tools
|
|
88
|
-
)
|
|
89
|
-
evidence_fields: [missing_controls]
|
|
90
|
-
confidence_weight: 0.30
|
|
91
|
-
|
|
92
|
-
# 5. INFER: Last-resort semantic check; never alone proves a finding.
|
|
93
|
-
- code: INFER
|
|
94
|
-
expression: "prompt_id:agents.privilege-separation.identify"
|
|
95
|
-
evidence_fields: [llm_rationale]
|
|
96
|
-
confidence_weight: 0.15
|
|
97
|
-
trusted: false
|
|
98
|
-
|
|
99
|
-
required_evidence_count: 3
|
|
100
|
-
|
|
101
|
-
# Presence of any of these controls downgrades or eliminates the finding.
|
|
102
|
-
control_negations:
|
|
103
|
-
- "presence_of(per_agent_tool_filter)"
|
|
104
|
-
- "presence_of(capability_token_check)"
|
|
105
|
-
- "presence_of(langgraph_state_machine_with_per_node_tools)"
|
|
106
|
-
|
|
107
|
-
threats:
|
|
108
|
-
- title: Compromised planner inherits executor capabilities
|
|
109
|
-
stride: [tampering, elevation_of_privilege]
|
|
110
|
-
description: >
|
|
111
|
-
A prompt-injection compromise of any agent escalates to the full set of
|
|
112
|
-
tools available to all agents in the system, including high-impact tools
|
|
113
|
-
like code execution, email, or file write.
|
|
114
|
-
remediation: >
|
|
115
|
-
Bind only the minimum tools required to each agent. In LangGraph, define
|
|
116
|
-
tools per node rather than globally. Add a capability token or
|
|
117
|
-
authorization layer that validates tool dispatch against agent identity.
|
|
118
|
-
- title: Lateral compromise via shared tool registry
|
|
119
|
-
stride: [elevation_of_privilege, information_disclosure]
|
|
120
|
-
description: >
|
|
121
|
-
Any tool callable from one agent is callable from every agent. There is
|
|
122
|
-
no blast-radius reduction even if one agent is otherwise constrained.
|
|
123
|
-
|
|
124
|
-
fixtures:
|
|
125
|
-
positive:
|
|
126
|
-
- "fixtures/positive/privilege-separation/langgraph_shared_tools_python"
|
|
127
|
-
- "fixtures/positive/privilege-separation/langchain_shared_tools_typescript"
|
|
128
|
-
negative:
|
|
129
|
-
- "fixtures/negative/privilege-separation/langgraph_per_node_tools"
|
|
130
|
-
- "fixtures/negative/privilege-separation/non_agentic_repo"
|
|
131
|
-
|
|
132
|
-
lifecycle: draft
|
|
133
|
-
owner: platform-threat-modeling
|
|
134
|
-
tags:
|
|
135
|
-
- agentic-ai
|
|
136
|
-
- least-privilege
|
|
137
|
-
- blast-radius
|
|
138
|
-
|
|
139
|
-
# Capsule fields — added in Phase 2A so the pack builder can ship this card
|
|
140
|
-
# as a runnable customer-safe capsule (deterministic strategies + inference prompt).
|
|
141
|
-
sensitivity_level: customer_safe
|
|
142
|
-
allowed_execution_modes:
|
|
143
|
-
- local_only
|
|
144
|
-
- local_model
|
|
145
|
-
- hybrid_cloud_eval
|
|
146
|
-
|
|
147
|
-
safe_summary: >
|
|
148
|
-
Multi-agent systems often share a single tool registry across agents. When that
|
|
149
|
-
happens, a prompt-injection compromise of any one agent inherits the full
|
|
150
|
-
capability surface of the system — including high-impact tools like code
|
|
151
|
-
execution, email, or filesystem write. Privilege separation means each agent
|
|
152
|
-
is bound only to the minimum tools required for its role.
|
|
153
|
-
|
|
154
|
-
detect_when: >
|
|
155
|
-
Two or more agent declarations are wired to the same tool list, or a single
|
|
156
|
-
shared tool array is referenced by every agent factory call, with no per-agent
|
|
157
|
-
capability scoping or authorization layer between agent and tool dispatch.
|
|
158
|
-
|
|
159
|
-
risk_hints:
|
|
160
|
-
- Any tool callable from one agent becomes callable from every agent
|
|
161
|
-
- Compromise of the weakest-prompted agent escalates to the most-privileged tool
|
|
162
|
-
- LangGraph's per-node tool binding is the idiomatic fix; AgentExecutor with a flat tool list is the anti-pattern
|
|
163
|
-
|
|
164
|
-
architectural_signals:
|
|
165
|
-
- Shared TOOLS array reused across multiple agent constructors
|
|
166
|
-
- No capability_token / authorization_layer between planner and tool dispatch
|
|
167
|
-
- LangGraph used without per-node tool binding
|
|
168
|
-
|
|
169
|
-
model_task_prompt_ref: prompts/agents/privilege-separation/identify.md
|
|
170
|
-
|
|
171
|
-
expected_output_schema:
|
|
172
|
-
type: object
|
|
173
|
-
required: [verdict, rationale, evidence_spans]
|
|
174
|
-
properties:
|
|
175
|
-
verdict:
|
|
176
|
-
type: string
|
|
177
|
-
enum: [present, absent, unclear]
|
|
178
|
-
description: present = privilege separation IS implemented; absent = the anti-pattern fires; unclear = needs human review
|
|
179
|
-
confidence:
|
|
180
|
-
type: number
|
|
181
|
-
minimum: 0
|
|
182
|
-
maximum: 1
|
|
183
|
-
rationale:
|
|
184
|
-
type: string
|
|
185
|
-
description: One paragraph, cites specific code constructs.
|
|
186
|
-
evidence_spans:
|
|
187
|
-
type: array
|
|
188
|
-
items:
|
|
189
|
-
type: object
|
|
190
|
-
required: [file]
|
|
191
|
-
properties:
|
|
192
|
-
file: { type: string }
|
|
193
|
-
start_line: { type: integer }
|
|
194
|
-
end_line: { type: integer }
|
|
195
|
-
note: { type: string }
|
|
196
|
-
|
|
197
|
-
minimum_context_required:
|
|
198
|
-
lines: 120
|
|
199
|
-
symbols:
|
|
200
|
-
- bind_tools
|
|
201
|
-
- bindTools
|
|
202
|
-
- create_react_agent
|
|
203
|
-
- createReactAgent
|
|
204
|
-
- AgentExecutor
|
|
205
|
-
|
|
206
|
-
related_patterns:
|
|
207
|
-
- agents.goal-decomposition-attack-surface
|
|
208
|
-
- agents.tool-call-without-authorization
|
|
209
|
-
|
|
210
|
-
repair_contract:
|
|
211
|
-
allowed:
|
|
212
|
-
- Bind a per-agent tool subset at construction time
|
|
213
|
-
- Introduce a capability-token or authorization layer between agent and tool dispatch
|
|
214
|
-
- Migrate to LangGraph state machines with per-node tools
|
|
215
|
-
forbidden:
|
|
216
|
-
- Removing tools entirely without functional replacement
|
|
217
|
-
- Centralizing tools further (the opposite direction)
|
|
218
|
-
- Disabling agent execution to "fix" the finding
|
|
219
|
-
|
|
220
|
-
validation_contract:
|
|
221
|
-
requires_tests_pass: false
|
|
222
|
-
requires_static_rules:
|
|
223
|
-
- no_shared_tool_registry_after_patch
|
|
224
|
-
|
|
225
|
-
unsafe_to_expose_fields:
|
|
226
|
-
- internal_rubric
|
|
227
|
-
- golden_transcripts
|
|
228
|
-
- exploit_templates
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schema_version": "1.0.0",
|
|
3
|
-
"pack_id": "zivis-public",
|
|
4
|
-
"pack_name": "ZIVIS Public Pattern Pack",
|
|
5
|
-
"version": "0.1.0",
|
|
6
|
-
"built_at": "2026-05-06T17:38:23.611Z",
|
|
7
|
-
"tier": "customer_safe",
|
|
8
|
-
"description": "ZIVIS-curated public pattern pack — capsules + inference prompts evaluated locally on the user's machine.",
|
|
9
|
-
"capsules": [
|
|
10
|
-
{
|
|
11
|
-
"id": "agents.privilege-separation",
|
|
12
|
-
"version": "0.1.0",
|
|
13
|
-
"path": "capsules/agents/privilege-separation.yaml",
|
|
14
|
-
"sha256": "31b5984b167ab97ef5c8902327bc80363d1ed3c43d08c82d979b0e34f2b88fde",
|
|
15
|
-
"category": "agents",
|
|
16
|
-
"lifecycle": "draft",
|
|
17
|
-
"applicable_languages": [
|
|
18
|
-
"typescript",
|
|
19
|
-
"javascript",
|
|
20
|
-
"python"
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
"prompts": [
|
|
25
|
-
{
|
|
26
|
-
"path": "prompts/agents/privilege-separation/identify.md",
|
|
27
|
-
"sha256": "eda7d288f9d1c6f7dfc18d2856300df76e8c4fdb5f18f3490f39ddf7117853e4",
|
|
28
|
-
"capsule_id": "agents.privilege-separation"
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
}
|
package/dist/pattern-packs/zivis-public-0.1.0/prompts/agents/privilege-separation/identify.md
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# Inference prompt: agents.privilege-separation — identify
|
|
2
|
-
|
|
3
|
-
You are assisting with secure agentic-AI architecture review. The user is
|
|
4
|
-
working on a codebase that has been flagged by deterministic detectors as
|
|
5
|
-
*possibly* lacking privilege separation between agents. Your job is to
|
|
6
|
-
look at the attached code context and produce a structured verdict.
|
|
7
|
-
|
|
8
|
-
## Pattern definition
|
|
9
|
-
|
|
10
|
-
**Privilege separation** means each agent in a multi-agent system is bound
|
|
11
|
-
only to the minimum tools required for its role. The anti-pattern is a
|
|
12
|
-
single shared tool registry that every agent inherits.
|
|
13
|
-
|
|
14
|
-
## What you are evaluating
|
|
15
|
-
|
|
16
|
-
1. Does the code construct two or more agents (or two or more entry points
|
|
17
|
-
that invoke the same agent factory) with a **shared** tool array?
|
|
18
|
-
2. Is there a per-agent capability filter, authorization layer, or
|
|
19
|
-
capability-token check between an agent and its tool dispatch? If so,
|
|
20
|
-
the pattern does *not* fire even when tools appear shared.
|
|
21
|
-
3. If LangGraph is used: are tools bound per node (good), or is one tool
|
|
22
|
-
list passed to a top-level `create_react_agent` covering every node
|
|
23
|
-
(anti-pattern)?
|
|
24
|
-
|
|
25
|
-
## What does NOT count as privilege separation
|
|
26
|
-
|
|
27
|
-
- Comments mentioning least privilege without code enforcing it.
|
|
28
|
-
- A shared tool list with one agent renamed at runtime.
|
|
29
|
-
- Defensive prompt instructions ("don't use the database tool unless…")
|
|
30
|
-
— prompts are not authorization.
|
|
31
|
-
|
|
32
|
-
## Output
|
|
33
|
-
|
|
34
|
-
Return JSON only, matching the capsule's `expected_output_schema`:
|
|
35
|
-
|
|
36
|
-
```json
|
|
37
|
-
{
|
|
38
|
-
"verdict": "absent | present | unclear",
|
|
39
|
-
"confidence": 0.0,
|
|
40
|
-
"rationale": "one paragraph",
|
|
41
|
-
"evidence_spans": [
|
|
42
|
-
{ "file": "src/agent.ts", "start_line": 10, "end_line": 40, "note": "..." }
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
- `verdict: absent` — the anti-pattern fires (shared registry, no scoping).
|
|
48
|
-
- `verdict: present` — privilege separation is correctly implemented.
|
|
49
|
-
- `verdict: unclear` — the available context is ambiguous; do not guess.
|
|
50
|
-
|
|
51
|
-
Cite line numbers from the snippet only. Do not invent files. Do not
|
|
52
|
-
fabricate evidence. If a concept (e.g. "authorization layer") is mentioned
|
|
53
|
-
but you cannot identify the line that implements it, mark `unclear` and
|
|
54
|
-
explain.
|