PW.7 Review and analyze human-readable code

PW.7 asks you to decide whether code review, static analysis or both fit your risk, then run them against your secure coding standards and record triaged results. This page explains how to meet it and what evidence an assessor expects.

On this page

What PW.7 code review and analysis requires in plain words

If a customer or agency has asked your team to satisfy SSDF PW.7, start by reading it as two tasks. PW.7.1 asks the organization to decide whether code review (a person reads the code), code analysis (tools check the code), or both should be used, and with what scope. PW.7.2 asks the organization to perform that review or analysis against its own secure coding standards, then record and triage the issues found. NIST describes the SSDF as outcome-based and not a checklist, so the decision in PW.7.1 is yours to make based on risk, cost, feasibility and applicability. Expect an assessor to ask why you chose the approach you did, not only whether a tool was installed.

The risk PW.7 addresses is simple to state: vulnerabilities and violations of security requirements that reach a release because nobody examined the human-readable code closely enough, or because the examination found problems that were never resolved. Code review and analysis are the checkpoints where those defects should be caught before they ship. The practical difficulty is rarely the purchase of a scanner. It is showing that the review happens consistently for every release, that it measures against your written secure coding standards, and that each finding has a recorded disposition, such as fixed, accepted with a reason, or deferred with an owner. Confirm with your assessor which of those records they expect to see, and how far back they will sample.

Which code, teams and tools fall under PW.7

PW.7 work is only as complete as its boundaries. The decisions below determine which code is reviewed or analyzed, against which standards, by whom, and where PW.7 stops and other practices begin. Write each one down before the first review runs, so the scope can be explained to an assessor or customer.

Repositories and languages in scope

List every repository that produces shipped or deployed software, then map each to the languages it contains. Static analysis coverage depends on language support, so confirm that each language in the list is supported by the analysis tool you select. Languages without support need a manual review method or a documented gap with a compensating control. Record the decision per repository so that a later addition of a service or language triggers a scope update rather than silently falling outside the review.

Semgrep language support

Secure coding standards that apply

PW.7.2 asks reviews and analysis to be performed against the organization's secure coding standards, so the standards must exist, be versioned and be named in the scope record. Identify which standard applies to each language and runtime, and which rules cover the issues your risk assessment highlights, such as input validation, authentication handling and secrets. A tool ruleset is not a standard in itself, so record how each custom or community rule traces back to a written requirement.

First-party, generated and infrastructure code

Decide explicitly whether code generated by build steps, scaffolding tools or AI coding assistants is reviewed, and whether infrastructure definitions such as Terraform are included. Generated files often bypass review because they are not written by hand, yet they can carry insecure defaults. Infrastructure as code is covered by the same review logic when it sets network exposure, identity or encryption. Write down which generated paths are excluded and the reason, such as the generator itself being reviewed instead.

Reviewer roles: developers, security or both

Decide who performs human review and who runs analysis tools. Developers can catch issues early, while security staff provide consistency and handle higher-risk changes. Many organizations use developers for routine changes and security staff for sensitive components, with the split written into the scope. Record the reviewer qualifications and the separation rule that stops authors from approving their own changes. Outsourced reviewers need the same written scope and access to the standards.

Boundary with PW.4 third-party components

Third-party and open-source components are handled under PW.4, which covers acquiring, maintaining and verifying them. PW.7 covers the human-readable code your organization writes or modifies. Write the boundary down: for example, vendored source copied into your repository may need PW.4 verification, and your own wrappers around it fall under PW.7. Without this line, the same file can be reviewed twice or skipped by both practices, so assign each path to one owner.

Protected branches as scope enforcement

Scope decisions only hold if changes cannot reach release branches without the required review. Use branch protection to restrict who can push or merge, block direct pushes to protected branches, and keep force pushes disabled unless explicitly approved. Evidence that these settings are active gives an assessor a repeatable control rather than a policy statement. Check the settings on each in-scope repository, since protection is often configured per project and can drift.

GitLab protected branches

How to decide between code review and static analysis

