Commit Graph

25 Commits

Author SHA1 Message Date
Charles N Wyble
09b4f12026 docs(audit): update FINDING-002 to informational (by design)
Firewall OUTPUT DROP policy confirmed as intentional for immutable
system security model:
- Zero traffic leakage (no DNS poisoning, NTP spoofing, C2 exfil)
- Immutable system with no in-place updates
- WireGuard endpoint loaded via USB disk
- Time synchronized from host/hypervisor

Updated risk summary: 1 HIGH (Secure Boot), 4 MEDIUM, 3 LOW, 2 INFO

Remaining findings (001, 005, 006, 007, 008) to be addressed by
software team per audit recommendations.

💘 Generated with Crush

Assisted-by: GLM-4 via Crush <crush@charm.land>
2026-02-20 10:35:42 -05:00
Charles N Wyble
c8b004cf3e fix: use system libvirt with /tmp storage for virt-manager visibility
- Changed from qemu:///session to qemu:///system so VMs appear in virt-manager
- Store disk and ISO in /tmp (user-writable, no sudo needed)
- User is in libvirt group so can access system libvirt without sudo
- Updated test to expect system URI

This fixes the regression where VMs were not visible in virt-manager.

💘 Generated with Crush

Assisted-by: GLM-4.7 via Crush <crush@charm.land>
2026-02-20 10:22:48 -05:00
Charles N Wyble
48d635d8cc docs: mandate Linux CLI tools for file editing over internal tools
Added requirement for AI agents to use standard Linux command-line
tools (sed, awk, grep, patch, cut, etc.) instead of internal text
editing functions.

Rationale:
- Internal editing tools fail frequently with whitespace/encoding issues
- Command-line tools are deterministic and well-tested
- Better error messages and easier verification workflow

Changes:
- AGENTS.md: Added "File Editing Requirements" section with tool usage
- SDLC.md: Added "File Editing Standards" section with patterns

Reference: User feedback that internal editing tools "fail way too much"

💘 Generated with Crush

Assisted-by: GLM-4.7 via Crush <crush@charm.land>
2026-02-20 09:31:23 -05:00
Charles N Wyble
aedaabf82c docs: enforce JOURNAL.md updates and auto-commit/push in SDLC
Added JOURNAL.md to mandatory documentation synchronization:
- AGENTS.md: Added JOURNAL.md to documentation step and success criteria
- SDLC.md: Added JOURNAL.md to doc sync requirements and references
- pre-commit hook: Check for JOURNAL.md updates on new functions

Strengthened auto-commit/push requirements:
- Commit early and often (after each logical unit of work)
- Atomic commits (one commit per logical change)
- Verbose conventional commit messages (WHAT, WHY, context)
- Push immediately after every commit

Reference: User request for JOURNAL.md sync and auto-commit policy

💘 Generated with Crush

Assisted-by: GLM-4.7 via Crush <crush@charm.land>
2026-02-20 09:28:26 -05:00
Charles N Wyble
59122570a6 feat: enforce SDLC compliance with pre-commit hook and documentation
- Add .git/hooks/pre-commit for automatic SDLC enforcement
  - Blocks commits on lint warnings
  - Blocks commits on test failures
  - Checks test coverage for modified files
  - Warns on missing documentation updates

- Update AGENTS.md with mandatory SDLC compliance section
  - Visual workflow diagram
  - Zero tolerance policy
  - Pre-commit hook documentation

- Fix SC2012 lint warnings in run.sh (lines 74, 551)
  - Changed ls | head to find -print -quit

- Add FR-012 Secure Boot with UKI to docs/PRD.md
  - Trust chain requirements
  - Key specifications (RSA-4096, SHA-256, 3650 days)
  - Kernel lockdown requirements

- Update docs/security-model.md with Secure Boot trust chain
  - Full trust chain diagram
  - Key hierarchy
  - Kernel lockdown effects

- Update docs/TEST-COVERAGE.md with Secure Boot tests

- Add tests/unit/secureboot_test.bats (70+ tests for Secure Boot)

- Fix test bugs in build-iso and run comprehensive tests
  - Changed distribution from 'testing' to 'trixie'
  - Fixed Secure Boot key test patterns for multiline matches

💘 Generated with Crush

Assisted-by: GLM-4.7 via Crush <crush@charm.land>
2026-02-20 08:44:56 -05:00
Charles N Wyble
a2f0761cfd docs: update VERIFICATION-REPORT.md with new ISO build info
- Update build log path to /tmp/knel-iso-build-20260219-232947.log
- Update build duration to 37 minutes
- Update SHA256 checksum
- Update MD5 checksum

