Files
popki/docs/security-review.md
T

70 lines
4.8 KiB
Markdown

# Development boundary review
Scope: source review of the GUI/executor boundary, fixed task construction,
project persistence, identity import, logs and shutdown. The `security-review`
skill was applied to this code. This was not a network assessment, exploitation
exercise or an independently reproduced security audit.
## Reviewed controls
- No GUI root operation, service, custom agent, installation hook or mutable
root command allowlist. Infrastructure mutations are rejected at the final
process boundary while their version/laboratory gates are unresolved.
- Native operations use executable/argument arrays. The remote command is a
compiled, hash-checked PowerShell payload; host/user data never becomes code.
AD inventory binds its native queries to the selected DC and checks
`corp.local`. Its output remains incomplete directory inventory.
- SSH uses strict host keys, an explicitly chosen protected known-hosts file,
no forwarded agent/ports, no shared control session and no password arguments.
- The one-shot privileged observation checks peer UID/PID, exact operation
fields, empty typed parameters, local machine binding and protected native
binary/parent ownership. It exposes only selected `sshd -T` output. IPC and
package installation have not been exercised in this session.
- JSON rejects duplicate decoded keys, excess sizes/depth, unknown executable
fields, wrong source domains and known secret-bearing attribute names. Unknown
directory attributes remain data. Source GUID/SID keys do not use display names.
- Output redaction handles split/overlapping known secrets and suppresses an
oversized sensitive suffix. No guarantee is made for arbitrary secrets typed
into free-text notes: operators must not put credentials there.
- Owned access changes are compared with observed applied state before proposing
restoration. The current application records manual obligations; it does not
execute unverified inverse operations or assert remote cleanup.
## Issues corrected during source review
| Location | Issue | Correction and validation limit |
|---|---|---|
| `src/ui/models/JsonTableModel.cpp` | Tooltips can interpret imported markup | Escape tooltip content; Qt regression test authored |
| `src/app/AppController.cpp`, `src/execution/PlanExecutor.cpp` | Journal failure could escape a signal handler or allow scheduling | Guard asynchronous result persistence, refuse the next native start, record recovery obligation where possible |
| `src/execution/ShutdownCoordinator.cpp`, `src/app/AppController.cpp` | Cleanup summary could precede final result persistence | Queue shutdown notification and emit once after owned work stops |
| `src/storage/ProjectRepository.cpp` | Rotation lost host/operation/run metadata; run snapshots overwrote history | Retain all event fields and append transactional run history |
| `src/privileged/OperationDispatcher.cpp` | Incomplete local binding/path checks | Reject unreadable/invalid machine ID, fractional schema version and writable parent paths |
| `src/adapters/AdInventory.cpp`, fixed AD task | Inventory domain was not explicitly bound to the accepted project | Require `source_domain`, bind native queries and reject other domains |
| `src/core/Rules.cpp` | Case variation and incomplete role observation could weaken a decision | Case-insensitive DNS comparison; require configuration observation before a clean-node classification; portable tests pass |
## Remaining release restrictions
The Qt regression suites now pass on Kali, including tooltip escaping,
fixed-task parameter rejection, owned-child cancellation, journal refusal before
native start, storage persistence and explicit demo/checklist gates. This does
not verify root IPC, remote Windows execution or production authorization. Required additional
work includes helper peer/error/disconnect tests, real process ownership checks,
database-full/permission failures, performance with bounded maximum inventories,
remote-shell behavior on each Windows build and package ownership validation on
Astra. Firmware/OS trust and a compromised same-user account are outside this
temporary local IPC isolation boundary.
Signed vendor bundles, automatic access restoration, fully typed mutating
adapters and complete per-operation authorization are not implemented. Those
operations stay disabled; this review does not authorize them. A source archive
is not a production release.
## Build-time defects corrected
The first full Qt run exposed outstanding PRAGMA result sets that prevented a
SQLite schema transaction from committing, and null QString values bound to
NOT NULL log fields. Result sets now finish before the transaction; absent
optional log context is stored as an empty string. Storage and UI regressions,
including project reopen and schema-valid checklist export, pass on the
actual Qt 5.15.19/QSQLITE build. No user project was migrated during testing.