Skip to content

Pulasthi91/cmmc-enclave-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”’ CMMC Enclave Toolkit

An open-source, affordable CUI enclave architecture and scoping toolkit for small and medium-sized DoD contractors pursuing CMMC Level 2 compliance.

License: MIT NIST SP 800-171 CMMC Level 2 Python 3.8+


🎯 Problem Statement

The Department of Defense's Cybersecurity Maturity Model Certification (CMMC) program requires approximately 80,000–100,000 small and medium-sized businesses (SMBs) in the Defense Industrial Base (DIB) to achieve verified cybersecurity compliance under NIST SP 800-171.

The primary challenge for SMBs:

  • Commercial CUI enclave solutions cost $50,000–$300,000+ per year β€” unaffordable for most small contractors
  • No standardized open-source methodology exists for accurately scoping CUI/FCI environments
  • Contractors either over-scope (wasting resources) or under-scope (creating security gaps)

This toolkit solves both problems β€” for free.


πŸ› οΈ What This Toolkit Provides

Component Description
πŸ—‚οΈ CUI/FCI Scoping Tool Python CLI that walks contractors through a structured questionnaire to accurately identify and document their CMMC assessment scope
🐳 Docker CUI Enclave Ready-to-deploy Docker Compose stack implementing an isolated CUI processing environment on commodity Linux hardware
πŸ“‹ NIST 800-171 Control Mapping Enclave architecture mapped to all 110 NIST SP 800-171 Rev 3 controls
πŸ“„ Scoping Report Generator Auto-generates a formatted PDF/Markdown scoping report for CMMC assessment submission
πŸ”§ Hardening Scripts Bash scripts for Linux host hardening aligned to CMMC Level 2 requirements

πŸš€ Quick Start

1. Run the CUI/FCI Scoping Assessment

# Clone the repository
git clone https://github.com/Pulasthi91/cmmc-enclave-toolkit.git
cd cmmc-enclave-toolkit

# Install dependencies
pip install -r requirements.txt

# Run the interactive scoping questionnaire
python scoping_tool/scope_assessment.py

The tool will guide you through a structured questionnaire and generate a scoping report in reports/.

2. Deploy the CUI Enclave (Docker)

# Review and configure environment variables
cp enclave/.env.example enclave/.env
nano enclave/.env

# Build and launch the enclave stack
cd enclave
docker compose up -d

# Verify services are running
docker compose ps

πŸ“‚ Repository Structure

cmmc-enclave-toolkit/
β”œβ”€β”€ README.md
β”œβ”€β”€ LICENSE
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ SECURITY.md
β”œβ”€β”€ requirements.txt
β”‚
β”œβ”€β”€ scoping_tool/                  # CUI/FCI Scoping Assessment CLI
β”‚   β”œβ”€β”€ scope_assessment.py        # Main CLI entry point
β”‚   β”œβ”€β”€ questions/
β”‚   β”‚   β”œβ”€β”€ system_inventory.py    # Asset & system questions
β”‚   β”‚   β”œβ”€β”€ data_flow.py           # CUI/FCI data flow questions
β”‚   β”‚   β”œβ”€β”€ boundary.py            # System boundary questions
β”‚   β”‚   └── access_control.py     # User access questions
β”‚   β”œβ”€β”€ reports/
β”‚   β”‚   β”œβ”€β”€ report_generator.py    # Report generation engine
β”‚   β”‚   └── templates/             # Report templates
β”‚   └── utils/
β”‚       β”œβ”€β”€ scoring.py             # Scope scoring logic
β”‚       └── nist_mapper.py         # NIST 800-171 control mapper
β”‚
β”œβ”€β”€ enclave/                       # Docker CUI Enclave Stack
β”‚   β”œβ”€β”€ docker-compose.yml         # Main compose file
β”‚   β”œβ”€β”€ .env.example               # Environment variable template
β”‚   β”œβ”€β”€ docker/
β”‚   β”‚   β”œβ”€β”€ Dockerfile.cui-host    # Hardened CUI host image
β”‚   β”‚   β”œβ”€β”€ Dockerfile.audit       # Audit/logging container
β”‚   β”‚   └── Dockerfile.vpn         # VPN gateway container
β”‚   β”œβ”€β”€ configs/
β”‚   β”‚   β”œβ”€β”€ auditd.rules           # Linux audit rules (NIST AC/AU controls)
β”‚   β”‚   β”œβ”€β”€ sysctl.conf            # Kernel hardening parameters
β”‚   β”‚   β”œβ”€β”€ pam.d/                 # PAM authentication config
β”‚   β”‚   └── rsyslog.conf           # Centralized logging config
β”‚   └── scripts/
β”‚       β”œβ”€β”€ host_harden.sh         # Linux host hardening script
β”‚       β”œβ”€β”€ network_segmentation.sh # Network isolation setup
β”‚       └── verify_controls.sh     # Post-deployment control verification
β”‚
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ architecture.md            # Enclave architecture overview
β”‚   β”œβ”€β”€ nist-control-mapping.md    # Full NIST 800-171 control mapping
β”‚   β”œβ”€β”€ deployment-guide.md        # Step-by-step deployment guide
β”‚   β”œβ”€β”€ scoping-guide.md           # How to use the scoping tool
β”‚   └── faq.md                     # Common questions
β”‚
└── tests/
    β”œβ”€β”€ test_scoping.py            # Scoping tool unit tests
    └── test_controls.py           # Control verification tests