💘 Generated with Crush

Assisted-by: GLM-4.7 via Crush <crush@charm.land>
2026-02-20 00:12:20 -05:00
Charles N Wyble
626e49c3e7 fix: preseed.cfg UEFI partitioning and user password prompts
- Add EFI System Partition (ESP) for UEFI boot support
- Add $defaultignore{ } to LVM partitions for proper crypto handling
- Add in_vg{ knel_vg } and lv_name{ } for explicit volume placement
- Change debconf priority from critical to high to allow user password prompts
- Update documentation dates to 2026-02-19
- Update ISO size references from 450 MB to 816 MB
- Update checksums to current values

Fixes installer error "No root file system is defined"
Fixes missing non-root user password prompt

💘 Generated with Crush

Assisted-by: GLM-4.7 via Crush <crush@charm.land>
2026-02-19 23:29:31 -05:00
Charles N Wyble
872da4cf82 feat: add mandatory host FDE check for build/test operations
- Add check_host_fde() function to run.sh that detects LUKS encryption
- Block ./run.sh iso if host lacks full disk encryption
- Block ./run.sh test:iso commands if host lacks FDE
- Add FR-011 to PRD.md documenting the host FDE requirement
- Update AGENTS.md with new mandatory requirement
- Add 9 tests for host FDE check in run_comprehensive_test.bats

Rationale: Building a secure OS on an unencrypted host creates supply
chain risk. The host must have LUKS encryption to ensure the entire
build pipeline is secure.

💘 Generated with Crush

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-02-19 17:11:54 -05:00
Charles N Wyble
d4c64b85fa docs: fix PRD consistency and align all docs with SSH client-only (FR-006)
PRD fixes:
- Remove duplicate 'Installation Behavior' section
- Fix malformed terminology table (missing pipe separator)

Documentation alignment with FR-006:
- README.md: Change SSH/firewall to client-only, no inbound access
- TEST-COVERAGE.md: Remove 'Firewall allows SSH inbound'
- VERIFICATION-REPORT.md: Fix password config docs to match preseed.cfg
- COMPLIANCE.md: Change 'SSH Hardening' to 'SSH Client-Only'

Test enhancements:
- Expand unit tests for encryption, firewall, security hardening
- Add comprehensive coverage for FR-001 through FR-009 requirements

All changes ensure documentation and tests align with PRD.md FR-006
which requires SSH client-only with no server or inbound access.

💘 Generated with Crush

Assisted-by: GLM-4.7 via Crush <crush@charm.land>
2026-02-19 16:04:38 -05:00
Charles N Wyble
f13bb8577a docs: move PRD.md and SDLC.md to docs/ subdirectory
Consolidate all documentation files under docs/ directory.
Update AGENTS.md and README.md to reflect new file locations.

💘 Generated with Crush

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-02-19 14:52:56 -05:00
Charles N Wyble
ab49d1f98b refactor: remove versioning from ISO filename
ISO now always named knel-football-secure.iso (no v1.0.0 suffix).
Updated all references in code, docs, and tests.

💘 Generated with Crush

Assisted-by: GLM-4.7 via Crush <crush@charm.land>
2026-02-17 15:44:09 -05:00
Charles N Wyble
d9f2f02138 refactor: consolidate test-iso.sh and monitor-build.sh into run.sh
- Merged VM testing functions into run.sh (test:iso commands)
- Merged build monitoring into run.sh (monitor command)
- Updated tests to reference ./run.sh test:iso instead of ./test-iso.sh
- Updated documentation (README.md, AGENTS.md, STATUS.md)
- Removed standalone scripts per project cleanup

💘 Generated with Crush

Assisted-by: GLM-4.7 via Crush <crush@charm.land>
2026-02-17 15:22:21 -05:00
bd1b93f44f . 2026-01-29 14:20:36 -05:00
c1d8c5def6 chore: clean up root directory and consolidate documentation
Remove obsolete documentation files and consolidate into docs/ directory. Remove redundant test scripts (functionality will be folded into run.sh). Update AGENTS.md with SDLC workflow. Update PRD.md with tier0 architecture clarification. Update README.md to reflect clean directory structure.

Changes:
- Delete: BUILD-COMPLETE.md, BUILD-SUMMARY.md, RESUME.md, SESSION-CLOSED.md
- Delete: FINAL-SECURITY-COMPLIANCE-REPORT.md, QUICK_START.md, JOURNAL.md
- Move: TEST-COVERAGE.md, VERIFICATION-REPORT.md to docs/
- Delete: test-iso.sh, test-runner.sh (will fold into run.sh)
- Update: AGENTS.md with SDLC workflow section
- Update: PRD.md with tier0 architecture clarification and diagram
- Update: README.md to reflect clean directory structure

