You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
intelligence packet → approval → configured model → advice
15
17
```
16
18
17
-
Discovery goes through DockGuard to a target and records what it saw. Detection and correlation go the other way: they read stored state and write findings or relationship snapshots without ever reaching a target. Validation begins with a request that records intent only; a separately noted approval rechecks DockGuard and may send one fixed HTTP-origin probe. The network boundary is therefore limited to discovery and the narrowly bounded recheck.
19
+
Discovery goes through DockGuard to a target and records what it saw. Detection and correlation go the other way: they read stored state and write findings or relationship snapshots without ever reaching a target. Validation begins with a request that records intent only; a separately noted approval rechecks DockGuard and may send one fixed HTTP-origin probe. Optional intelligence creates an exact stored-data packet first, then a separate approval may send only that packet to the configured model provider. The provider receives no target or tool capability.
18
20
19
21
The production image builds the React/Vite application and serves it as static content from the same FastAPI process that exposes `/api`. A named Docker volume holds SQLite at `/var/lib/reddock` and retained evidence at `/var/lib/reddock/evidence`. There is deliberately no reverse proxy, separate frontend service, queue, or remote dependency.
20
22
@@ -30,6 +32,7 @@ The production image builds the React/Vite application and serves it as static c
30
32
-`backend/app/findings.py`: finding persistence, deduplication, and lifecycle rules.
31
33
-`backend/app/validation/`: approval-gated validation orchestration and the fixed HTTP-origin profile.
32
34
-`backend/app/correlation/`: stored-state correlation, fixed CWE mappings, and RedPath assembly.
35
+
-`backend/app/intelligence/`: reviewed evidence packets, provider boundary, structured advice, and run orchestration.
33
36
-`backend/app/evidence.py`: the evidence store.
34
37
-`backend/app/models.py` and `schemas.py`: persistence mappings and input/output contracts.
35
38
-`frontend/src`: presentation and API client only.
-**AssetRelationship** — an exact-address link from a web asset to a host asset, citing the observation, discovery run, evidence record, explanation, confidence, and SHA-256 that support it.
112
115
-**FindingCorrelation** — a symmetric same-asset or related-asset link whose explanation carries both findings' supporting hashes.
113
116
-**FrameworkMapping** — a fixed, versioned detector-rule classification under CWE. It is linked to a finding and its evidence hash but never changes that finding.
117
+
-**IntelligenceRun** — one immutable reviewed packet and, after separate approval, one structured advice result. It binds provider identity, prompt version, approval note, timestamps, packet and result hashes, and failure state to the latest completed correlation snapshot.
114
118
-**EvidenceRecord** — a hashed pointer to one retained discovery artifact.
115
119
116
120
**Observation ≠ Finding.** An observation says what happened; a finding says what it means. They remain separate rows, separate lifecycles and separate concepts: discovery alone never produces a finding, detection never edits an observation, and a finding that cites no observation is refused rather than stored. What Phase 2 adds is the arrow between them, not a merge.
@@ -184,6 +188,34 @@ supporting SHA-256 value or values. Fixed CWE mappings classify detector rules;
184
188
they are not additional evidence. Neither the runner nor the graph claims
185
189
reachability, exploitability, causation, likelihood, or risk. See [ADR 0009](docs/adr/0009-correlation-asserts-only-evidence-linked-facts.md).
186
190
191
+
## Intelligence boundary
192
+
193
+
Intelligence is disabled by default and keeps packet construction separate from
194
+
transmission:
195
+
196
+
```text
197
+
latest correlation + active evidence-linked findings
198
+
→ freeze exact versioned packet
199
+
→ retain + hash
200
+
→ operator review
201
+
→ separate approval note
202
+
→ provider identity recheck
203
+
→ configured OpenAI-compatible endpoint
204
+
→ strict schema + reference validation
205
+
→ retained, hashed advice
206
+
```
207
+
208
+
There is no arbitrary prompt or finding selector in the API. The packet contains
209
+
only stored finding facts and evidence hashes under fixed instructions that mark
210
+
all evidence strings as untrusted data. The provider gets no shell, tools,
211
+
credentials, target-selection surface, DockGuard access, or state-changing API.
212
+
Its output may refer only to IDs and hashes in that packet and cannot update the
213
+
source findings. External destinations and every credentialed connection require
214
+
HTTPS; redirects are refused and the packet, response, total duration, finding
215
+
count, and retained run count are bounded. Approval atomically claims one packet,
216
+
and re-verifies its prompt version and retained packet hash before transmission.
217
+
See [ADR 0010](docs/adr/0010-intelligence-is-reviewable-advice.md).
218
+
187
219
## Evidence flow (RedLedger)
188
220
189
221
Every completed run writes through the same store:
Paths are built from integer identifiers, a fixed scope name and a validated artifact name, and the resolved destination is checked to be inside its run directory, so no operator input can direct a write elsewhere. Every artifact is SHA-256 hashed. Session material such as cookies is deliberately never retained, and detection has nothing raw to retain because it contacts nothing.
@@ -234,6 +272,9 @@ Portable exports still belong to later phases; the Phase 3 package is retained l
234
272
| API → correlation runner | One Dockyard identifier and an empty body. The runner reads stored state, requires evidence hashes, and has no active capability or operator option. |
235
273
| API → validation runner | One finding identifier and an approval note only; the runner derives the origin from persisted state and has no arbitrary target or tool option. |
236
274
| Validation runner → target | DockGuard must allow the recorded origin at approval time; the only contact is the fixed bounded HTTP probe. |
275
+
| API → intelligence runner | One Dockyard identifier and an empty create body; approval adds only a bounded note. Provider credentials and destinations never come from the API. |
276
+
| Intelligence runner → model provider | Only the exact retained packet after approval and provider-identity recheck. The request has no tools or action channel; external endpoints require HTTPS and redirects are refused. |
277
+
| Model provider → RedDock | Untrusted, size-bounded JSON. Schema, finding IDs, evidence hashes, and duplicates are validated before the advice is retained. |
237
278
| RedDock → disk | Writes confined to the database file and the evidence root. |
238
279
239
280
## Concurrency and restart
@@ -248,6 +289,11 @@ restart as failed instead of leaving its audit state ambiguous.
248
289
249
290
Validation is synchronous only after approval. It is bounded to 500 retained requests per Dockyard, makes at most the two requests owned by the HTTP probe, and records a failed outcome if the process-level probe cannot complete. There is no background retry or task queue.
250
291
292
+
Intelligence is synchronous only after approval. A Dockyard may retain 200 runs,
293
+
one may be active at a time, a packet may contain 200 findings and 512 KiB, and a
294
+
provider response is capped at 1 MiB under a fixed 60-second timeout. Startup
295
+
marks an interrupted send failed; there is no retry or background queue.
296
+
251
297
| Detection limit | Value | Why |
252
298
| --- | --- | --- |
253
299
| Assets per snapshot | 2 000 | A snapshot cannot grow without bound |
@@ -262,6 +308,10 @@ Database setup is isolated in `backend/app/database.py` and each domain model ow
262
308
263
309
That constraint has already shaped a decision rather than merely being stated: detection artifact hashes live on the detection run because `evidence_records.discovery_run_id` cannot be relaxed additively.
264
310
265
-
## AI boundary
311
+
## Deterministic core
266
312
267
-
AI is still not integrated, and remains optional whenever it arrives. It may propose structured actions, but DockGuard evaluates them exactly as it evaluates an operator's, and it never receives shell access or the ability to widen scope. Nothing in detection is AI-driven: every detector is a deterministic rule over recorded data, and the same input produces the same findings. RedDock must remain useful with no AI provider configured.
313
+
Nothing in discovery, detection, validation, or correlation is AI-driven.
314
+
Detectors remain deterministic rules over recorded data, and the same input
315
+
produces the same findings. Phase 5 intelligence is an optional downstream
316
+
advice view: it cannot become evidence, change a conclusion, invoke a tool, or
317
+
widen scope. RedDock remains fully useful with no model provider configured.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,27 @@
2
2
3
3
All notable changes to RedDock are documented here.
4
4
5
+
## [0.6.0] — Phase 5 Intelligence
6
+
7
+
### Added
8
+
9
+
- An opt-in OpenAI-compatible provider boundary for local or cloud remediation and prioritization advice
10
+
- A two-step workflow that freezes, displays, retains, and hashes the exact stored-data packet before any provider request
11
+
- Separate local approval notes bound to the configured provider, model, destination, and local/external classification
12
+
- Strict structured response validation whose finding IDs and evidence hashes must be present in the approved packet
13
+
- Atomic one-shot approval, retained-packet integrity verification, prompt-version binding, and a true total provider deadline
14
+
- An Intelligence workspace for provider status, packet review, approvals, results, hashes, and limitations
15
+
- Additive `IntelligenceRun` persistence, restart recovery, API and UI coverage, and ADR 0010
16
+
17
+
### Security
18
+
19
+
- Intelligence is disabled by default and accepts no API-supplied provider credentials, destinations, prompts, targets, commands, tools, or actions
20
+
- API keys remain process-only; they are never stored, returned to the browser, retained in evidence, or logged
21
+
- External destinations require HTTPS; redirects are refused; total time, raw wire bytes, decoded bytes, response fragments, packet size, findings, and retained runs are independently bounded
22
+
- FastAPI and the development test stack are updated to current compatible release lines so Starlette and pytest include their published security fixes
23
+
- Model output is advice only and cannot modify finding state, trigger validation, widen scope, invoke a tool, or perform remediation
24
+
- Stored strings are treated as untrusted data, and output that cites an unknown finding or evidence hash fails closed
0 commit comments