Coding Standard

A formally defined coding standard establishes the rules, conventions, and constraints that govern how software is written across the mission's development program, directly influencing the security, maintainability, and verifiability of the delivered system. The standard must specify acceptable programming language types, with language selection driven by a documented evaluation of security requirements, application complexity, scalability needs, available development resources, schedule constraints, and the availability of security-relevant language features such as memory safety, type safety, and bounds checking. Language choices that introduce classes of vulnerability by design, such as languages without memory safety guarantees used in contexts where memory corruption is a plausible attack vector, require explicit justification and compensating controls. The coding standard must include security-relevant rules for input validation, error handling, cryptographic usage, memory management, and concurrency, as applicable to the selected languages and system design. Adherence should be evaluated through automated means where supported, supplemented by manual review for requirements that cannot be reliably automated.

ID: CM0017
Tier: I
Ground CM 
Created: 2022/10/19
Last Modified: 2026/08/06

Pre-Operations Government

Acquisition requirements should mandate that contractors define, document, and submit a coding standard as a controlled program deliverable, with the standard required to address both language selection rationale and security-relevant coding rules applicable to the mission's software. Requirements should specify that the coding standard include automated enforcement mechanisms, such as static analysis rule sets or linting configurations, so that compliance can be objectively measured and reported rather than attested to informally. Contract language should require government review and approval of the coding standard before software development begins, and should treat subsequent revisions as configuration changes subject to the same review process. Flow-down provisions should require that all subcontractors developing software for the mission adhere to the approved coding standard, with compliance evidence included in subcontractor deliverables. Evaluation criteria should assess offerors' proposed coding standards, their automated enforcement toolchains, and their demonstrated experience applying security-focused coding standards to safety- and security-critical software in comparable domains.

Pre-Operations Developer/Supplier

Coding standard development should begin during the system design phase, before significant software development activity starts, so that language selection and coding rules are established as design decisions rather than imposed retroactively on an existing codebase. Language selection should be documented as a formal engineering trade, with the evaluation criteria explicitly including security properties such as memory safety, type system strength, and the availability of vetted cryptographic libraries, alongside functional and programmatic considerations. Coding-standard requirements that can be evaluated automatically should be implemented through approved static-analysis rules, linting configurations, or other build-pipeline checks. Requirements that cannot be reliably automated should be supported through documented review procedures. Security-specific rules within the standard should address the weakness classes identified as highest priority for the mission and should include both prohibited constructs and required patterns for security-sensitive operations. The standard should be version-controlled, with changes linked to the design or threat model inputs that motivated them and communicated to all developers before taking effect.