This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Produce Well-Secured Software (PW)

Produce Well-Secured Software (PW) during the code and pre-build CI/CD Steps

Produce Well-Secured Software (PW)

Organizations should produce well-secured software with minimal security vulnerabilities in its releases.


PW.1

Design Software to Meet Security Requirements and Mitigate Security Risks: Identify and evaluate the security requirements for the software; determine what security risks the software is likely to face during operation and how the software’s design and architecture should mitigate those risks; and justify any cases where risk-based analysis indicates that security requirements should be relaxed or waived. Addressing security requirements and risks during software design (secure by design) is key for improving software security and also helps improve development efficiency.


Tasks Tools

PW.1.1: Use forms of risk modeling – such as threat modeling, attack modeling, or attack surface mapping – to help assess the security risk for the software.


PW.1.2: Track and maintain the software’s security requirements, risks, and design decisions.


PW.1.3: Where appropriate, build in support for using standardized security features and services (e.g., enabling software to integrate with existing log management, identity management, access control, and vulnerability management systems) instead of creating proprietary implementations of security features and services.

OWASP Threat Dragon

Used before coding to document system components, data flows, and trust boundaries, then enumerate threats and requirements.

OWASP Amass

Helps define security requirements by identifying known external dependencies, APIs, or services that code will interact with, which informs threat modeling and secure design.

CAIRIS

Helps security teams and developers capture, manage, and trace security requirements from initial design through development, ensuring prebuild security alignment.

Threagile

Enables “threat modeling as code” in prebuild, so security requirements can be automated and version-controlled alongside application code.

Open-Needs

Centralizes and structures security requirements so they are available for threat modeling, design reviews, and early validation.

rmtoo

Useful at the design and planning phase to maintain a structured list of security requirements and link them to test cases, threat models, or code modules, ensuring security is addressed before coding.

OpenRMF® OSS

In prebuild, it can define the exact RMF-derived security requirements the codebase must meet, including control baselines, and link them to design elements or development tasks.


PW.2

Review the Software Design to Verify Compliance with Security Requirements and Risk Information: Help ensure that the software will meet the security requirements and satisfactorily address the identified risk information.


Tasks Tools

PW.2.1: Have 1) a qualified person (or people) who were not involved with the design and/or 2) automated processes instantiated in the toolchain review the software design to confirm and enforce that it meets all of the security requirements and satisfactorily addresses the identified risk information.

OWASP Dependency-Check

Scans project dependencies (direct and transitive) against the National Vulnerability Database (NVD) and other sources to detect known vulnerabilities (CVEs). Helps confirm if a component meets security requirements before inclusion.

Dependabot

Automated dependency monitoring and update tool integrated with GitHub. Detects vulnerable dependencies and creates pull requests to update them, ensuring only secure versions are used.

OpenRMF

Manages Risk Management Framework (RMF) compliance artifacts, including NIST 800-53 controls. Can be used to confirm that selected software components meet mandated security control baselines before approval.

ESLint

JavaScript/TypeScript linter that enforces secure coding standards and flags insecure coding patterns before they reach production. Helps validate that custom code components align with secure coding requirements.

LGTM

Automated code analysis platform for identifying vulnerabilities and code quality issues in multiple languages. Confirms code components meet security policies before integration.

Grype

Open-source vulnerability scanner for container images and file systems. Ensures that containerized components meet vulnerability and compliance requirements before deployment.

Clair

Static vulnerability analysis for container images. Integrates into CI/CD to detect vulnerabilities in base images and layered components before they’re promoted.

Trivy

Comprehensive vulnerability scanner for container images, file systems, and Git repositories. Validates that selected components have no known vulnerabilities or misconfigurations.

Checkov

Static analysis for Infrastructure as Code (IaC) to detect security misconfigurations (Terraform, Kubernetes, CloudFormation). Ensures that IaC components meet defined security baselines before use.

Terrascan

Policy-as-code scanner for Terraform, Kubernetes, Docker, and other IaC frameworks. Confirms that infrastructure components comply with security and compliance requirements.

Gerrit

Web-based code review tool. While not a vulnerability scanner, it enforces human review and approval workflows that can include security requirement validation checklists before component approval.


