| 15 | | β
Mitigations: |
| 16 | | |
| 17 | | Use guix build --source with hash-locked package definitions (content-addressed derivations). |
| 18 | | |
| 19 | | Use reproducible builds and determinism checks (e.g., compare build outputs across trusted builders). |
| 20 | | |
| 21 | | Consider maintaining a private mirror of trusted source code, and pin hash checks yourself. |
| 22 | | |
| 23 | | Use content scanning tools (e.g., static analyzers) on all .tar.gz and Git checkouts. |
| 24 | | |
| 25 | | 2. Compromise via Channel Updates |
| | 14 | '''Mitigations:''' |
| | 15 | |
| | 16 | * Use guix build --source with hash-locked package definitions (content-addressed derivations). |
| | 17 | |
| | 18 | * Use reproducible builds and determinism checks (e.g., compare build outputs across trusted builders). |
| | 19 | |
| | 20 | * Consider maintaining a private mirror of trusted source code, and pin hash checks yourself. |
| | 21 | |
| | 22 | * Use content scanning tools (e.g., static analyzers) on all .tar.gz and Git checkouts. |
| | 23 | |
| | 24 | ==== Compromise via Channel Updates |
| | 25 | |
| 30 | | β
Mitigations: |
| 31 | | |
| 32 | | Use a pinned commit hash in your channels.scm. |
| 33 | | |
| 34 | | Verify the channel commit with signed Git commits or tags (Guix supports this). |
| 35 | | |
| 36 | | Host your own internal Guix channel for critical environments β control what definitions are trusted. |
| 37 | | |
| 38 | | Use guix time-machine to avoid rolling updates. |
| 39 | | |
| 40 | | 3. Media Transfer Risks (USB, SD cards) |
| | 30 | '''Mitigations:''' |
| | 31 | |
| | 32 | * Use a pinned commit hash in your channels.scm. |
| | 33 | |
| | 34 | * Verify the channel commit with signed Git commits or tags (Guix supports this). |
| | 35 | |
| | 36 | * Host your own internal Guix channel for critical environments β control what definitions are trusted. |
| | 37 | |
| | 38 | * Use guix time-machine to avoid rolling updates. |
| | 39 | |
| | 40 | ==== Media Transfer Risks (USB, SD cards) |
| | 41 | |
| 43 | | β
Mitigations: |
| 44 | | |
| 45 | | Always format and scan USB media on a controlled, known-clean staging machine before inserting into classified systems. |
| 46 | | |
| 47 | | Use write-once optical media (DVD-R) where appropriate for immutable transfer. |
| 48 | | |
| 49 | | Prefer hash verification of transferred files (sha256sum sources.nar) using offline-known-good hashes. |
| 50 | | |
| 51 | | 4. Build Environment Leakage |
| | 44 | '''Mitigations:''' |
| | 45 | |
| | 46 | * Always format and scan USB media on a controlled, known-clean staging machine before inserting into classified systems. |
| | 47 | |
| | 48 | * Use write-once optical media (DVD-R) where appropriate for immutable transfer. |
| | 49 | |
| | 50 | * Prefer hash verification of transferred files (sha256sum sources.nar) using offline-known-good hashes. |
| | 51 | |
| | 52 | ==== Build Environment Leakage |
| | 53 | |
| 54 | | β
Mitigations: |
| 55 | | |
| 56 | | Use guix build inside a dedicated, minimal, reproducible system (e.g., a guix system vm). |
| 57 | | |
| 58 | | Enable build sandboxing (enabled by default in Guix). |
| 59 | | |
| 60 | | Disable networking in builders if not already (Guix does this by default, but confirm your configuration). |
| 61 | | |
| 62 | | Consider full-disk encryption for the build system. |
| 63 | | |
| 64 | | 5. Tampered Nar Archives |
| | 56 | '''Mitigations:''' |
| | 57 | |
| | 58 | * Use guix build inside a dedicated, minimal, reproducible system (e.g., a guix system vm). |
| | 59 | |
| | 60 | * Enable build sandboxing (enabled by default in Guix). |
| | 61 | |
| | 62 | * Disable networking in builders if not already (Guix does this by default, but confirm your configuration). |
| | 63 | |
| | 64 | * Consider full-disk encryption for the build system. |
| | 65 | |
| | 66 | ==== Tampered Nar Archives |
| | 67 | |
| 67 | | β
Mitigations: |
| 68 | | |
| 69 | | Sign the archive on the export side and verify the signature on the import side. |
| 70 | | |
| 71 | | Use GPG or minisign for signing hashes. |
| 72 | | |
| 73 | | Maintain a hash whitelist of approved .nar files on the classified system. |
| 74 | | |
| 75 | | Store all .nar imports in a sealed append-only log for auditing. |
| 76 | | |
| 77 | | β
High-Security Recommendations for Guix in Classified Environments |
| 78 | | |
| 79 | | Concern Recommendation |
| 80 | | Source authenticity Use fixed-output derivations with pinned hashes |
| 81 | | Package definition trust Host internal Guix channel; pin commit hashes |
| 82 | | Archive integrity Sign .nar files and verify signatures |
| 83 | | Reproducibility Use multiple offline builders to cross-check outputs |
| 84 | | Logging Keep an audit trail of all imports and builds |
| 85 | | Isolation Build in virtual machines or system containers with no network |
| 86 | | Transfer media Sanitize USBs or use write-once optical media |
| 87 | | User separation Separate users for import, build, audit, and deployment tasks |
| 88 | | π Final Thoughts |
| | 70 | '''Mitigations:''' |
| | 71 | |
| | 72 | * Sign the archive on the export side and verify the signature on the import side. |
| | 73 | |
| | 74 | * Use GPG or minisign for signing hashes. |
| | 75 | |
| | 76 | * Maintain a hash whitelist of approved .nar files on the classified system. |
| | 77 | |
| | 78 | * Store all .nar imports in a sealed append-only log for auditing. |
| | 79 | |
| | 80 | == High-Security Recommendations for Guix in Classified Environments |
| | 81 | |
| | 82 | || Concern || Recommendation || |
| | 83 | || Source authenticity || Use fixed-output derivations with pinned hashes || |
| | 84 | || Package definition trust || Host internal Guix channel; pin commit hashes || |
| | 85 | || Archive integrity || Sign .nar files and verify signatures || |
| | 86 | || Reproducibility || Use multiple offline builders to cross-check outputs || |
| | 87 | || Logging || Keep an audit trail of all imports and builds || |
| | 88 | || Isolation || Build in virtual machines or system containers with no network || |
| | 89 | || Transfer media || Sanitize USBs or use write-once optical media || |
| | 90 | || User separation || Separate users for import, build, audit, and deployment tasks || |
| | 91 | |
| | 92 | == Final Thoughts |
| | 93 | |