PW.7.1 asks the organization to decide whether code review, code analysis or both should be used for a given body of software, and with what scope. This is a documented risk decision, not a checkbox. A person reading code tends to catch logic flaws, broken authorization assumptions and insecure design choices that no tool checks for by default. Code analysis tools, by contrast, scale across every commit and apply known vulnerability patterns the same way every time, but they cannot judge whether a workflow does what the business intends. Most organizations need both, but the balance between them should follow from what each service does and what it would cost to get wrong.

A practical way to set scope is to sort repositories by risk and then match each tier to a method. Services that handle authentication, payment data, personal health information or privileged administration usually justify human review of security-relevant changes, because those are the places where a subtle logic error has the largest consequences. Lower-risk internal tools may get automated analysis on every merge request with human review reserved for high-impact changes. Feasibility matters too: a team with two reviewers who know the codebase has different options from a team that depends on an external firm. Ask who has the skills to review each language and framework, how long reviews take in practice, and whether the scanner's rule coverage fits the languages in use. Illustrative example: a payments service reviewed by a named security engineer on every change to its authorization module, while a documentation site runs only scanning in CI.

The decision record is itself evidence. For each service or repository group, document which method applies, the scope (for example, which directories, languages or change types are covered), who approved the choice, the risk reasoning and when it will be revisited. Assessors and customers reviewing PW.7 will look for this record before they look at findings. Keep it in version control next to the code so changes to scope leave a trace. Confirm with your own environment and your assessor how often the decision must be refreshed and who signs it off. The record should also state what is excluded and why, because an unexplained gap is harder to defend than a justified one.

How the PW.7.1 decision feeds the PW.7.2 review and triage cycle

The cycle starts with a decision record that states whether code review, code analysis or both will run, and with what scope. That record sets the secure coding standard the review checks against. Findings then move into triage, where each one gets an owner and a decision date, and fixes are verified. The retained records, including the scope and the triage outcomes, become the input to the next PW.7.1 decision, so check that each hand-off leaves a written artifact behind.

The PW.7.1 decision sets scope, and retained triage records inform the next cycle.

How an assessor tests PW.7 and what passes

This table compares each PW.7 task against the assessor's test approach, the evidence requested and the findings that most often fail. Read each row as a question the assessor will ask, then check that your records answer it without gaps. The main takeaway is that a review or scan that runs but leaves no recorded scope, results or triage decisions will usually fail, even when the tooling works.

Assessment areaWhat the assessor testsEvidence requestedCommon finding
PW.7.1 decision recordWhether the organization decided if code review, code analysis or both apply, and with what scopeWritten decision for each product or repository, with the risk reasoning and the components coveredScope left undocumented or inherited by default with no stated reason
Sampling of reviewed changesWhether the chosen review or analysis actually ran on sampled changes or releasesMerge or pull request records showing review approval, or CI logs showing analysis jobs on the sampled commitsChanges merged without any review or scan step, or scans that were configured but skipped
Comparison to secure coding standardsWhether reviews and analysis checked code against the organization's own secure coding standardThe current standard, the rule set or checklist used, and tool configuration showing which rules were enabledStandard exists but is not referenced by reviewers or tools, or rule sets are generic defaults
Recorded resultsWhether each review or analysis produced a record of what was examined and what was foundReview comments, tool reports or exported findings tied to a specific version or commitReviews with no recorded results, or results that cannot be linked to the code reviewed
Triage of issuesWhether each finding was classified by severity and disposition, such as fix, accept with reason or false positiveTriage log with owner, decision and date for each finding, including accepted-risk approvalsFindings closed without triage, or suppressed rules with no documented justification
Tracing to resolutionWhether fixes were made and verified, and whether accepted risks were reviewedLinked tickets or commits that remediate findings, and retest or rescan resultsFixes not traceable to a finding, or accepted risks never revisited
Related control contextHow the assessor may connect PW.7 to system and services acquisition controls in SP 800-53 (SA-11, SA-11(1), SA-11(4), SA-15(7))Developer security testing and review records that map to those control references in your own control setMapping asserted without evidence that the review or analysis process operates as described

Evidence that satisfies PW.7 and how to keep it current