PW.4

Reuse Existing, Well-Secured Software When Feasible Instead of Duplicating FunctionalityLower the costs of software development, expedite software development, and decrease the likelihood of introducing additional security vulnerabilities into the software by reusing software modules and services that have already had their security posture checked. This is particularly important for software that implements security functionality, such as cryptographic modules and protocols.


Tasks Tools

PW.4.1: Acquire and maintain well-secured software components (e.g., software libraries, modules, middleware, frameworks) from commercial, opensource, and other third-party developers for use by the organization’s software.


PW.4.2: Create and maintain well-secured software components in-house following SDLC processes to meet common internal software development needs that cannot be better met by third-party software components.


PW.4.3: Moved to PW.4.4


PW.4.4: Verify that acquired commercial, open-source, and all other third-party software components comply with the requirements, as defined by the organization, throughout their life cycles.

CycloneDX

Generated during build/prebuild to validate component data against defined acceptance criteria.

SPDX

Used to verify that all components meet licensing and security requirements before integration.

ArtifactHub

Ensures only vetted, signed, and policy-compliant packages are sourced for builds.

JFrog Artifactory OSS

Acts as a controlled source for components meeting defined security standards.

Sonatype Nexus OSS

Prevents use of components that fail security requirements or policy checks.

Harbor

Enforces rules that only scanned, signed, and policy-compliant images are stored and used in builds.

GitLab Signing

nforces signed commit policy in merge requests before code is accepted.

GitHub CodeQL

Runs in CI to check code against predefined security queries before integration.

AquaSec Trivy

Enforces security acceptance criteria (e.g., no critical CVEs) before promoting components.

Dependabot

Creates PRs to meet policy-defined security versions.

Allstar

Ensures repositories meet defined configuration criteria before allowing merges.

OWASP SAMM

Provides a framework to define security assurance practices and maturity targets. Helps establish criteria for secure development processes, including prebuild checks.

OWASP ASVS

Defines detailed security verification requirements for applications. Can be used as a benchmark for automated and manual prebuild security tests.

OWASP Defectdojo

Vulnerability management and security test orchestration platform. Centralizes results from scanners and ensures issues are tracked against acceptance criteria.

OWASP Dependency-Check

Scans project dependencies for known vulnerabilities (CVEs) and fails builds if they don’t meet criteria.

Git

VCS that supports commit signing and hooks to enforce prebuild checks (linting, security scans).

Gitea

Lightweight, self-hosted Git service with repository policy enforcement (e.g., signed commits, review requirements).

GitLab (Community Edition)

Git platform with CI/CD integration for running security checks before merging.

Visual Studio Code

Supports extensions for linting, vulnerability scanning, and code signing enforcement pre-commit.

Eclipse

Java IDE with plugins for static analysis, dependency scanning, and secure coding rule enforcement.

IntelliJ IDEA (Community Edition)

Java IDE with plugins for static analysis, secure coding, and SBOM generation.

JUnit

Java unit testing framework; can integrate with security test suites.

NUnit

NET testing framework; supports integration with security validation tests.

Pytest

Python testing framework; can run security rule-based tests as part of CI.

Selenium

Automated browser testing tool; can validate secure behavior (e.g., auth flows).

Playwright

End-to-end browser testing with support for security-focused scenarios.

OWASP ZAP

Dynamic Application Security Testing (DAST) tool for finding security issues in running apps during testing stages.

TestNG

Testing framework for Java; integrates with security automation.

Cucumber

BDD testing framework; can define security acceptance tests in plain language.

Aqua Trivy

Scans containers, file systems, and repos for vulnerabilities and misconfigurations.

Clair

Static vulnerability scanning for container images before deployment.

Grype

Vulnerability scanner for containers and filesystems.

Bandit for Python

Python-specific static analyzer for common security issues.

Semgrep

Multi-language static analysis using custom or predefined security rules.

Brakeman

Rails-specific static analyzer for security vulnerabilities.

Gitleaks

Detects hardcoded secrets in Git repositories pre-commit or in CI.

TruffleHog

Detects secrets and sensitive information in code history and commits.

Sigstore

Open-source framework for signing software artifacts (commits, containers) using cryptographic proofs.

OWASP Dependency-Check

Scans project dependencies (direct and transitive) for known CVEs using NVD and other sources. Can enforce “no critical/high vulnerabilities” criteria before the build passes.

OSS Review Toolkit (ORT)

Ensures that selected components meet license and security criteria before merging into mainline.

FOSSA (Community Edition)

Can block merges or builds that violate licensing rules or contain known vulnerabilities.

ScanCode Toolkit

Ensures licensing criteria are met before components are accepted into the build.

Tern

Provides component inventory to validate against predefined acceptance criteria.

Open Policy Agent (OPA)

Enforces security, compliance, and configuration policies during CI/CD gates before release.

PW.5 Create Source Code by Adhering to Secure Coding Practices: Decrease the number of security vulnerabilities in the software, and reduce costs by minimizing vulnerabilities introduced during source code creation that meet or exceed organization-defined vulnerability severity criteria.


Tasks Tools
PW.5.1:

PW.5.1 Follow all secure coding practices that are appropriate to the development languages and environment to meet the organization’s requirements.

Semgrep

egrated into CI to scan changed code and block merges if rules fail; can also run locally for pre-commit checks.

Bandit for Python

Runs in prebuild to fail pipelines when high-severity issues are found in Python code.

FindBugs

Scans Java code before packaging to find vulnerabilities and bad coding practices.

SpotBugs

Integrated into CI to detect Java vulnerabilities pre-release.

SonarQube

Runs in CI to flag security issues before merges; supports quality gates for enforcement.

OWASP ZAP

Can run in test environments before production release to catch runtime security issues.

Arachni

Runs against staging/test instances before deployment to catch exploitable issues.

OWASP Dependency-Check

Blocks builds that include components with vulnerabilities exceeding severity thresholds.


PW.6 Configure the Compilation, Interpreter, and Build Processes to Improve Executable Security: Decrease the number of security vulnerabilities in the software and reduce costs by eliminating vulnerabilities before testing occurs.


Tasks Tools

PW.6.1: Use compiler, interpreter, and build tools that offer features to improve executable security


PW.6.2: Determine which compiler, interpreter, and build tool features should be used and how each should be configured, then implement and use the approved configurations.

Sigstore Cosign

Signs and verifies the integrity/authenticity of source code and pre-built dependencies before compiling.

GnuPG (GPG)

Verifies cryptographic signatures of source tarballs and dependencies before build.

OSS Review Toolkit (ORT)

Scans and audits dependencies for licensing and security issues before they are included in a build.

Meson

Integrated into CI to detect Java vulnerabilities pre-release.

Tern

Analyzes container image layers to identify open-source components and licensing before using as a base for builds.

ScanCode Toolkit

Detects licenses, copyrights, and packages in source code before build to ensure compliance and security.

Grype

Scans source code and container base images for known vulnerabilities before they are included in builds.

Syft

Generates SBOMs from source code and dependencies before build to document and verify components.

PW.7

Review and/or Analyze Human-Readable Code to Identify Vulnerabilities and Verify Compliance with Security Requirements: Help identify vulnerabilities so that they can be corrected before the software is released to prevent exploitation. Using automated methods lowers the effort and resources needed to detect vulnerabilities. Human-readable code includes source code, scripts, and any other form of code that an organization deems humanreadable.


Tasks Tools

PW.7.1 Determine whether code review (a person looks directly at the code to find issues) and/or code analysis (tools are used to find issues in code, either in a fully automated way or in conjunction with a person) should be used, as defined by the organization.


PW.7.2: Perform the code review and/or code analysis based on the organization’s secure coding standards, and record and triage all discovered issues and recommended remediations in the development team’s workflow or issue tracking system.

OWASP Dependency-Check

Scans project dependencies (e.g., Maven, npm, Python) against the NVD for known CVEs before build, enabling early remediation of vulnerable libraries.

OWASP ZAP

Primarily a dynamic application security testing (DAST) tool, but in a pre-build sense, it’s not generally used — can be run against local development builds for early runtime flaw detection. Limited PW.7 pre-build applicability.

SonarQube

