security(discovery): enforce Zone isolation and retire unsafe legacy writers

Bind Agent observations, review, enrichment and telemetry to current Zone
and inventory authority. Preserve immutable MAC ownership and historical
snapshots with stale-result rejection and transactional security audits.

Retire unbound direct/range/scheduled discovery and one/bulk legacy summary
writes in both modes. Require reconciled exact inventory identity or
explicit Zone-scoped IP selection for CSV metadata imports.

Independent Blocker #1 application-security re-audit: PASS on tree
cf863aadc9. Evidence: 141 focused PostgreSQL/HTTP
tests passed; Chromium and PowerShell checks passed. Two documented baseline
source assertions remain unchanged. Production deployment is not approved.
This commit is contained in:
lussierj committed 2026-10-17 00:45:04 +00:00
1 parent e898f283ab
commit 8b0d32cd6b
26 files changed
+3798 -4092

No files matched your search

+13 -10
View File
@@ -224,7 +224,9 @@ foreach ($miner in $miners) {
}
$items.Add([pscustomobject]@{
ip = $ip
miner_id = [string]$miner.miner_id
miner_version = [string]$miner.miner_version
ip = $ip
mac = $mac
api3_supported = $false
api3_error = $err
@@ -257,6 +259,8 @@ foreach ($miner in $miners) {
-Request @{ cmd = "get.device.custom_data" }
$items.Add([pscustomobject]@{
miner_id = [string]$miner.miner_id
miner_version = [string]$miner.miner_version
ip = $ip
mac = $mac
api3_supported = $true
@@ -275,15 +279,14 @@ $payload = @{
items = @($items.ToArray())
}
$json = $payload | ConvertTo-Json -Depth 80
Write-Host "Posting API3 enrichment results to hub..."
$result = Invoke-RestMethod `
-Uri "$HubUrl/api/agent/api3-enrichment" `
-Method Post `
-Headers $Headers `
-ContentType "application/json" `
-Body $json
$allItems = @($items.ToArray())
$result = @()
for ($offset = 0; $offset -lt $allItems.Count; $offset += 128) {
$last = [Math]::Min($offset + 127, $allItems.Count - 1)
$payload.items = @($allItems[$offset..$last])
$result += Invoke-RestMethod -Uri "$HubUrl/api/agent/api3-enrichment" -Method Post `
-Headers $Headers -ContentType "application/json" -Body ($payload | ConvertTo-Json -Depth 80)
}
Write-Host ""
Write-Host "Local checked: $checked"