PW.7 asks for two things to be provable: a documented decision about how code is reviewed or analyzed, and a record that the work was done against the organization's own secure coding standards. The cards below describe the artifacts that show both, and how to keep them dated and retrievable between assessments.

Signed PW.7.1 decision record

This record states whether code review, code analysis or both apply to each repository or product, and the scope of each. It should name the risk reasoning behind the choice, such as language mix, data sensitivity and release frequency, and carry an approval from a named owner. An assessor will check that the decision exists before reviewing the work it governs. Re-approve the record when the scope changes, and keep prior versions so the history of the decision can be shown.

SP 800-218 text

Secure coding standard version in force

Reviews and analysis are measured against the organization's secure coding standard, so the version that applied on each date matters. Keep the standard in version control with a changelog, and record which version each review or scan used. A standard edited after a finding was triaged can make the finding look unjustified unless the version is recorded. Ask whether the standard covers the languages in use, including infrastructure definitions, and whether exceptions are documented.

Analysis configuration and rule sets

Static analysis results are only as meaningful as the rules that produced them. Export the configuration file, the rule sets or rule identifiers enabled, the rule pack versions, and any suppressions with a reason and an owner. If a tool runs in CI, store the configuration in the repository so that changes appear in the commit history. An assessor may ask why a rule was disabled and who approved it, so keep that answer alongside the export.

Semgrep language support

Review records and pull request approvals

For code review, the evidence is the trail showing that a reviewer other than the author examined the change before it merged. Protected branch settings show whether direct pushes were blocked and whether approvals were required, and the merge request history shows who approved each change. Export these settings periodically, because a setting changed after a release does not show up in the release record. Confirm with your platform how approval rules and reviewer identity are logged.

GitLab protected branches

Triage log with owner, severity and disposition

Every issue a review or scan raises needs a record of who triaged it, how severe it was judged, and what was decided: fixed, accepted with a documented risk decision, or determined to be a false positive. PW.7.2 asks that issues be recorded and triaged, so an empty log for a busy repository invites questions. Keep the log exportable with dates, and make sure accepted-risk entries have an approver and a review date.

Linked fix commits and retained CI logs

The final link in the chain connects each triaged finding to the commit or merge request that fixed it, and to the CI job log that produced the original result. Retain CI logs for the period your audit scope requires, and confirm the retention setting in your platform because defaults vary. An assessor sampling a finding will want to walk from the triage entry to the fix and then to the scan output that raised it, so identifiers should match across systems.

How to implement PW.7 in sequence

This sequence turns PW.7 from a policy statement into a working routine: a documented decision on review and analysis, configured tooling, a repeatable review procedure, a triage workflow and a pilot that proves the routine works before it is relied on.

  1. Confirm the secure coding standard

    The engineering lead and security lead agree the secure coding standard that PW.7.2 will test against, covering the languages in use and the rules each one must follow, such as input validation, output encoding, authentication handling and secret management. Map each rule to a checkable form, either a human review checklist item or a tool rule. The output is a versioned standard document with an owner and a list of languages it covers. The step is done when every language in the codebase has a named section in the standard.

  2. Write the PW.7.1 decision with scope and rationale

    The security lead records whether code review, code analysis or both will be used for each repository or product, and the scope of each (for example, all changed code in pull requests, or full-codebase scans on release branches). The rationale should cover risk, cost, feasibility and applicability, since SP 800-218 leaves the method to the organization. The output is a signed decision record that names the reviewers or tools responsible and the repositories it covers. Confirm the decision with the product owners who will carry the workload.

  3. Configure analysis in the pipeline

    The platform engineer sets up the static analysis tooling in the CI/CD pipeline so that scans run on each merge request and on release branches. Check that the tool supports every language in scope. For Git-based workflows, protected branches prevent unreviewed changes from reaching release branches, which keeps the analysis results tied to the code that ships. The output is pipeline configuration committed to version control, a documented rule set mapped to the standard, and a test run showing scan output. Done when a deliberately insecure sample produces a finding.

  4. Define the review procedure and reviewer criteria

    The security lead writes the human review procedure: what a reviewer checks, which code paths require review (such as authentication, cryptography, data parsing and access control), how many reviewers approve a change, and what qualifies a person to act as reviewer. Reviewers should not be the change author. The output is a review procedure document and a reviewer roster with the training or experience each reviewer has. Done when the procedure has been read and acknowledged by each named reviewer.

  5. Set the triage workflow and severity definitions

    The product security team defines how each finding is recorded, who triages it, how severity is assigned, and the deadlines or review cadence for each severity level. Confirm the severity scale and response expectations with the engineering and risk owners before publishing them, since the organization sets these values. Findings from both tools and reviewers should land in one tracker with the same fields. The output is a triage procedure, a severity definition table and a tracker template. Done when a test finding has moved through every status in the workflow.

  6. Run a pilot on one product

    Select one product or repository and run the full routine for a defined period agreed by the project team. The pilot tests the standard, tool configuration, review procedure and triage workflow together, and records where reviewers disagree with tool output, where rules produce noise, and where the procedure is unclear. The output is a pilot log with findings, dispositions, false positive decisions and an issues list with owners. Adjust the documents and configuration from the log before wider rollout.

  7. Schedule evaluation and keep the evidence

    The security lead sets a recurring evaluation of the PW.7 decision, the standard, the rule set and the triage metrics, and records each review in a dated log. Evaluation should also follow significant changes to languages, frameworks or the threat landscape. The output is a review calendar, dated evaluation records and a current evidence pack containing the decision record, pipeline configuration, review records and triage history. Confirm with your assessor or customer which evidence format they expect before the first evaluation cycle.

