Skip to main content

ISO 27001 Annex A 8.28 secure coding: what it asks and what evidence works

Annex A 8.28 is one of the controls that arrived with the 2022 revision of ISO/IEC 27001, and it is the one that most directly reaches into how developers write code. It is also short: the control statement amounts to "apply secure coding principles to software development". Everything an auditor will actually ask about comes from the implementation guidance in ISO/IEC 27002:2022 and from how you chose to apply it. This post walks through what that guidance covers, how 8.28 relates to its neighbours, what evidence holds up in an audit, and where an automated code scan fits. For the general picture of scanner evidence across SOC 2 and ISO 27001, see our post on SOC 2 and ISO 27001 evidence from code scanning; this one goes deep on 8.28 alone.

What the control asks

ISO/IEC 27001:2022 Annex A lists the control; ISO/IEC 27002:2022 explains it. The 27002 guidance for 8.28 is organised around the life of code, roughly in three phases.

Planning, before coding

  • Set organisation-wide expectations and approved secure coding principles, covering both in-house and outsourced development.
  • Know the common and historical coding mistakes that lead to vulnerabilities, so standards address them.
  • Configure and maintain development tools (editors, compilers, build tools) so they support secure code.

During coding

  • Apply secure coding practices specific to each language and framework in use.
  • Use techniques such as peer review, pair programming, refactoring and structured, well-documented code.
  • Prohibit insecure design patterns. The guidance explicitly names hard-coded passwords.
  • Test for security during and after development, in line with 8.29.

Review and maintenance, after release

  • Deliver updates securely, and handle reported vulnerabilities (which ties to 8.8, management of technical vulnerabilities).
  • Log errors and suspected attacks, and review them to improve the code.
  • Protect source code against unauthorised access and tampering.

The guidance also covers external libraries and components: keep them updated, select and authorise them deliberately (especially for authentication and cryptography), and check where they come from. Since most applications are mostly third-party code by volume, this part carries real weight.

How 8.28 fits with 8.25 to 8.29

Auditors rarely look at 8.28 in isolation. The secure development controls form a chain, and a weak link elsewhere shows up as a question about 8.28.

Control Topic Relationship to 8.28
8.25 Secure development life cycle The overall rules for building software securely. 8.28 is the coding part of that life cycle.
8.26 Application security requirements What the software must do securely. Secure code implements these requirements.
8.27 Secure system architecture and engineering principles Design-level principles. 8.28 applies them at the line-of-code level.
8.28 Secure coding The principles and practices developers apply while writing and maintaining code.
8.29 Security testing in development and acceptance How you check that the code meets the requirements. Much of 8.28's evidence is produced here.

Two controls outside the run also matter: 8.8 for vulnerabilities in your code and its dependencies, and 8.32 for change management, which is where reviews and approvals are recorded.

What evidence an auditor accepts

ISO 27001 audits look for two things: that a control is designed (documented, owned, appropriate to your risks) and that it operates (there are records showing it happened, consistently, over time). For 8.28 that usually means:

  1. A secure coding standard. A document, owned by someone, that states your principles per language or platform and references the classes of mistakes you guard against. It does not need to be long. It needs to be yours and current.
  2. Evidence developers know it. Onboarding material, training records or a link from the contribution guide.
  3. Evidence it is applied during coding. Pull request reviews with a named reviewer, and automated checks that run on each change and leave a record.
  4. Evidence that findings are handled. Findings tracked to resolution, with exceptions recorded and approved rather than silently ignored.
  5. Evidence about third-party components. A dependency inventory and a record of how known vulnerabilities in it were triaged.
  6. Source code protection. Repository access controls and branch protection, which an auditor can inspect directly.

What auditors are wary of is evidence produced once for the audit: a single report generated the week before fieldwork shows the control exists, not that it operated across the period.

Where code scanning fits

A static scanner maps most cleanly to the "during coding" part of 8.28 and to 8.29. It checks every change against the mistakes your standard says you prohibit, and it leaves a dated record each time.

Take the guidance's own example, a hard-coded password:

# Prohibited by the secure coding standard
db = psycopg2.connect(host="db.internal", user="app", password="Summer2026!")
# Compliant: the secret comes from the environment or a secret manager
db = psycopg2.connect(
    host=os.environ["DB_HOST"],
    user=os.environ["DB_USER"],
    password=os.environ["DB_PASSWORD"],
)

Vulkro's secrets detection reports the first form, in code, config and git history, so a password that was committed and later deleted is still found. Injection is the other classic: Vulkro traces request input into query calls across JavaScript, TypeScript, Python, Go and Java, reported as rules such as JS-TAINT-SQL-001.

The operating evidence comes from running the check on every change, gated so new findings block the merge while existing debt does not:

vulkro gate --base origin/main --format sarif > gate.sarif

And a control-mapped view for the audit file, built from the same scan:

vulkro compliance . --profile iso27001
vulkro compliance-pack . --framework iso27001 -o evidence/

compliance-pack writes a manifest, a summary, a findings CSV and one file per control. A control with no mapped finding is reported as not evaluated, not as passed, because a scan with nothing to say is not evidence that the code is secure.

Be honest about the limits. A scanner does not write your secure coding standard, train developers, review architecture or judge whether a requirement was met. It covers part of 8.28 and part of 8.29, very consistently. The rest is process and people, and a certification body audits your management system as a whole: no tool makes you certified.

FAQ

What is ISO 27001 Annex A 8.28?

It is the secure coding control in the 2022 revision of ISO/IEC 27001 Annex A. It requires secure coding principles to be applied to software development, with implementation guidance in ISO/IEC 27002:2022 covering planning, coding practices, and review and maintenance.

What evidence do auditors want for ISO 27001 secure coding?

Typically a documented secure coding standard, proof that developers know it, pull request reviews and automated checks on each change, records of findings being resolved or formally accepted, dependency vulnerability handling, and access controls on source code, all covering the audit period.

Is SAST required for ISO 27001?

No. ISO 27001 does not name specific tools. Automated code scanning is a common and efficient way to show 8.28 and 8.29 operating on every change, but the requirement is that secure coding principles are applied and verified, however you do it.

See how scanning fits an audit trail in the best offline SAST guide, or Start a 14-day trial. Related: what auditors accept from a scanner.