CDG / ENGINEERINGContactSign in ↗

Networking

NetSecOps

Scoped operations with durable SQLite jobs, worker deadlines and inspectable audit evidence.

Research application / provenance review openimplementation reviewsource only

ORIGINAL CONTRIBUTIONS

What I built.

  • Implemented a tested worker lifecycle repair that preserves deadlines after controller disconnect or false cancellation updates.
  • Reviewed local authorization, bounded scope, structured diagnostics and SQLite-backed jobs.
  • Added a safe persistence demonstration for reopen, explicit model recovery and checkpoint deduplication.

NetSecOps / SYSTEM MAP

How this system connects.

Local controlprotocol1Authorized jobdaemon2Diagnosticworker3Durable jobstate4
  1. 01 / Local control protocol: Represent daemon operations and response errors.
  2. 02 / Authorized job daemon: Own job lifecycle, recovery and scope admission.
  3. 03 / Diagnostic worker: Execute bounded subprocess work and collect output.
  4. 04 / Durable job state: Keep jobs, attempts, audit transitions and completed checkpoints.
Directed connections
  • 1 → 2: authenticated local command (implemented)
  • 2 → 3: authorized bounded work specification (implemented)
  • 2 → 4: transactional transitions / checkpoints (implemented)
  • 3 → 2: validated result / cancellation outcome (implemented)

SYSTEMS DESIGN & OWNERSHIP

Engineering below the surface.

Job state is independent of a terminal session

The Rust application separates durable SQLite job/checkpoint state from terminal attachments and external worker execution. Reopening the model can recover persisted context even when the original console is gone.

Cancellation is not the same as controller availability

The tested repair keeps a worker deadline active when the cancellation channel closes or publishes a false value. It also checks cancellation before executable resolution, so a cancelled task does not start side effects merely because the controller disappeared.

Scope and evidence constrain operational tools

Unix peer credentials, normalized scope, bounded work units and process-group lifecycle controls define the local operating boundary. The safe replay demonstrates SQLite recovery and checkpoint deduplication without scanning any real network. Initial-import provenance remains under review.

EXPLORE THE ARCHITECTURE

Components. Contracts. Consequences.

Local Unix peer identity → daemon scope/confirmation gates → bounded diagnostic worker → evidence checkpoint. Portfolio uses synthetic replay and starts no network scans.

01 / Local control protocol

Represent daemon operations and response errors.

Implementation

Versioned serialized commands cover job creation, start, status, pause/resume and cancellation.

Security & failure behavior

The daemon authenticates the Unix peer before dispatch; this manifest does not imply a public control API. Invalid commands, protocol versions or identifiers produce structured failures.

Tradeoff

A local Unix protocol fits Linux operations; cross-platform service parity remains limited.

02 / Authorized job daemon

Own job lifecycle, recovery and scope admission.

Implementation

Unix listener validates peer credentials, normalized bounded scopes and explicit start authorization; tasks persist transitions.

Security & failure behavior

Root, socket owner and permitted group membership are checked; remote scope needs explicit allow_remote. Unauthorized peers, unconfirmed starts or invalid scopes are refused. Incomplete tasks enter recovery logic.

Tradeoff

OS local identity is the trust anchor; deployment group membership grants meaningful authority.

03 / Diagnostic worker

Execute bounded subprocess work and collect output.

Implementation

Worker constructs argument arrays, records process identity, validates Nmap XML and publishes terminal output.

Security & failure behavior

Cancellation targets process groups; recovery checks recorded process identity before terminating a process. Cancellation, process failure or invalid output prevent successful completion.

Tradeoff

External tools and OS facilities remain runtime dependencies; synthetic replay does not validate live scanning.

04 / Durable job state

Keep jobs, attempts, audit transitions and completed checkpoints.

Implementation

SQLite transactions store state changes and stage results; completion requires checkpoint invariants.

Security & failure behavior

Persisted process identity supports recovery decisions; schema versions are checked. Unsupported schema, missing jobs/tasks or incomplete checkpoints return typed storage errors.

Tradeoff

Transactional single-host durability; distributed workers are outside this architecture.

Open full 2D architecture →

TECHNICAL CASE STUDY

Decisions behind the system.

Engineering problem

Run authorized diagnostics with recoverable job state, bounded worker lifetimes, and evidence that survives interruption.

Requirements & constraints

Scope normalization, bounded work units, durable checkpoints, cancellation, local authorization and a safe demonstration with no real scans.

Architecture & technologies

Rust daemon and Unix peer credentials, SQLite WAL/FULL transactions, terminal attachment hub, structured external-worker profiles and systemd packaging.

Security & trust boundaries

Daemon socket checks UID/GID. Scope normalization and bounded_work_units constrain targets. Process identity and process-group cancellation constrain worker lifecycle. No public administrative endpoint is connected.

Original contributions & provenance

Local history attributes four commits to CharlesDerek/charlesderek, but the large initial implementation import has unresolved upstream provenance. The directory labels the project review-pending. The tested worker repair is independently attributable.

Working implementation

StateStore persistence, checkpoint deduplication, model recovery transitions and worker lifecycle checks are present. Source includes PTY attachment and daemon routing; those are separate from the safe replay.

Experiments & missing capabilities

Full scheduler recovery under real worker execution, packaging deployment and actual diagnostic tools were not exercised by this model replay. No production scalability claim.

Failure modes & concurrency

A closed cancellation channel or a false update previously escaped the deadline select. The fix waits for a true cancellation while retaining the timeout branch; pre-cancelled workers return before side effects.

Testing & evidence

64 application tests and 9 example tests passed, along with strict Clippy and formatting. Two new worker regressions failed against baseline; an additional regression checks false updates followed by cancellation.

Observable improvement

Before: controller loss could leave an unbounded worker wait; pre-cancelled tasks reached executable resolution. After: timeout survives controller loss and cancellation is checked before launch. Local commit e36846d.

Deployment model

Independent local daemon, SQLite state and terminal UI. Public portfolio displays a captured SQLite model replay without scanner or daemon execution.

Decisions & alternatives

Controller disconnection is treated as absence of cancellation while the deadline remains active. Explicit model recovery demonstrates persistence without claiming full scheduler recovery.

Demonstration & limitations

The Operations persistence replay reopens SQLite, marks model interruption/recovery, suppresses duplicate checkpoints and completes a synthetic job. No network scan, wireless operation or privileged host action.

ENGINEERING SCOPE

Clear boundaries.

Worker improvements verified; initial implementation import provenance remains under review.

  • Initial import provenance remains unresolved; distinguish the attributable worker repair from whole-repository authorship.
  • Public replay does not run network scans or the daemon recovery scheduler.