Skip to content

Security: BlockG-ws/dumb.nix

Security

docs/SECURITY.md

Security Summary / 安全总结

Overview / 概述

This document provides a comprehensive security analysis of Dumb NixOS Live ISO.

Security Posture / 安全态势

Live ISO Context / Live ISO 环境特性

Key Point: This is a Live ISO system designed for temporary use, not a production system.

Characteristics:

  • ✅ No persistent data storage
  • ✅ All changes lost on reboot
  • ✅ Designed for single-user, temporary access
  • ✅ Used in controlled environments (physical access required)
  • ✅ Short-lived sessions

Intended Use Cases / 预期使用场景

  1. System Rescue: Boot from USB to repair broken systems
  2. Hardware Testing: Diagnose hardware issues
  3. Data Recovery: Recover data from damaged systems
  4. System Maintenance: Perform system administration tasks
  5. Temporary Workstation: Short-term computing needs

Security Decisions and Rationale / 安全决策及其理由

1. SSH Configuration

Setting:

services.openssh = {
  enable = true;
  settings = {
    PermitRootLogin = "yes";
    PasswordAuthentication = true;
  };
};

Security Implications:

  • ⚠️ Allows root login via SSH
  • ⚠️ Enables password authentication
  • ⚠️ Simple password "nixos" for root and user

Rationale:

  • 🎯 Live ISO needs easy remote access for system rescue
  • 🎯 Key-based auth impractical for emergency situations
  • 🎯 Physical access typically required to boot Live ISO
  • 🎯 All data is ephemeral (lost on reboot)
  • 🎯 Used in controlled environments

Mitigation:

  • 📝 Clear documentation about security implications
  • 📝 Warnings in configuration comments
  • 📝 Not recommended for production systems
  • 📝 Users should change passwords if extended use needed

Recommendation for Production:

# For production systems, use:
services.openssh = {
  enable = true;
  settings = {
    PermitRootLogin = "prohibit-password";
    PasswordAuthentication = false;
  };
};

2. Firewall Configuration

Setting:

networking.firewall.enable = false;

Security Implications:

  • ⚠️ No network filtering
  • ⚠️ All ports potentially accessible

Rationale:

  • 🎯 System maintenance often requires access to various services
  • 🎯 Network diagnostics need unrestricted access
  • 🎯 Temporary nature of Live ISO
  • 🎯 Typically used in trusted networks

Mitigation:

  • 📝 Users should be aware of network environment
  • 📝 Documentation warns about security implications
  • 📝 Recommended to use on trusted networks only

Recommendation for Production:

# For production systems, use:
networking.firewall = {
  enable = true;
  allowedTCPPorts = [ 22 ];  # Only SSH
};

3. User Configuration

Setting:

users.users.root.password = "nixos";
users.users.nixos = {
  isNormalUser = true;
  password = "nixos";
  extraGroups = [ "wheel" "networkmanager" "video" "audio" ];
};
security.sudo.wheelNeedsPassword = false;

Security Implications:

  • ⚠️ Well-known passwords
  • ⚠️ Passwordless sudo for wheel group

Rationale:

  • 🎯 Easy access for system rescue scenarios
  • 🎯 No persistent data to protect
  • 🎯 Physical access required to boot
  • 🎯 Convenience for emergency situations

Mitigation:

  • 📝 Documented in all user guides
  • 📝 Users warned to change if extended use
  • 📝 Clear that this is not for production

4. All Firmware Enabled

Setting:

hardware.enableAllFirmware = true;
hardware.enableRedistributableFirmware = true;

Security Implications:

  • ℹ️ Includes non-free firmware
  • ℹ️ Broader hardware support

Rationale:

  • 🎯 Maximum hardware compatibility
  • 🎯 System rescue needs work on any hardware
  • 🎯 Users can't easily add firmware on Live ISO

Note:

  • Some firmware may have proprietary licenses
  • Trade-off: compatibility vs. open source purity

Vulnerabilities Fixed / 已修复的漏洞

GitHub Actions Permissions

Issue: Missing explicit GITHUB_TOKEN permissions

Fix:

permissions:
  contents: write  # For releases
  actions: read    # For workflow info

Impact: Follows principle of least privilege