Self-hosted open-source tools that support PW.7 evidence

PW.7 asks for two things: a decision about whether code review, code analysis or both fit the risk, and a record of what was reviewed or scanned and how issues were triaged. The tools below cover the parts that can be automated or enforced in your own infrastructure, while the decisions and the review judgment remain with your organization.

Protected branches in GitLab

GitLab Community Edition (MIT) includes protected branches, which let maintainers restrict which roles can push or merge to a branch. Setting push access to no one blocks direct pushes, so every change to a protected branch passes through a merge request where a reviewer can record approval. Force pushes stay disabled unless explicitly allowed, which protects the review history. Confirm that approval rules, required reviewers and branch settings are configured for every repository in scope, since protection applies only where it is set.

GitLab protected branches docs

Static analysis with Semgrep

Semgrep Community Edition (LGPL-2.1-only) scans source code in many languages, including C/C++, Java, JavaScript, TypeScript, Python, Go and Rust, using community rules or rules your team writes. Running it in CI/CD pipelines lets it scan repositories on every change, and the scan output can serve as a record of what was analyzed and what was flagged. Check that the languages in your codebase are supported, that the rulesets reflect your secure coding standards, and that findings are triaged rather than silently ignored. Confirm the license terms with your legal team before wide deployment.

Semgrep supported languages

Pipeline gates for analysis results

A scanner produces evidence only when its results block or route work. In a self-hosted CI/CD pipeline, configure the analysis job so that a failing scan stops the merge or requires a named reviewer to accept the finding with a reason. Record who triaged each issue, the decision taken and the date. This turns PW.7.2 from a scan that runs into a documented process for recording and triaging issues. Confirm how your pipeline stores scan output and how long those records are retained under your own policy.

Endpoint vulnerability detection with Wazuh

Wazuh (GPL-2.0-only) correlates the software inventory collected by each agent with its vulnerability repository, or a locally hosted offline copy, to identify vulnerabilities in the operating system and installed applications of monitored endpoints. This supports vulnerability management and response on endpoints, which are adjacent to PW.7. It does not review or analyze the source code your team writes, so do not present it as PW.7 evidence. Confirm the license obligations that apply to your deployment and whether an offline vulnerability copy fits your network rules.

Wazuh vulnerability detection docs

Host software inventory with Fleet

Fleet (MIT) matches software installed on enrolled hosts against sources including the NVD, OVAL definitions, Microsoft security bulletins, Amazon Linux advisories and OSV. It helps identify vulnerable software that workstations and servers are running. This supports the wider vulnerability handling process, but it covers installed packages rather than code your organization develops, so it sits beside PW.7 rather than inside it. Confirm which advisory sources cover your operating systems and how findings flow into your triage process.

