Engineering Assistance Guide
Deep operational assistance for engineers and NetSec administrators: runtime, trust boundaries, AI authority, containment state, AutoRepair, API validation, crypto/key handling, evidence, performance, hardening, and failure triage.
Contents
- 1. Architecture and Trust Boundaries
- 2. Runtime and Boot Chain
- 3. Retail Packaging Boundary
- 4. Secure Level Engineering
- 5. AI Defense Decision Pipeline
- 6. AI Authority and Safety Boundary
- 7. Confidence Engineering
- 8. Sandbox State Model
- 9. AutoRepair Control Engineering
- 10. PIC Prioritization Model
- 11. Network Telemetry
- 12. API and Input Validation
- 13. Native Crypto and Key Handling
- 14. Evidence and Audit
- 15. Resource Engineering
- 16. Production Hardening Checklist
- 17. Failure Triage Matrix
1. Architecture and Trust Boundaries
Operator Browser
|
Local Application API
|
Allow-listed Defensive Endpoints
|
PowerShell Defensive Modules
|
Local Evidence / State / Protected Crypto OperationsTreat the presentation tier, local API, PowerShell execution boundary, storage, and administrator authorization as separate trust zones. A UI button is not an authorization control by itself.
2. Runtime and Boot Chain
START_HERE.bat -> verify retail components -> locate PowerShell -> prepare local storage -> stop prior ThreatGenome-owned core -> redhawk_v5_oneclick_server.ps1 -> local service on 127.0.0.1:8097 -> browser CommandCenter
When boot fails, preserve the first launcher error. Confirm package structure with VERIFY_PACKAGE.bat, then isolate launcher, service, endpoint, module, privilege, and storage failures in that order.
3. Retail Packaging Boundary
The retail package ships no standalone .json documents. This reduces casual build-metadata disclosure. Internal structured serialization may still be used by the local browser/API contract. File-format removal is not cryptographic confidentiality. Do not represent it as encryption.
4. Secure Level Engineering
Secure Level must aggregate verified control evidence. Mandatory-control failure should remain visible even when a weighted score is high. Unverified state must not silently become PASS. Engineers should inspect evidence age, scoring weights, critical gates, and deterministic verification before using the score in an external assurance statement.
5. AI Defense Decision Pipeline
OBSERVE -> CORRELATE -> SCORE -> PLAN -> AUTHORIZE -> VERIFY
Observation retains source/time. Correlation declares contributing signals. Scoring must be reproducible from versioned features. Planning must map to bounded defensive actions. Authorization is enforced outside presentation state. Verification measures outcome and records evidence.
6. AI Authority and Safety Boundary
Automatic authority should remain limited to policy-approved containment and other explicitly bounded defensive actions. High-impact firewall, identity, routing, encryption, and broad endpoint changes require separate authorization. Never execute unrestricted generated shell from AI output. Map approved actions to fixed command handlers and typed parameters.
7. Confidence Engineering
Do not describe a displayed confidence percentage as calibrated probability unless the model has been validated that way. Version the scoring model, retain feature provenance, measure false-positive pressure, document threshold changes, and replay sanitized incident fixtures after scoring changes.
8. Sandbox State Model
OBSERVED -> CONTAINED -> REVIEWED -> RELEASED
\-> RETAINED
\-> REMOVEDContain, release, retain, and remove are separate audited transitions. Record item ID, source module, observation time, containment time, reason, authority, operator/policy identity, and disposition. Browser text must never become a raw containment command.
9. AutoRepair Control Engineering
DETECT GAP -> BUILD PLAN -> VALIDATE PREREQUISITES -> STAGE -> AUTHORIZE -> APPLY -> VERIFY -> ROLLBACK IF REQUIRED
Every repair module should declare scope, privilege requirement, idempotency, verification method, rollback method, and evidence output. A zero process exit code is not proof that a security control was successfully remediated.
10. PIC Prioritization Model
Prioritize using asset relevance, product/version confidence, active exploitation, KEV status, emergency vendor guidance, exploit maturity, exposure, privilege impact, and compensating controls. CVE publication age is context, not a reason to suppress a newly exploited vulnerability.
11. Network Telemetry
Separate listening state, established connections, remote infrastructure enrichment, and firewall policy state. Cache slow enrichment. Deduplicate observations. Prefer summarized deltas over full dataset repaint. Collection frequency should follow volatility and operator need.
12. API and Input Validation
Enforce HTTP method, expected content type, field allow-lists, size limits, enum validation, path canonicalization, and explicit error behavior. Never concatenate browser fields into PowerShell command strings. Prefer fixed operation maps and typed parameters. Detailed diagnostics belong in protected local logs; operator responses should be minimal and safe.
13. Native Crypto and Key Handling
Inventory key creation, storage, rotation, recovery, and destruction. Never embed private keys or secrets in JavaScript, HTML, batch files, distributable manuals, or retail metadata. Encryption at rest does not protect plaintext after a privileged process decrypts it. Use OS-backed protection where available and test recovery before production.
14. Evidence and Audit
Use UTC for durable timestamps and display local time separately. Preserve event IDs across observe, contain, approve, repair, and verify transitions. Prefer append-style audit events. Hash exported evidence packages. Test clock drift, duplicate IDs, reordered asynchronous writes, and partial-write recovery.
15. Resource Engineering
Profile CPU, working set, handle count, PHP latency, PowerShell startup cost, storage writes, and browser scripting independently. Move expensive collection out of the UI path. Cache immutable intelligence, batch writes, bound queues, and apply backpressure when enrichment is slower than collection.
16. Production Hardening Checklist
| Control | Engineer verification |
|---|---|
| Binding | Service exposure is intentional and restricted. |
| Privilege | Elevation occurs only for declared operations. |
| Input | Allow-lists and typed parameters enforced. |
| AI | Authority cannot be bypassed through UI state. |
| Sandbox | State transitions are distinct and audited. |
| Repair | Verification and rollback tested. |
| Crypto | Keys absent from retail/browser files. |
| Logs | Sensitive diagnostics protected and retention defined. |
| Updates | Package authenticity and provenance verified. |
| Performance | Collection and presentation independently profiled. |
17. Failure Triage Matrix
| Symptom | First engineering check |
|---|---|
| BAT closes | Run from Command Prompt and preserve exit/error text. |
| Browser absent | Listener/core startup and OPEN_CURRENT_URL.cmd. |
| Blank workspace | Browser console, endpoint response, then module result. |
| Secure Level frozen | Measurement endpoint, evidence freshness, critical gate state. |
| AI queue stale | Collector delta, correlation inputs, scheduler state. |
| Repair says success | Independent post-change verification evidence. |
PreBoot Hygiene Policy
tools\ThreatGenome.PreBootHygiene.ps1 performs a fail-soft cleanup before core startup. Deletion is restricted to ThreatGenome-owned runtime/storage paths and known transient file classes with age thresholds. Protected evidence and control-state paths are explicitly excluded. The cleaner does not recursively purge unknown data and does not delete recent lock files. Maintenance results are written to storage\maintenance\preboot_hygiene_latest.txt.
Default age thresholds: temporary/cache items 12 hours, scratch items 24 hours, stale lock files 24 hours. Adjust only after profiling local workload and evidence-retention requirements.
Core Resource Governor Engineering Model
X1.0.3 integrates resource governance directly into the central low-resource runtime. The governor owns exactly two central presentation timers: fast and slow. Profile changes clear both timers and recreate them once with the selected cadence. A reentrancy guard prevents overlapping fast or slow ticks.
| Profile | Fast | Slow | Job poll |
|---|---|---|---|
| Laptop | 90 sec | 300 sec | 4.0 sec |
| Desktop | 60 sec | 180 sec | 2.5 sec |
| Workstation | 30 sec | 120 sec | 1.5 sec |
| Server | 15 sec | 60 sec | 1.0 sec |
There is no profile watchdog interval and no external scheduler trying to call private runtime functions.
ThreatGenome Operating Principle
See the event. Open the exact workspace. Review the evidence. Understand the authority. Verify the outcome.