Root directory now contains only: AGENTS.md, README.md, PRD.md, Dockerfile, run.sh

💘 Generated with Crush

Assisted-by: GLM-4.7 via Crush <crush@charm.land>
2026-01-29 12:07:28 -05:00
b2dab97452 docs: Add comprehensive documentation structure
- Add architecture.md with system architecture details
- Add COMPLIANCE.md with compliance matrix
- Add security-model.md with security specifications
- Add prompts-cache.md for AI prompt history

💘 Generated with Crush

Assisted-by: GLM-4.6 via Crush <crush@charm.land>
2026-01-21 15:38:50 -05:00
d4eeaccbcc refactor: Move specifications to docs directory
- Move football-spec.md to docs/football-spec.md
- Move project-spec.md to docs/project-spec.md

💘 Generated with Crush

Assisted-by: GLM-4.6 via Crush <crush@charm.land>
2026-01-21 15:38:44 -05:00
69d6c81e1c feat: Complete repository reset for fresh start
- Remove all project files and directories
- Keep git history intact
- Archive documentation in archive-docs/ directory

💘 Generated with Crush

Assisted-by: GLM-4.6 via Crush <crush@charm.land>
2026-01-21 08:56:22 -05:00
3cd1c31960 chore: Remove all debootstrap traces and obsolete documentation
Comprehensive cleanup to remove all traces of old debootstrap-based
build system approach, now fully migrated to ISO-based installer.

1. **Removed Obsolete Files**:
   - Dockerfile.dev (old debootstrap container definition)
   - config/preseed.sh (obsolete debootstrap script)
   - docs/CLEANUP-SUMMARY.md (historical cleanup docs)
   - docs/TEST-EVIDENCE.md (historical test docs)
   - docs/old/ (entire directory with obsolete docs)
   - tests/build-and-test.sh (old debootstrap test script)

2. **Rewrote AGENTS.md**:
   - Removed all obsolete build system sections (Build System,
     Current Build Status, Build Environment, Proof Testing,
     Known Issues, Next Steps)
   - Kept current relevant sections (Orientation, Overview,
     Architecture, Security Model, Compliance, File Structure,
     Configuration, Scripts, Deployment, Verification)
   - Updated to focus solely on ISO-based approach
   - Reduced from 1306 lines to ~650 lines (clean and concise)
   - Added proper Build System section for ISO approach
   - Added Testing section
   - Added Troubleshooting section

3. **Updated Active Documentation**:
   - docs/FUNCTIONAL-REQUIREMENTS.md (corrected installer description)
   - docs/BUILD-DOCUMENTATION.md (removed debootstrap reference)
   - docs/SECURITY-BASELINES.md (removed debootstrap reference)
   - AGENTS.md (updated with COMMIT_CONVENTIONS reference)

4. **Project Now Clean**:
   - All debootstrap references removed
   - All obsolete documentation removed
   - Focus entirely on ISO-based installer approach
   - Ready for clean ISO builds

Files Deleted:
- Dockerfile.dev
- config/preseed.sh
- docs/CLEANUP-SUMMARY.md
- docs/TEST-EVIDENCE.md
- docs/old/ (BUILD-CONTINUOUS-STATUS.md, BUILD-PROGRESS.md,
  BUILD-STATUS.md, DOCKER-README.md, DOCKER-SOLUTION.md,
  QUICKSTART.md)
- tests/build-and-test.sh

Files Updated:
- AGENTS.md (complete rewrite, removed ~650 lines of obsolete content)
- docs/FUNCTIONAL-REQUIREMENTS.md (corrected installer type)
- docs/BUILD-DOCUMENTATION.md (removed obsolete tool reference)
- docs/SECURITY-BASELINES.md (removed obsolete reference)

💘 Generated with Crush

Assisted-by: GLM-4.7 via Crush <crush@charm.land>
2026-01-20 14:09:32 -05:00
471ac78a4c feat: Complete ISO build system with security features
Major updates for production-ready ISO:

1. **Debian Version**:
   - Updated to Debian 13.3.0 stable (released)
   - No longer using testing/sid
   - Using debian:stable Docker image