πŸ—οΈ Enclave Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  INTERNET / CORPORATE NETWORK        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
                    β”‚  VPN Gateway β”‚  (WireGuard)
                    β”‚  Container  β”‚
                    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                           β”‚  Encrypted tunnel only
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚     CUI ENCLAVE         β”‚  Docker network: cui-net
              β”‚  (Isolated Subnet)      β”‚  172.20.0.0/24
              β”‚                         β”‚
              β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
              β”‚  β”‚  CUI Workstation β”‚   β”‚  Hardened Ubuntu 22.04
              β”‚  β”‚  Container      β”‚   β”‚  No internet access
              β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
              β”‚           β”‚            β”‚
              β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
              β”‚  β”‚  Audit & Log    β”‚   β”‚  auditd + rsyslog
              β”‚  β”‚  Container      β”‚   β”‚  Immutable log store
              β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚   NON-CUI NETWORK       β”‚  Docker network: std-net
              β”‚   (Standard systems)    β”‚  172.19.0.0/24
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The enclave isolates CUI processing to a dedicated Docker network with no direct internet access, enforced through iptables rules and Docker network policies. All access is via encrypted VPN tunnel. Audit logs are shipped to an immutable syslog container.


πŸ“‹ NIST SP 800-171 Control Coverage

This toolkit addresses controls across the following NIST SP 800-171 Rev 3 families:

Control Family Controls Addressed Implementation
Access Control (AC) AC.1.001 – AC.2.006 PAM config, Docker user namespaces
Audit & Accountability (AU) AU.2.041 – AU.3.045 auditd rules, centralized logging
Configuration Management (CM) CM.2.061 – CM.3.068 Dockerfile hardening, sysctl
Identification & Authentication (IA) IA.3.083 – IA.3.086 MFA enforcement, PAM
System & Comm. Protection (SC) SC.3.177 – SC.3.187 Network segmentation, TLS
System & Info. Integrity (SI) SI.1.210 – SI.2.214 File integrity, patch management

See docs/nist-control-mapping.md for the full mapping.


⚠️ Disclaimer

This toolkit is provided as a starting point and educational resource for organizations pursuing CMMC compliance. It is not a substitute for a formal CMMC assessment by a Certified Third-Party Assessment Organization (C3PAO). Organizations must validate their implementation against CMMC requirements with qualified assessors.


🀝 Contributing

Contributions are welcome. Please read CONTRIBUTING.md before submitting pull requests. Areas where help is most needed:

  • Additional scoping question modules
  • Windows Server enclave variant
  • Terraform/cloud deployment option
  • Translation of documentation

πŸ“œ License

MIT License β€” see LICENSE. Free for use by any organization.


πŸ‘€ Author

Pulasthi Batuwita Cybersecurity Analyst | CMMC Practitioner | (ISC)Β² SSCP | RHCSA


πŸ“š References

About

Open-source CUI enclave architecture and scoping toolkit for CMMC Level 2 compliance

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors