Files
kiskaadee dc9a55163d
Brain Structural Validation / Validate Markdown Structure & Links (push) Failing after 8s
plan(homelab): relocate architecture consolidation series to subsystem lineage folder
Move roadmap and guide documents (v1–v4) into 01-plans/homelab/consolidation/
preserving max_depth=3 contract and update intra-vault relative links across journals.
2026-09-29 12:39:45 -05:00

4.0 KiB
Raw Permalink Blame History

type, date, project, tags
type date project tags
journal 2026-09-13 homelab
security
architecture
operations
homelab
gitops

Daily Journal: 2026-09-13

Wins

Homelab Core — Milestone P0: GitOps Trust Boundary Implementation

Completed and validated all deliverables (1.1–1.5 and 3.1–3.6) for Milestone P0 of the Architecture Consolidation Plan.

Completed Deliverables & Commit Chain

  1. Deliverable 1.1 — Remove Arbitrary custom Execution

    • Commit: 29dd186 refactor(gitops): remove arbitrary custom execution
    • Actions: Removed shell=True and custom: execution handler from scripts/gitops_dispatcher.py. Unsupported actions fail closed.
  2. Deliverable 1.2 — Trusted Repository Resolution

    • Commit: 01acdb4 feat(gitops): add trusted repository resolution
    • Actions: Implemented resolve_repository(repo_name) enforcing canonical path resolution, strict regex naming (^[a-zA-Z0-9][a-zA-Z0-9._-]*$), directory traversal rejection (../../etc), symlink escape rejection, and allowed root containment (~/Sites, ~/Brain).
  3. Deliverable 1.3 — Webhook Authentication

    • Commit: fa8054a feat(gitops): add webhook authentication
    • Actions: Configured HMAC-SHA256 signature verification (X-Gitea-Signature) using constant-time comparison (hmac.compare_digest). Generated shared secret encrypted via SOPS/Age in nixos/secrets.yaml and projected to /run/secrets/gitops/webhook_secret via homeserver.nix.
  4. Deliverable 1.4 — Repository, Event, and Branch Admission

    • Commit: c265c3e feat(gitops): enforce repository/event/branch admission
    • Actions: Implemented admit_deployment() verifying event type (push only), ref structure (refs/heads/* only; tags/PRs rejected), trusted repository identity, manifest validity, and target branch matching policy.
  5. Deliverable 1.5 — Serialized Asynchronous Deployment with Superseding

    • Commit: 5aae4ef feat(gitops): add serialized asynchronous deployment
    • Actions: Separated HTTP admission from background execution. Incoming webhooks write atomic pending files and return HTTP 200 immediately. Workers acquire non-blocking per-repository flock locks, sequentially running deployments and automatically superseding intermediate pending commits (A running, B queued, C replaces B -> A deploys, then C deploys).
  6. Deliverables 3.1, 3.2, 3.6 — Automated Testing & CI Invariants

    • Commits:
      • 142697a test(architecture): add structural invariants and test runner
      • f4b676b test(architecture): add compose and socket proxy security invariants
      • 3351466 ci: run architecture and security validation in flake check and gitea actions
    • Actions: Added automated test runner scripts/test, structural invariant checks (tests/structural/), Compose security invariant checks (tests/security/test_security_invariants.py), Nix flake check integration (checks.x86_64-linux.test-suite in flake.nix), and Gitea Actions CI workflow (.gitea/workflows/ci.yaml).
  7. Documentation Synchronization

    • Commit: 534ea9e docs: sync repository documentation with GitOps hardening and automated test invariants
    • Actions: Synchronized README.md and SECURITY.md with the hardened GitOps architecture, automated test runner instructions, Docker socket isolation guarantees, and declarative NixOS SOPS checklist.

Verification & Invariant Proofs

  • Pytest Suite: 31 passing tests in 0.09s (tests/security/, tests/structural/).
  • One-Command Test Runner: ./scripts/test (linting + unit tests + Nix flake check).
  • Ruff Code Health: Zero lint or formatting warnings across the entire repository.
  • NixOS Evaluation & Pure Sandbox Check: nix flake check passing with zero errors.
  • Continuous Integration: Machine-enforced via Gitea Actions on every push and PR.