2. **Password Complexity Enforcement**:
   - Added libpam-pwquality and libpwquality packages
   - Password complexity enforced during install via PAM
   - Configured in security-config.sh:
     * Minimum 12 characters
     * Mixed case required
     * At least one digit
     * At least one special character
     * 3 character classes required
   - Preseed enforces password checks during installer

3. **Auto-Lock After 1 Minute**:
   - Added xautolock and xscreensaver packages
   - Configured in .xinitrc for auto-lock after 1 minute idle
   - Uses xscreensaver-command -lock for screen locking

4. **USB Drive Mounting**:
   - Added udisks2, gvfs-backends, gvfs-fuse packages
   - Created polkit rules for USB mounting
   - User added to plugdev and cdrom groups
   - USB drives mountable via file manager

5. **WiFi and Bluetooth Disabling**:
   - Created config/disable-wifi-bt.sh script
   - Blacklists all WiFi kernel modules
   - Blacklists all Bluetooth kernel modules
   - Masks bluetooth service
   - Removes bluez packages

6. **First-Boot Verification**:
   - Created scripts/verify-system.sh
   - Created config/football-first-boot.service
   - Verifies all functional requirements
   - Runs once on first boot
   - Prevents re-running via status file

7. **ISO Build System**:
   - Updated to use Debian 13.3.0 stable ISO
   - Scripts and config baked into ISO
   - Docker-based build process
   - Corrected ISO filename throughout

8. **Preseed Configuration**:
   - Manual user creation (not automated)
   - Manual password prompts (enforced via PAM)
   - Late_command applies all security configs
   - Copies verification script to target
   - Enables first-boot verification service

Files Added:
- config/disable-wifi-bt.sh (WiFi/BT disabling)
- config/security-config.sh (password complexity, auto-lock, USB mounting)
- config/football-first-boot.service (first-boot verification systemd service)
- scripts/verify-system.sh (comprehensive verification script)

Files Updated:
- config/preseed.cfg (password enforcement, security packages, late_command)
- scripts/build-iso.sh (Debian 13.3.0, correct filenames)
- docs/FUNCTIONAL-REQUIREMENTS.md (verification strategy)
- AGENTS.md (documentation references)
- README.md (documentation references)

All requirements from this session implemented:
✓ Password complexity enforced during install
✓ Auto-lock after 1 minute idle
✓ USB drive mounting enabled
✓ WiFi/Bluetooth disabled
✓ First-boot verification
✓ Scripts baked into ISO (no internet needed)
✓ All packages in ISO
✓ Debian 13.3.0 stable

💘 Generated with Crush

Assisted-by: Gemini 2.5 Flash via Crush <crush@charm.land>
2026-01-20 12:33:49 -05:00
76e2263117 docs: Add comprehensive functional requirements specification
Adds docs/FUNCTIONAL-REQUIREMENTS.md documenting:
- Core functionality (FR-1 to FR-12)
- Artifact properties (9 properties covering ISO, installed system, deployment)
- Non-functional requirements (performance, reliability, usability, security)
- User inputs required (username, passwords, disk selection)
- System components (OS, desktop, network, security)
- Compliance requirements (CIS Benchmarks, NIST SP 800-53)
- Testing requirements (installation, security, functional)
- Acceptance criteria (5 criteria for production readiness)
- Glossary and related documents

This document captures all functional requirements discussed
in previous sessions and serves as single source of truth for
system behavior, properties, and requirements.

💘 Generated with Crush

Assisted-by: Gemini 2.5 Flash via Crush <crush@charm.land>
2026-01-20 12:08:16 -05:00
2225244ca3 docs: Add comprehensive cleanup summary
Adds docs/CLEANUP-SUMMARY.md documenting:
- All cleanup and refactoring completed
- Directory structure changes (before/after)
- Files moved/archived/deleted
- Documentation updates made
- Build approach migration details
- Git commit history (11 commits)
- Current state (ready to build)
- Next steps for production

This provides complete reference for all refactoring work
and ensures future contributors understand changes made.

💘 Generated with Crush

Assisted-by: Gemini 2.5 Flash via Crush <crush@charm.land>
2026-01-20 12:00:13 -05:00
546c3ea5cf docs: Add comprehensive build documentation
Adds docs/BUILD-DOCUMENTATION.md explaining:
- Directory structure (clean and organized)
- Complete build process (5 steps)
- Preseed configuration details
- ISO deployment procedures (bare metal and VM)
- Docker container usage (dev and test)
- Security features applied during installation
- Troubleshooting guide
- Next steps for deployment

This replaces all scattered old documentation with a single,
comprehensive reference for the ISO-based build system.

💘 Generated with Crush

