-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsetup-client-windows.ps1
More file actions
622 lines (546 loc) · 22.2 KB
/
setup-client-windows.ps1
File metadata and controls
622 lines (546 loc) · 22.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
#Requires -Version 5.1
<#
.SYNOPSIS
Valhuntir LLM Client Setup for Windows
.DESCRIPTION
Joins the SIFT gateway and creates a functional $HOME\vhir\ workspace
with MCP config, forensic controls, and discipline docs.
.PARAMETER Sift
Gateway URL (required). Example: https://192.168.1.100:4508
.PARAMETER Code
Join code (required). Generated on SIFT with: vhir setup join-code
.PARAMETER Uninstall
Remove Valhuntir workspace and forensic controls.
.PARAMETER Help
Show help and exit.
.EXAMPLE
.\setup-client-windows.ps1 -Sift https://192.168.1.100:4508 -Code XXXX-XXXX
.EXAMPLE
.\setup-client-windows.ps1 -Uninstall
#>
param(
[string]$Sift,
[string]$Code,
[switch]$Uninstall,
[switch]$Help
)
# =============================================================================
# Helpers
# =============================================================================
function Write-Info { param([string]$Msg) Write-Host "[INFO] $Msg" -ForegroundColor Blue }
function Write-Ok { param([string]$Msg) Write-Host "[OK] $Msg" -ForegroundColor Green }
function Write-Warn { param([string]$Msg) Write-Host "[WARN] $Msg" -ForegroundColor Yellow }
function Write-Err { param([string]$Msg) Write-Host "[ERROR] $Msg" -ForegroundColor Red }
function Prompt-YN {
param([string]$Msg, [bool]$Default = $true)
if ($Default) { $suffix = "[Y/n]" } else { $suffix = "[y/N]" }
$answer = Read-Host "$Msg $suffix"
if ([string]::IsNullOrWhiteSpace($answer)) { return $Default }
return ($answer.Trim().ToLower() -eq "y")
}
function Prompt-YN-Strict {
param([string]$Msg)
while ($true) {
$answer = Read-Host "$Msg [y/n]"
if ($answer.Trim().ToLower() -eq "y") { return $true }
if ($answer.Trim().ToLower() -eq "n") { return $false }
Write-Host " Please enter y or n."
}
}
# =============================================================================
# Banner + Help
# =============================================================================
Write-Host ""
Write-Host "============================================================" -ForegroundColor White
Write-Host " Valhuntir - LLM Client Setup (Windows)" -ForegroundColor White
Write-Host " AI-Assisted Forensic Investigation" -ForegroundColor White
Write-Host "============================================================" -ForegroundColor White
Write-Host ""
if ($Help) {
Write-Host "Usage: .\setup-client-windows.ps1 -Sift URL -Code CODE"
Write-Host ""
Write-Host "Parameters:"
Write-Host " -Sift URL Gateway URL (required)"
Write-Host " -Code CODE Join code (required)"
Write-Host " -Uninstall Remove Valhuntir workspace"
Write-Host " -Help Show this help"
exit 0
}
# =============================================================================
# Uninstall
# =============================================================================
if ($Uninstall) {
$deployDir = Join-Path $HOME "vhir"
Write-Host ""
Write-Host "Valhuntir Forensic Controls - Uninstall" -ForegroundColor White
Write-Host ""
if (-not (Test-Path $deployDir)) {
Write-Info "No Valhuntir workspace found at $deployDir."
exit 0
}
Write-Host " Valhuntir workspace: $deployDir"
$casesDir = Join-Path $deployDir "cases"
if (Test-Path $casesDir) {
Write-Host ""
Write-Host " WARNING: $casesDir contains case data." -ForegroundColor Yellow
Write-Host " Back up case data before removing the workspace."
}
Write-Host ""
if (Prompt-YN-Strict " Remove entire Valhuntir workspace ($deployDir)?") {
Remove-Item -Path $deployDir -Recurse -Force
$configYaml = Join-Path $HOME ".vhir" "config.yaml"
if (Test-Path $configYaml) { Remove-Item -Path $configYaml -Force }
Write-Ok "Removed $deployDir"
} else {
Write-Host ""
Write-Host " Removing config files only (preserving cases/)..."
$claudeDir = Join-Path $deployDir ".claude"
$mcpJson = Join-Path $deployDir ".mcp.json"
if (Test-Path $claudeDir) { Remove-Item -Path $claudeDir -Recurse -Force }
if (Test-Path $mcpJson) { Remove-Item -Path $mcpJson -Force }
foreach ($f in @("CLAUDE.md", "AGENTS.md", "FORENSIC_DISCIPLINE.md", "TOOL_REFERENCE.md")) {
$fp = Join-Path $deployDir $f
if (Test-Path $fp) { Remove-Item -Path $fp -Force }
}
$configYaml = Join-Path $HOME ".vhir" "config.yaml"
if (Test-Path $configYaml) { Remove-Item -Path $configYaml -Force }
Write-Ok "Config files removed. $casesDir preserved."
}
Write-Host ""
Write-Host "Uninstall complete."
exit 0
}
# =============================================================================
# Validate
# =============================================================================
if (-not $Sift) {
Write-Err "Gateway URL is required: -Sift https://IP:4508"
exit 1
}
if (-not $Code) {
Write-Err "Join code is required: -Code XXXX-XXXX"
exit 1
}
$Sift = $Sift.TrimEnd('/')
# =============================================================================
# Join Gateway
# =============================================================================
# Validate join code format
if ($Code -notmatch '^[A-Za-z0-9_-]+$') {
Write-Err "Invalid join code format (alphanumeric, dash, underscore only)"
exit 1
}
Write-Info "Joining gateway at $Sift..."
$hostname = [System.Net.Dns]::GetHostName()
$body = @{
code = $Code
machine_type = "examiner"
hostname = $hostname
} | ConvertTo-Json
try {
# Allow self-signed certs
if ($PSVersionTable.PSVersion.Major -ge 6) {
$response = Invoke-WebRequest -Uri "$Sift/api/v1/setup/join" `
-Method Post -ContentType "application/json" -Body $body `
-SkipCertificateCheck -UseBasicParsing
} else {
# PowerShell 5.1 — bypass cert validation
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }
$response = Invoke-WebRequest -Uri "$Sift/api/v1/setup/join" `
-Method Post -ContentType "application/json" -Body $body `
-UseBasicParsing
}
} catch {
Write-Err "Failed to connect to gateway at $Sift"
Write-Host " $($_.Exception.Message)" -ForegroundColor Red
exit 1
} finally {
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = $null
}
$json = $response.Content | ConvertFrom-Json
if ($json.error) {
Write-Err "Join failed: $($json.error)"
exit 1
}
if (-not $json.gateway_token) {
Write-Err "Unexpected response from gateway"
exit 1
}
$gatewayToken = $json.gateway_token
$gatewayUrl = if ($json.gateway_url) { $json.gateway_url } else { $Sift }
$backends = $json.backends
Write-Ok "Joined gateway"
# Store token
$vhirDir = Join-Path $HOME ".vhir"
if (-not (Test-Path $vhirDir)) {
New-Item -ItemType Directory -Path $vhirDir -Force | Out-Null
}
$configFile = Join-Path $vhirDir "config.yaml"
@"
gateway_url: "$gatewayUrl"
gateway_token: "$gatewayToken"
"@ | Set-Content -Path $configFile -Encoding UTF8
# Restrict config.yaml to current user only
try {
$acl = Get-Acl $configFile
$acl.SetAccessRuleProtection($true, $false)
$acl.Access | ForEach-Object { $acl.RemoveAccessRule($_) } | Out-Null
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule(
[System.Security.Principal.WindowsIdentity]::GetCurrent().Name,
"FullControl", "Allow")
$acl.AddAccessRule($rule)
Set-Acl -Path $configFile -AclObject $acl
} catch {
Write-Warn "Could not restrict permissions on $configFile`: $($_.Exception.Message)"
}
Write-Ok "Credentials saved to $configFile"
# =============================================================================
# Workspace Setup
# =============================================================================
Write-Host ""
Write-Host "=== Valhuntir Workspace ===" -ForegroundColor White
Write-Host ""
$deployDir = Join-Path $HOME "vhir"
$casesDir = Join-Path $deployDir "cases"
$claudeDir = Join-Path $deployDir ".claude"
$hooksDir = Join-Path $claudeDir "hooks"
New-Item -ItemType Directory -Path $casesDir -Force | Out-Null
# ---- MCP Config ----
$mcpServers = @{}
foreach ($backend in $backends) {
$mcpServers[$backend] = @{
type = "streamable-http"
url = "$gatewayUrl/mcp/$backend"
headers = @{
Authorization = "Bearer $gatewayToken"
}
}
}
# External MCPs
$mcpServers["zeltser-ir-writing"] = @{
type = "streamable-http"
url = "https://website-mcp.zeltser.com/mcp"
}
$mcpServers["microsoft-learn"] = @{
type = "streamable-http"
url = "https://learn.microsoft.com/api/mcp"
}
$mcpConfig = @{ mcpServers = $mcpServers }
# Build stdio-format config for Claude Desktop (mcp-remote bridge)
$mcpServersStdio = @{}
foreach ($backend in $backends) {
$mcpServersStdio[$backend] = @{
command = "npx"
args = @("-y", "mcp-remote", "$gatewayUrl/mcp/$backend",
"--header", "Authorization:`${AUTH_HEADER}")
env = @{ AUTH_HEADER = "Bearer $gatewayToken" }
}
}
$mcpServersStdio["zeltser-ir-writing"] = @{
command = "npx"
args = @("-y", "mcp-remote", "https://website-mcp.zeltser.com/mcp")
}
$mcpServersStdio["microsoft-learn"] = @{
command = "npx"
args = @("-y", "mcp-remote", "https://learn.microsoft.com/api/mcp")
}
$mcpConfigStdio = @{ mcpServers = $mcpServersStdio }
# ---- Client Choice ----
Write-Host ""
Write-Host " Which LLM client?"
Write-Host " 1. Claude Code"
Write-Host " 2. Claude Desktop"
Write-Host " 3. LibreChat"
Write-Host " 4. Other"
Write-Host ""
$clientChoice = Read-Host " Choose [1]"
if (-not $clientChoice) { $clientChoice = "1" }
$clientType = switch ($clientChoice) {
"1" { "claude-code" }
"2" { "claude-desktop" }
"3" { "librechat" }
default { "other" }
}
# ---- Write client-specific config ----
switch ($clientType) {
"claude-code" {
$mcpJsonPath = Join-Path $deployDir ".mcp.json"
$mcpConfig | ConvertTo-Json -Depth 5 | Set-Content -Path $mcpJsonPath -Encoding UTF8
$acl = Get-Acl $mcpJsonPath
$acl.SetAccessRuleProtection($true, $false)
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule(
[System.Security.Principal.WindowsIdentity]::GetCurrent().Name,
"FullControl", "Allow")
$acl.SetAccessRule($rule)
Set-Acl -Path $mcpJsonPath -AclObject $acl
Write-Ok "Written: $mcpJsonPath"
}
"claude-desktop" {
if (-not (Get-Command npx -ErrorAction SilentlyContinue)) {
Write-Warn "Claude Desktop requires npx (Node.js) for mcp-remote bridge."
Write-Warn "Install Node.js: https://nodejs.org/"
Write-Warn "Skipping Claude Desktop config generation."
} else {
$claudeDir2 = Join-Path $env:APPDATA "Claude"
if (-not (Test-Path $claudeDir2)) {
New-Item -ItemType Directory -Path $claudeDir2 -Force | Out-Null
}
$configPath = Join-Path $claudeDir2 "claude_desktop_config.json"
$mcpConfigStdio | ConvertTo-Json -Depth 5 | Set-Content -Path $configPath -Encoding UTF8
Write-Ok "Written: $configPath (stdio via mcp-remote)"
}
}
"librechat" {
$configPath = Join-Path $deployDir "librechat_mcp.yaml"
$mcpConfig | ConvertTo-Json -Depth 5 | Set-Content -Path $configPath -Encoding UTF8
Write-Ok "Written: $configPath (merge into librechat.yaml)"
}
default {
$configPath = Join-Path $deployDir "vhir-mcp-config.json"
$mcpConfig | ConvertTo-Json -Depth 5 | Set-Content -Path $configPath -Encoding UTF8
Write-Ok "Written: $configPath (reference config)"
Write-Info "Configure your LLM client using the entries in this file."
}
}
# ---- Claude Code assets (skip for other clients) ----
if ($clientType -eq "claude-code") {
New-Item -ItemType Directory -Path $hooksDir -Force | Out-Null
# ---- Settings.json ----
$settingsPath = Join-Path $claudeDir "settings.json"
$hookPath = Join-Path $hooksDir "forensic-audit.sh"
$settingsObj = @{
hooks = @{
UserPromptSubmit = @(
@{
matcher = ""
hooks = @(
@{
type = "command"
command = "cat << 'EOF'`n<forensic-rules>`nPLAN before 3+ steps | EVIDENCE for claims | APPROVAL before conclusions`nRECORD actions via forensic-mcp | NO DELETE without approval`n</forensic-rules>`nEOF"
}
)
}
)
PostToolUse = @(
@{
matcher = "Bash"
hooks = @(
@{
type = "command"
command = $hookPath.Replace('\', '/')
}
)
}
)
}
permissions = @{
allow = @(
"mcp__forensic-mcp__*",
"mcp__case-mcp__*",
"mcp__sift-mcp__*",
"mcp__report-mcp__*",
"mcp__forensic-rag-mcp__*",
"mcp__windows-triage-mcp__*",
"mcp__opencti-mcp__*",
"mcp__wintools-mcp__*",
"mcp__remnux-mcp__*",
"mcp__vhir__*",
"mcp__zeltser-ir-writing__*",
"mcp__microsoft-learn__*"
)
deny = @(
"Edit(**/findings.json)",
"Edit(**/timeline.json)",
"Edit(**/approvals.jsonl)",
"Edit(**/todos.json)",
"Edit(**/CASE.yaml)",
"Edit(**/actions.jsonl)",
"Edit(**/audit/*.jsonl)",
"Write(**/findings.json)",
"Write(**/timeline.json)",
"Write(**/approvals.jsonl)",
"Write(**/todos.json)",
"Write(**/CASE.yaml)",
"Write(**/actions.jsonl)",
"Write(**/audit/*.jsonl)",
"Edit(**/evidence.json)",
"Write(**/evidence.json)",
"Read(/var/lib/vhir/**)",
"Edit(/var/lib/vhir/**)",
"Write(/var/lib/vhir/**)",
"Bash(vhir approve*)",
"Bash(*vhir approve*)",
"Bash(vhir reject*)",
"Bash(*vhir reject*)",
"Edit(**/.claude/settings.json)",
"Write(**/.claude/settings.json)",
"Edit(**/.claude/CLAUDE.md)",
"Write(**/.claude/CLAUDE.md)",
"Edit(**/.claude/rules/**)",
"Write(**/.claude/rules/**)",
"Edit(**/.vhir/hooks/**)",
"Write(**/.vhir/hooks/**)",
"Edit(**/.vhir/active_case)",
"Write(**/.vhir/active_case)",
"Edit(**/.vhir/gateway.yaml)",
"Write(**/.vhir/gateway.yaml)",
"Edit(**/.vhir/config.yaml)",
"Write(**/.vhir/config.yaml)",
"Edit(**/.vhir/.password_lockout)",
"Write(**/.vhir/.password_lockout)",
"Edit(**/pending-reviews.json)",
"Write(**/pending-reviews.json)"
)
}
sandbox = @{
enabled = $true
allowUnsandboxedCommands = $false
filesystem = @{
denyWrite = @(
"~/.vhir/gateway.yaml",
"~/.vhir/config.yaml",
"~/.vhir/active_case",
"~/.vhir/hooks",
"~/.vhir/.password_lockout",
"~/.vhir/.pin_lockout",
"~/.claude/settings.json",
"~/.claude/CLAUDE.md",
"~/.claude/rules"
)
}
}
}
if (Test-Path $settingsPath) {
Write-Info "Existing settings.json found. Merging..."
try {
$existing = Get-Content -Path $settingsPath -Raw | ConvertFrom-Json
# Merge hooks
if (-not $existing.hooks) {
$existing | Add-Member -NotePropertyName hooks -NotePropertyValue $settingsObj.hooks
} else {
foreach ($hookType in @("UserPromptSubmit", "PreToolUse", "PostToolUse")) {
if (-not $existing.hooks.$hookType) {
$existing.hooks | Add-Member -NotePropertyName $hookType -NotePropertyValue $settingsObj.hooks.$hookType
}
}
}
# Merge permissions
if (-not $existing.permissions) {
$existing | Add-Member -NotePropertyName permissions -NotePropertyValue $settingsObj.permissions
} else {
# Merge allow
if (-not $existing.permissions.allow) {
$existing.permissions | Add-Member -NotePropertyName allow -NotePropertyValue $settingsObj.permissions.allow
} else {
$existingAllow = [System.Collections.Generic.HashSet[string]]::new([string[]]$existing.permissions.allow)
foreach ($rule in $settingsObj.permissions.allow) {
[void]$existingAllow.Add($rule)
}
$existing.permissions.allow = ($existingAllow | Sort-Object)
}
# Merge deny
if (-not $existing.permissions.deny) {
$existing.permissions | Add-Member -NotePropertyName deny -NotePropertyValue $settingsObj.permissions.deny
} else {
$existingDeny = [System.Collections.Generic.HashSet[string]]::new([string[]]$existing.permissions.deny)
# Remove old forensic rules on re-deploy
foreach ($old in @("Bash(rm -rf *)", "Bash(mkfs*)", "Bash(dd *)")) {
[void]$existingDeny.Remove($old)
}
foreach ($rule in $settingsObj.permissions.deny) {
[void]$existingDeny.Add($rule)
}
$existing.permissions.deny = ($existingDeny | Sort-Object)
}
}
# Merge sandbox
if (-not $existing.sandbox) {
$existing | Add-Member -NotePropertyName sandbox -NotePropertyValue $settingsObj.sandbox
}
$existing | ConvertTo-Json -Depth 10 | Set-Content -Path $settingsPath -Encoding UTF8
Write-Ok "settings.json (merged)"
} catch {
Write-Warn "Could not merge existing settings. Overwriting."
$settingsObj | ConvertTo-Json -Depth 10 | Set-Content -Path $settingsPath -Encoding UTF8
Write-Ok "settings.json (overwritten)"
}
} else {
$settingsObj | ConvertTo-Json -Depth 10 | Set-Content -Path $settingsPath -Encoding UTF8
Write-Ok "settings.json (hooks + permissions + sandbox)"
}
# ---- Fetch assets from GitHub ----
$githubRaw = "https://raw.githubusercontent.com/AppliedIR"
$errors = 0
$assets = @(
@{ Name = "CLAUDE.md"; Url = "$githubRaw/sift-mcp/main/claude-code/CLAUDE.md"; Dest = (Join-Path $deployDir "CLAUDE.md") },
@{ Name = "AGENTS.md"; Url = "$githubRaw/sift-mcp/main/AGENTS.md"; Dest = (Join-Path $deployDir "AGENTS.md") },
@{ Name = "FORENSIC_DISCIPLINE.md"; Url = "$githubRaw/sift-mcp/main/claude-code/FORENSIC_DISCIPLINE.md"; Dest = (Join-Path $deployDir "FORENSIC_DISCIPLINE.md") },
@{ Name = "TOOL_REFERENCE.md"; Url = "$githubRaw/sift-mcp/main/claude-code/TOOL_REFERENCE.md"; Dest = (Join-Path $deployDir "TOOL_REFERENCE.md") },
@{ Name = "forensic-audit.sh"; Url = "$githubRaw/sift-mcp/main/claude-code/hooks/forensic-audit.sh"; Dest = $hookPath }
)
foreach ($asset in $assets) {
Write-Info "Fetching $($asset.Name)..."
try {
Invoke-WebRequest -Uri $asset.Url -OutFile $asset.Dest -UseBasicParsing
Write-Ok $asset.Name
} catch {
Write-Warn "Could not fetch $($asset.Name)"
$errors++
}
}
# Note: forensic-audit.sh is a POSIX shell script. Claude Code hooks on Windows
# run via the shell. This script may require WSL or Git Bash to execute.
if ($errors -gt 0) {
Write-Warn "$errors asset(s) could not be fetched. Re-run or download manually."
}
} # end clientType -eq "claude-code"
# =============================================================================
# Summary
# =============================================================================
Write-Host ""
Write-Host "=== Setup Complete ===" -ForegroundColor White
Write-Host ""
Write-Host "Gateway: $gatewayUrl"
Write-Host "Workspace: $deployDir"
Write-Host ""
Write-Host "SSH Access" -ForegroundColor White
Write-Host " SSH access to SIFT is required for finding approval and rejection"
Write-Host " (vhir approve, vhir reject), evidence unlocking (vhir evidence"
Write-Host " unlock), and command execution (vhir execute). These operations"
Write-Host " require password or terminal confirmation and are not available through"
Write-Host " MCP. All other operations are available through MCP tools."
Write-Host ""
Write-Host " Windows SSH clients: OpenSSH (built-in), PuTTY, or Windows Terminal."
Write-Host " If using ssh-agent or pageant, configure per-use confirmation to"
Write-Host " prevent automated key access."
if ($clientType -eq "claude-code") {
Write-Host ""
Write-Host "SSH Security Advisory" -ForegroundColor Yellow
Write-Host " Claude Code has terminal access and can use your SSH credentials"
Write-Host " to run commands directly on SIFT, bypassing MCP audit controls."
Write-Host " To mitigate this, ensure your SSH authentication to SIFT requires"
Write-Host " human interaction per use:"
Write-Host " - Password-only auth (no agent-forwarded keys)"
Write-Host " - ssh-agent confirmation per use"
Write-Host " - Hardware security keys (FIDO2/U2F)"
Write-Host ""
Write-Host " Alternatively, use an MCP-only client (Claude Desktop, LibreChat,"
Write-Host " or any client without terminal access) which can only interact"
Write-Host " with SIFT through audited MCP tools."
Write-Host ""
Write-Host "Valhuntir workspace created at $deployDir\" -ForegroundColor White
Write-Host ""
Write-Host "IMPORTANT: Always launch Claude Code from $deployDir\ or a subdirectory." -ForegroundColor Yellow
Write-Host "Forensic controls (audit logging, guardrails, MCP tools) only apply"
Write-Host "when Claude Code is started from within this directory."
Write-Host ""
Write-Host " cd $deployDir; claude"
Write-Host ""
Write-Host "To organize case work while maintaining controls:"
Write-Host ""
Write-Host " mkdir $deployDir\cases\INC-2026-001"
Write-Host " cd $deployDir\cases\INC-2026-001; claude"
}
Write-Host ""
Write-Host "Documentation: https://appliedir.github.io/Valhuntir/" -ForegroundColor White
Write-Host ""