Safeguard
Developer Tools•

What proves SSDF PW.5 and PW.6: secure coding and build settings?

What evidence supports SSDF PW.5 secure coding and PW.6 compiler and build configuration: standards, approved settings as code, and clean build records.

Safeguard Security Team
3 min read

SSDF PW.5 asks you to follow secure coding practices suited to your languages, and PW.6 asks you to use compilers and build tools with security features and approved configurations. Evidence is a written coding standard, build settings kept as code, and build logs showing the settings were applied.

PW.5: secure coding practices

PW.5.1 says to follow all secure coding practices appropriate to the development languages and environment, to meet the organization's requirements. SP 800-218 version 1.1 gives these examples:

  • Validate all inputs, and validate and encode outputs
  • Avoid unsafe functions and calls
  • Detect and handle errors gracefully
  • Provide logging and tracing
  • Use linters and formatters to standardize style
  • Check for vulnerabilities common to the language and environment
  • Let developers review their own code to complement, not replace, review by others

Evidence: the coding standard, linter configuration in the repository, and review records.

PW.6: compilers, interpreters and build tools

PW.6.1 asks for tools that offer features to improve executable security. PW.6.2 asks you to decide which features to use, configure them, and use the approved configuration.

Example from the documentWhat to keep
Use up to date tool versionsPinned version in build config
Change management for tool updatesTicket or pull request for each update
Warnings that flag poorly secured codeCompiler flags in the repository
Clean build, warnings treated as errorsBuild log with zero unexplained warnings
Dedicated, controlled build environmentBuild system description
Verify the approved settings are usedA check that fails when settings drift
Approved settings as configuration as codeThe shared config file itself

Making the evidence automatic

  1. Keep build and lint settings in version control.
  2. Make the pipeline fail when the settings are missing.
  3. Store build logs with the release record.
  4. Review the settings once a year or when tools change.

Document the exceptions. A warning marked as a false positive should have a note saying why.

Try it yourself

Open the demo and look at how code scanning reports findings on source. Think of the findings list as a record that PW.5 practices are being checked, not only followed.

Click through it at your own pace, or open it full screen.

Quick check

Which secure coding standard must we use?

PW.5.1 does not name one. It asks you to follow practices appropriate to your languages and environment and to meet your own requirements.

What is a clean build?

An example in PW.6.2: treat all compiler warnings as errors and eliminate them, except those judged false positives or irrelevant.

Where tooling helps

Safeguard offers SBOM and dependency scanning, reachability analysis and policies and gates on pull requests, which can record checks against your standards. Try the free scan at gold.safeguard.sh/scan.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.