Performs SAST and code quality checks for many languages, detecting vulnerabilities, bugs, and code smells before compilation or integration.

Retire.js

Scans JavaScript code and package manifests for known vulnerable libraries before packaging.

Fossa Community Edition

Performs dependency scanning for license and vulnerability issues before build. Commercial SaaS version is proprietary.

Semgrep

Lightweight, customizable SAST tool. Uses rules to detect security issues and anti-patterns in source code before build.

Bandit for Python

Scans Python source for common security issues before build (e.g., insecure function usage, hardcoded passwords).

Checkmarx KICS

Static analysis tool for IaC (Terraform, Kubernetes YAML, etc.) to find misconfigurations before deployment.

Cppcheck for C++

Static analysis for C/C++ source to catch undefined behavior, memory issues, and common security flaws before compilation.

FindSecBugs

A plugin for SpotBugs to detect Java-specific security vulnerabilities before build.

GitHub CodeQL

Performs deep semantic code analysis using a query language to detect vulnerabilities before build. Excellent for automated SAST in CI pipelines.

PMD

Scans Java, Apex, JavaScript, XML, and other code for bugs, unused code, and potential security issues before compilation.

SpotBugs

Static analysis for Java bytecode; detects bug patterns and potential vulnerabilities pre-build (when run on compiled class files in CI before packaging).

Danger JC

Automates pull request checks — enforces security/contribution guidelines, prevents insecure patterns from merging into code before build.


PW.8

Test Executable Code to Identify Vulnerabilities and Verify Compliance with Security Requirements: Help identify vulnerabilities so that they can be corrected before the software is released in order to prevent exploitation. Using automated methods lowers the effort and resources needed to detect vulnerabilities and improves traceability and repeatability. Executable code includes binaries, directly executed bytecode and source code, and any other form of code that an organization deems executable.


Tasks Tools

PW.8.1: Determine whether executable code testing should be performed to find vulnerabilities not identified by previous reviews, analysis, or testing and, if so, which types of testing should be used.


PW.8.2: Scope the testing, design the tests, perform the testing, and document the results, including recording and triaging all discovered issues and recommended remediations in the development team’s workflow or issue tracking system.

Semgrep

SAST engine that scans source code against security rules before build, catching vulnerabilities early.

Bandit (Python)

Static analysis for Python code to find common security issues before packaging.

FindSecBugs

Security plugin for SpotBugs to detect vulnerabilities in Java/Scala/Groovy code pre-build.

Cppcheck

Static analysis for C/C++ to detect security flaws before compilation artifacts are built.

PMD

Rule-based static analysis for Java, Apex, JavaScript, and XML for vulnerabilities and coding issues.

SpotBugs

General bug and vulnerability detection in Java code before build output.

GitHub CodeQL

Semantic code analysis to find vulnerabilities before build.

OWASP Dependency-Check

SCA tool that identifies vulnerable dependencies in manifests before packaging.

Retire.js

Scans JavaScript and Node.js dependencies for known vulnerabilities before release.

Grype

SSCA tool for scanning source code dependencies and base images pre-build for CVEs.

Syft

Generates SBOMs from source code before build to verify component inventory.

Checkmarx KICS

Scans Infrastructure-as-Code files for misconfigurations before deployment.

Gitleaks

Searches code and git history for secrets before build.

TruffleHog

Searches code and git history for secrets before build.

PW.9

Configure Software to Have Secure Settings by Default: Help improve the security of the software at the time of installation to reduce the likelihood of the software being deployed with weak security settings, putting it at greater risk of compromise.


Tasks Tools

PW.9.1: Define a secure baseline by determining how to configure each setting that has an effect on security or a security-related setting so that the default settings are secure and do not weaken the security functions provided by the platform, network infrastructure, or services.


PW.9.2: Implement the default settings (or groups of default settings, if applicable), and document each setting for software administrators.

KICS (Checkmarx)

Finds misconfigurations and insecure defaults in IaC files before build.

Open Policy Agent (OPA)

Policy-as-code engine to enforce secure configuration rules in pre-build pipelines.

Yamllint

Validates YAML configuration files, ensuring structure correctness before further security rule checks.