Assisted-by: Gemini 2.5 Flash via Crush <crush@charm.land>
2026-01-20 11:58:19 -05:00
8f9487b59d refactor: Clean up documentation directory
Moves obsolete documentation to docs/old/:
- BUILD-CONTINUOUS-STATUS.md (old build status)
- BUILD-PROGRESS.md (old build progress)
- BUILD-STATUS.md (old build status)
- DOCKER-README.md (old Docker build docs)
- DOCKER-SOLUTION.md (old Docker build docs)
- QUICKSTART.md (replaced by README.md)

Keeps relevant documentation in docs/:
- COMPLIANCE.md (compliance documentation)
- INCIDENT-RESPONSE.md (incident response)
- SECURITY-BASELINES.md (security baselines)
- SECURITY-POLICY.md (security policy)
- TEST-EVIDENCE.md (test evidence)

Documentation directory now clean and focused on current ISO approach.

💘 Generated with Crush

Assisted-by: Gemini 2.5 Flash via Crush <crush@charm.land>
2026-01-20 11:55:50 -05:00
Charles N Wyble
ac7df85a0e feat: add security baselines guide and update build script
Security Baselines Guide Includes:
- Comprehensive security baseline overview
- Kernel parameters verification
- Firewall rules baseline
- Authentication and password baselines
- Audit rules baseline
- Service baselines (enabled/prohibited)
- File permission baselines
- AIDE configuration baseline
- Logging baselines
- Initial hardening procedures
- Baseline verification procedures
- Ongoing hardening activities (daily/weekly/monthly/quarterly/annual)
- Baseline maintenance procedures
- Compliance verification for CIS/CMMC/FedRAMP
- Troubleshooting guide
- Quick reference commands

Build Script Updates:
- Add PAM configuration step (common-password-cis)
- Add faillock configuration for account lockout
- Add AIDE database initialization
- Add Secure Boot configuration step
- Add additional systemd services (auditd, rsyslog, apparmor, aide-check.timer)
- Update step numbers to 11/11 for consistency
- Improve hardening script execution

Security Controls Applied:
- PAM with CIS password policies
- Account lockout (5 attempts, 15 minutes)
- AIDE database initialization
- Secure Boot configuration
- All security services enabled

Compliance Standards:
- CIS Debian 13 Benchmark
- CMMC Level 3
- FedRAMP Moderate
- NIST SP 800-53 Moderate
- NIST SP 800-171

This guide provides complete baseline verification and
maintenance procedures for Tier0 infrastructure protection.

💘 Generated with Crush

Assisted-by: GLM-4.7 via Crush <crush@charm.land>
2026-01-13 14:20:05 -05:00
Charles N Wyble
392dd9dadc docs: add comprehensive security documentation
- Add SECURITY-POLICY.md with all security policies
- Add INCIDENT-RESPONSE.md with incident response procedures

Security Policy Includes:
- Information Security Policy (purpose, scope, compliance)
- Access Control Policy (least privilege, separation of duties)
- Network Security Policy (WireGuard-only, remote access prohibition)
- Incident Response Policy (classification, process, notification)
- Change Management Policy (categories, process, controls)
- Audit and Logging Policy (scope, requirements, retention)
- Password Policy (complexity, aging, lockout)
- Acceptable Use Policy (authorized/prohibited use, monitoring)
- Physical Security Policy (access controls, device security)
- Data Classification Policy (CUI marking, handling, retention)

Incident Response Procedures Include:
- Incident Classification (Category I, II, III)
- Incident Detection (sources, indicators, assessment)
- Incident Response Process (6 phases)
- Specific Incident Procedures (malware, data breach, DoS)
- Post-Incident Activities (reporting, lessons learned)
- Communication Procedures (internal, external)
- Documentation Requirements (logs, evidence, retention)
- Training and Drills (requirements, drills, assessment)

Compliance Standards Addressed:
- CIS Debian 13 Benchmark: All applicable policies
- CMMC Level 3: All domain policies
- FedRAMP Moderate: All control policies
- NIST SP 800-53: All control policies
- NIST SP 800-171: All control policies

Documentation Structure:
- Comprehensive policy framework
- Detailed incident response procedures
- Contact information for all stakeholders
- Compliance references included
- Document control procedures
- Review and update schedules

This documentation provides complete policy framework for:
- Tier0 infrastructure protection
- CUI handling requirements
- Security incident response
- Regulatory compliance
- Security governance

💘 Generated with Crush

Assisted-by: GLM-4.7 via Crush <crush@charm.land>
2026-01-13 14:00:36 -05:00