Known Security Considerations / 已知安全考虑

1. Default Passwords

Issue: Predictable default passwords

Severity: Low (Live ISO context)

Mitigation:

  • Physical access required
  • Ephemeral environment
  • Documented limitation
  • Users can change if needed

2. No Firewall

Issue: Network exposure

Severity: Medium (depends on network)

Mitigation:

  • Use on trusted networks
  • Documented warning
  • Temporary usage model

3. Password Authentication

Issue: Weaker than key-based auth

Severity: Low (Live ISO context)

Mitigation:

  • Physical access required
  • Easy remote access prioritized
  • Documented alternative

Security Best Practices for Users / 用户安全最佳实践

When Using the Live ISO:

  1. Network Environment

    • ✅ Use on trusted networks when possible
    • ✅ Avoid public WiFi for sensitive operations
    • ✅ Consider offline use for maximum security
  2. Password Management

    • ✅ Change passwords if extended use needed
    • ✅ Don't store sensitive data in the session
    • ✅ Remember: all data lost on reboot
  3. SSH Access

    • ✅ Only enable SSH when needed
    • ✅ Use on local network only
    • ✅ Monitor who connects
    • ✅ Stop SSH service when not needed:
      sudo systemctl stop sshd
  4. Sensitive Operations

    • ✅ Verify you're on the correct system
    • ✅ Be careful with disk operations
    • ✅ Double-check before writing to disks
    • ✅ Backup data before modifications
  5. After Use

    • ✅ Simply reboot to clear all data
    • ✅ No need to "clean up" - ephemeral by design
    • ✅ Remove USB drive when done

Security Features / 安全特性

Positive Security Aspects:

  1. Ephemeral by Design

    • No persistent state
    • All data cleared on reboot
    • No log accumulation
  2. Secure Boot Support

    • UEFI Secure Boot via shim
    • Verified boot chain
    • Compatible with modern systems
  3. Regular Updates

    • Based on NixOS 24.05
    • Includes latest security patches
    • Reproducible builds
  4. Open Source

    • Fully auditable code
    • Community review
    • Transparent security posture
  5. No Telemetry

    • No data collection
    • No phone-home behavior
    • Complete privacy

Compliance Considerations / 合规考虑

Data Protection:

  • ✅ No personal data stored
  • ✅ No logs persisted
  • ✅ Complete data erasure on reboot

Auditing:

  • ✅ All code open source
  • ✅ Reproducible builds
  • ✅ Configuration documented

Access Control:

  • ⚠️ Simple access model for Live ISO
  • ⚠️ Not suitable for multi-user scenarios
  • ⚠️ Not compliant with strict access policies

Vulnerability Reporting / 漏洞报告

If you discover a security vulnerability:

  1. DO NOT open a public issue
  2. Contact maintainers directly (see repository for contact info)
  3. Provide detailed information:
    • Description of vulnerability
    • Steps to reproduce
    • Potential impact
    • Suggested fix (if any)

Security Scanning Results / 安全扫描结果

CodeQL Analysis: ✅ PASSED

  • No security vulnerabilities detected in code
  • GitHub Actions permissions properly configured
  • All security alerts resolved

Manual Review: ✅ COMPLETED

  • Configuration reviewed for security implications
  • Design decisions documented
  • Trade-offs clearly explained

Conclusion / 结论

Security Posture Summary:

  • For Live ISO Use: ✅ APPROPRIATE

    • Security settings appropriate for intended use case
    • Trade-offs acceptable given ephemeral nature
    • Clear documentation of limitations
  • For Production Use: ❌ NOT RECOMMENDED

    • Settings too permissive for production
    • Designed for temporary, single-user access
    • Would require significant hardening

Bottom Line: This Live ISO has a security posture appropriate for its intended use as a temporary system rescue and maintenance tool. The security decisions prioritize convenience and accessibility for emergency situations, which is appropriate given the ephemeral nature of a Live ISO environment.

For production systems, significant security hardening would be required, including:

  • Stronger authentication
  • Firewall configuration
  • Proper access control
  • Audit logging
  • Regular security updates

References / 参考资料


Last updated: Initial Release Security review completed: Initial Release

There aren’t any published security advisories