CMMC Level 2: What Your Code Has to Show

CMMC Level 2 requirements apply to DoD contracts that handle CUI. Here's the control mapping every developer on a defense program needs to understand.

DevSecCode Team · · Compliance · 9 min read

Prepare your codebase for a CMMC Level 2 assessment

  1. Run the CMMC preset scan against your codebase. Use a scanner whose findings you can trace to NIST 800-171 Rev 2 practices. Expect it to cover only the practices that translate to code, which are a subset of the 110.
  2. Map every finding to its NIST 800-171 practice number. Each finding must reference the specific practice (for example, SI.L2-3.14.1 or AC.L2-3.1.3). 'CWE-89 is a CMMC issue' is not assessment-grade evidence; 'CWE-89 maps to SI.L2-3.14.1' is.
  3. Triage and remediate the AC, IA, SI, and CA findings first. These four control families are where code-level findings concentrate, so start there.
  4. Export scan results for your assessment package. Export results in a standard format such as SARIF and attach them to your SSP as supporting evidence for your security assessment (CA.L2-3.12.1).
  5. Keep all scans local so CUI never leaves the build environment. Run the scanner and any AI-assisted fix generation on-device. Sending CUI source code to a cloud AI service puts CUI outside your assessed boundary unless that service is authorized to handle it.

CMMC Level 2: Your Code Is Part of the Evidence

The Department of Defense's Cybersecurity Maturity Model Certification (CMMC) Level 2 is no longer aspirational. CMMC began appearing in DoD contracts in late 2025, with Level 2 met by self-assessment in Phase 1. Phase 2, which would have added third-party C3PAO certification, was suspended on July 13, 2026, and a September 2026 class deviation directs contracting officers to remove third-party assessment requirements. DFARS 252.204-7012 and NIST SP 800-171 obligations still apply.

Most organizations focus on policy documentation and network controls. Assessors can also look for evidence in code and configuration, not just policy.

What Level 2 Requires at the Code Level

CMMC Level 2 maps to all 110 practices in NIST SP 800-171 Rev 2. A subset of those practices directly translate to software vulnerabilities:

AC.L2-3.1.3: Control CUI Flow

CWE mapping: CWE-284 (Improper Access Control), CWE-200 (Exposure of Sensitive Information)

If your application logs, transmits, or stores CUI without encryption or access gating, this practice is unmet. Regardless of what your SSP says. Assessors now ask for code evidence: show me the encryption call, show me the authorization check.

IA.L2-3.5.3: Multi-factor Authentication

CWE mapping: CWE-306 (Missing Authentication for Critical Function)

Authentication bypass vulnerabilities (CWE-306) are a direct AC/IA control failure. The check is not "do you have MFA enabled in your IdP". It is "does your code enforce authentication on every path that touches CUI."

SI.L2-3.14.1: Identify and Manage Information System Flaws

CWE mapping: CWE-1395 (Dependency on Vulnerable Third-Party Component)

Supply chain vulnerabilities in your dependency tree count as unmanaged flaws. If you have a known-CVE package in production and no evidence of triage, that's a Level 2 gap.

CA.L2-3.12.1: Periodically Assess Security Controls

This is the audit evidence requirement. You need artifacts showing you scanned, found issues, and remediated them. A SARIF export from a code scan is exactly this artifact.

The Assessment Reality

Policy alone isn't enough: code and configuration gaps can undercut what the policy claims. The gap between "we have a WAF" and "our input validation code is correct" is exactly what CMMC Level 2 tests.

How Deva Addresses This

Deva does not currently offer CMMC compliance mapping. On Pro, its cmmc scan preset selects a relevant rule set, and each finding carries a CWE ID, such as CWE-89 for SQL injection, that you can trace to the practices in your SSP.

SARIF export, on Pro, gives you a record of what was detected.

deva scan . --preset cmmc --format sarif --output cmmc-scan.sarif

The scan runs locally. No code leaves the machine. That matters for CUI.

Frequently asked questions

What is CMMC Level 2?
CMMC Level 2 is the Department of Defense's certification tier for contractors that handle Controlled Unclassified Information (CUI). It maps to all 110 practices in NIST SP 800-171 Rev 2 and is met by self-assessment in Phase 1. Phase 2 requirements for third-party C3PAO assessment were suspended in July 2026.
Which CMMC controls live in code, not policy?
The practices that translate directly to code findings include AC.L2-3.1.3 (control CUI flow), IA.L2-3.5.3 (multi-factor authentication), SI.L2-3.14.1 (flaw remediation), CA.L2-3.12.1 (control assessment), and AU.L2-3.3.1 (audit logging). Each maps to one or more CWE categories your scanner already detects.
Do CMMC assessments look at code?
They can. Assessors look for evidence that controls are implemented, and code and configuration gaps can undercut what a policy claims. Scan exports such as SARIF are one way to keep a record of that work, though no assessment requires them.
Can Deva run air-gapped for CMMC assessments?
Not as a turnkey setup. Static scanning runs on-device, so source code stays in the build environment, but Deva has no dedicated air-gapped mode and does not currently offer CMMC compliance mapping. Contact us about air-gapped deployments.

Related glossary terms