fix: honest remediation batch 3 - fix broken claims and real Argon2id
Previous commits marked findings as ✅ that were actually superficial or broken. This commit fixes the real problems honestly. Real fixes: - Argon2id KDF: Fixed via preseed partman/early_command that patches partman-crypto's cryptsetup luksFormat to include --pbkdf argon2id. Previous luks-kdf-configure.sh "auto-conversion" was dead code (cryptsetup luksConvertKey needs stdin passphrase, nothing provides it). Now the hook is an honest verifier, not a fake converter. - src/security-hardening.sh: Removed sshd_config generation entirely (was still generating it despite claiming client-only) - AIDE init: Removed || true error swallowing, now reports failures - COMPLIANCE.md: Marked CMMC L3 and FedRAMP as aspirational targets with honest explanation of what's missing (3PAO, org controls) - VERIFICATION-REPORT.md: Added self-review warning about contradictions, fixed wrong preseed path (config/preseed.cfg → includes.installer/) - Removed phantom knel-compliance-check.sh reference from COMPLIANCE.md - encryption-setup.sh: README now says "Argon2id (via early_command)" instead of bare "Argon2id" which was false - demo.preseed.cfg: Added same Argon2id early_command - Added .dockerignore (was missing) - Fixed .gitignore *key* pattern (too broad, matched keyboard.conf etc) Still remaining (honest assessment): - C-06: Git history scrub (needs git-filter-repo, destructive) - H-09: Build cache integrity (design work needed) - M-11: Docker base digest pinning - Phase 3: Test suite overhaul (85% grep-based, not behavioral) - Phase 4: Documentation cleanup (threat model, etc) - ISO NOT rebuilt since fixes 786 tests pass, 0 shellcheck warnings. 💘 Generated with Crush Assisted-by: GLM-5.1 via Crush <crush@charm.land>
This commit is contained in:
@@ -84,33 +84,16 @@ EOF
|
||||
echo "SSH client configuration created at $output_file"
|
||||
}
|
||||
|
||||
# Function to configure SSH hardening (server config as defense-in-depth)
|
||||
# System is SSH client-only per PRD FR-006, but sshd_config is hardened defensively
|
||||
# Function to ensure no SSH server configuration exists
|
||||
# PRD FR-006: Client-only system. No sshd_config should ever exist.
|
||||
configure_ssh() {
|
||||
local output_file="${1:-/etc/ssh/sshd_config}"
|
||||
|
||||
cat >"$output_file" <<'EOF'
|
||||
# SSH Server Hardening Configuration (defense-in-depth)
|
||||
# Reference: PRD FR-006 - Client-only system, sshd not installed
|
||||
# This config exists as a security baseline if sshd is ever installed
|
||||
|
||||
# Protocol
|
||||
Protocol 2
|
||||
|
||||
# Authentication
|
||||
PermitRootLogin no
|
||||
PermitEmptyPasswords no
|
||||
MaxAuthTries 3
|
||||
|
||||
# Session
|
||||
ClientAliveInterval 300
|
||||
ClientAliveCountMax 2
|
||||
|
||||
# Forwarding
|
||||
X11Forwarding no
|
||||
EOF
|
||||
|
||||
echo "SSH hardening configuration created at $output_file"
|
||||
# Remove any existing sshd_config to prevent accidental activation
|
||||
if [[ -f "$output_file" && "$output_file" == /etc/ssh/sshd_config ]]; then
|
||||
rm -f "$output_file"
|
||||
fi
|
||||
echo "SSH server config removed per PRD FR-006 (client-only system)"
|
||||
}
|
||||
|
||||
# Function to configure password policy
|
||||
|
||||
Reference in New Issue
Block a user