Fleet vulnerability processing guide

What meeting PW.7 costs in money and effort

This table compares the main cost components of meeting PW.7, showing who is paid, whether each cost is one-time or recurring, and what drives it up. Use it to structure a written scope and to ask vendors and partners for line-item quotes. No figures are given here, so the size of each cost depends on your own codebase and risk profile.

Cost componentWho is paid or who bears itOne-time or recurringMain drivers and how to reduce cost
Analysis tooling or licensesTool vendor or open-source maintainers; internal team for configurationOpen-source tools remove license spend but not setup. Setup is one-time, tuning is recurringLanguage count and rule sets. Reduce cost by standardizing on fewer languages and maintaining a small custom rule library
Reviewer engineering timeInternal developers or security engineers performing reviewsRecurring, tied to each change setChange volume, codebase size and reviewer seniority. Reduce cost by scoping reviews to security-relevant changes
Tool configuration and tuningInternal platform or DevSecOps team, or an implementation partner under a written scopeOne-time build, then recurring tuning as rules and code changeNumber of pipelines and false positives. Reduce cost by suppressing noise with documented triage rules
Triage and remediation timeDevelopers who fix findings; security staff who triage themRecurringNumber of findings and severity mix. Reduce cost by fixing root-cause patterns and tracking recurring issue classes
Evidence upkeepInternal compliance or engineering staffRecurring, at each release or review cycleNumber of repositories and how review records are stored. Reduce cost by automating records in the CI/CD system
External secure code review or testingIndependent security firm or consultant, under a fixed-scope agreementUsually one-time per engagement, sometimes repeated on a scheduleCodebase size, language mix and depth of manual review. Reduce cost by targeting high-risk modules
Assessor samplingIndependent assessor or auditor, billed under its own engagement termsRecurring at each assessment cycleSample size and how easily records can be retrieved. Reduce cost by keeping review records complete and indexed

Who does PW.7 work: your team, a partner and the auditor

Your organization owns PW.7 in the sense that matters to an assessor. Your team decides whether code review, code analysis or both apply to each product and at what scope, which is the PW.7.1 decision. It also sets the secure coding standards that reviewers and tools check against, staffs the reviewers, and decides how findings are triaged and fixed. NIST describes the SSDF as outcome-based rather than a checklist, so the rationale for these choices has to come from your own risk, cost and feasibility analysis.

  • The PW.7.1 decision: Record which products get human review, which get automated analysis, and where the two overlap, with the reason for each choice.
  • The secure coding standard: Maintain the written standard that PW.7.2 measures code against, and keep it current with the languages you ship.
  • Reviewer staffing: Name who reviews, confirm they are qualified for the code they read, and plan capacity so reviews are not skipped under release pressure.
  • Triage outcomes: Decide which findings are fixed, accepted with a documented risk decision, or false positives, and who signs off on each.

Before engaging anyone, confirm that these four decisions have named owners and written records.

Questions buyers ask about PW.7 before hiring help

Is one tool enough to satisfy PW.7?

Not by itself, and PW.7 does not ask for a specific tool. Task PW.7.1 asks the organization to decide whether code review (a person reads the code), code analysis (tools check the code), or both should be used, and what scope each covers. That decision is the requirement, so the reasoning should be written down. A single static analyzer can meet the task if the decision record explains why it fits the risk, the languages in use and the secure coding standards. Many teams combine automated scanning on every change with human review for security-sensitive code, and they record which parts of the codebase each method covers.

How long does it take to put PW.7 in place?

It depends on codebase size, the number of languages and repositories, and how ready the engineering team is. A small team with one language and a clear set of secure coding standards can move much faster than a group with many services, legacy code and no written standards. Ask any provider to explain which of these factors drives its schedule and what must be ready before work starts, such as repository access, a pipeline where scans can run and named reviewers. Fixed-scope engagements usually agree the timeline in writing before work begins, so the plan should state the dependencies that could move it.

What does PW.7 require from our engineering team?

The work draws on three things from engineering. The first is reviewer time, because someone qualified must read security-relevant changes and record the issues they find. The second is access to the organization's secure coding standards, which PW.7.2 uses as the basis for every review and scan. The third is administrative rights in the source control and CI/CD systems, so scanning and branch protections can be configured. Engineering also has to triage findings, deciding which issues are fixed, accepted or false positives, and keep those records. Ask a partner to list these needs by name and role before the engagement starts.

Can our team meet PW.7 without outside help?

Yes, an organization can meet PW.7 with its own staff, because the SSDF is outcome-based and the organization owns its practices. The harder parts are usually writing the decision record for PW.7.1, keeping secure coding standards current, and running triage consistently over time. Teams without application security experience often find that reviewers need training and that scanner rules need tuning to reduce noise. Outside help is most useful when the team needs a second opinion on scope, configured pipelines, or evidence prepared for a customer or assessor. Internal capacity, existing tooling and the number of codebases are the factors that decide the choice.

What should a partner's PW.7 scope include?

A written scope should name each deliverable and the systems it covers. At a minimum, ask for these items:

  • A review of the current analysis and review methods, with the PW.7.1 decision record drafted or updated
  • Configuration of static analysis in the agreed CI/CD pipeline, with the languages and repositories listed
  • Protected branch settings in the source control platform so reviewed changes are the ones merged
  • Triage workflow and a template for recording findings and their outcomes
  • Handover notes that name who owns each step after the engagement ends

The scope should also state what the partner will not do, such as issuing an audit report. Only an independent assessor can issue that.

Are open-source analysis tools acceptable for PW.7?

SP 800-218 does not name products, so open-source tools can be used if they fit the organization's risk, languages and standards. Semgrep Community Edition, licensed under LGPL-2.1-only, scans many languages with community or custom rules and can run in CI/CD pipelines to scan repositories continuously. GitLab Community Edition, under the MIT license, supports protected branches that restrict who can push or merge and that keep force pushes disabled unless explicitly allowed. Confirm each tool's language coverage, rule quality and license terms against your own environment, and record why you chose it under PW.7.1. Commercial tools can also satisfy the task.

Does PW.7 alone show SSDF conformance?

No. PW.7 is one practice in the Produce Well-Secured Software group, and SSDF is a set of practices across four groups: Prepare the Organization, Protect the Software, Produce Well-Secured Software and Respond to Vulnerabilities. A customer asking for SSDF conformance will expect evidence across the framework, not one practice. Any attestation must cover the full scope the customer or agency requires. Conformance statements are made by the organization, and only an independent assessor can issue an audit report, so confirm with the requesting party which form of evidence they accept.

How DeployOpen scopes and prepares PW.7 evidence

DeployOpen works on PW.7 by first agreeing in writing which code, repositories and review method the organization will use, then preparing the review workflow and records inside the organization's own infrastructure. The organization still owns its secure coding standards and the decisions about risk, and DeployOpen prepares the systems and evidence that show those decisions were carried out.

How we scope

  • Agree in writing which repositories, languages and components fall under PW.7 review and analysis.
  • Record whether code review, code analysis or both apply, with the reasons for each decision.
  • Confirm which secure coding standards the organization owns and which reviewers or roles will apply them.

How we build

  • Configure protected branches so changes to reviewed code cannot be merged without a second approval.
  • Deploy self-hosted static analysis in the CI/CD pipeline with rules matched to the agreed secure coding standards.
  • Set up triage workflows that route findings to owners and record their status until each one is closed or accepted.

How we hand over

  • Deliver the written scope, configuration records and pipeline settings so assessors can trace each PW.7 task.
  • Provide review and analysis logs, triage records and a summary of open and accepted findings for the organization's files.
  • Document how the review method was chosen, so the organization can explain its risk-based decision to customers and assessors.

How we support

  • Offer ongoing support, upgrades and continuous testing of the review tooling as a retainer after handover.
  • Review rule updates and tool changes with the organization's security team before they reach production pipelines.
  • Confirm with the organization's auditor or assessor which evidence they expect, since only independent assessors issue reports or certificates.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.