ISO 27001 A.8.4 requires that read and write access to source code, development tools, and software libraries is restricted to what a person needs for their role, so the code that becomes production software cannot be read or changed by anyone who happens to have a login. The action teams get flagged on most is write control on the main branch: unprotected default branches that any contributor can push to directly, with no required review and no record of who merged what.
At a glance
- Theme: Technological (A.8)
- Source: ISO/IEC 27001:2022, Annex A
- New in 2022: No
- SOC 2 mapping: CC6.1, CC8.1 (Partial)
- Part of: ISO 27001 certification guide
What is ISO 27001 A.8.4?
ISO 27001 A.8.4 Access to source code governs how access to program source code, development tools, and software libraries is granted and restricted. In the words of ISO/IEC 27001:2022, Annex A, the control title is Access to source code. The intent, as described in ISO/IEC 27001:2022, Annex A, is that read and write access to source code and the associated development artifacts is managed on a need basis, so that source is not altered without authorization and its integrity is preserved.
Source code is a controlled asset because it defines how the production system behaves and often contains the configuration, logic, and occasionally the secrets that protect customer data. A.8.4 applies the general access control intent of A.5.15 specifically to the software development estate: the repositories that hold the code, the build tools and pipelines that turn it into deployable artifacts, and the package and artifact registries that store the libraries and outputs. Restricting who can read that code, and controlling much more tightly who can change it, is what the control asks for.
How do you implement A.8.4?
Implement ISO 27001 A.8.4 by inventorying the source code estate, applying least-privilege permissions to every repository, and gating changes to protected branches behind review. The sequence a team follows:
- Inventory repositories, tools, and libraries. List every repository, the internal package and artifact registries, and the build and deployment tooling that reaches the code. This inventory is the scope for every later step; a repository nobody tracks is a repository nobody controls.
- Apply least-privilege repository permissions. Grant access by role and business need rather than giving the whole engineering group admin on every repository. Most contributors need write to the repositories they work in and read elsewhere; a small number need admin. Separate private product repositories from anything public.
- Protect the main and release branches. Turn on branch protection for the default branch and any release branches so no one pushes directly. Require a pull request, at least one review by someone other than the author, and passing status checks before a merge is allowed.
- Control write access and merge rights. Merge rights to protected branches are the privileged permission in the source estate: restrict them to the roles that need them, keep the author and the approver separate, and treat a force-push or a protection override as an exception that is logged.
- Restrict access to build tools and artifact registries. The CI/CD system, the container registry, and the internal package registry are part of the code supply chain. Limit who can change pipeline definitions, publish packages, or pull private artifacts, and require authentication for every path into them. Dependency scanning, for example Dependabot or Snyk, watches the third-party libraries this supply chain pulls in, and the paths between repository, pipeline, and registry are part of the system's security architecture and worth mapping deliberately.
- Keep secrets out of the code. API keys, database credentials, and signing keys do not belong in the repository. Move them to a secrets manager or the pipeline's protected secret store, and run secret scanning on commits so a credential that slips in is caught and rotated.
- Log and review access. Repository access, permission changes, and merges to protected branches are logged, and repository permissions are reviewed on a defined cadence so stale access from role changes and departures is removed.
Key insight
Merge rights to the main branch are the privileged permission in the source estate
Restricting who can read a repository matters, but A.8.4 leans hardest on who can change protected code. Branch protection with required review on the default branch, plus separation of author and approver, is the control an auditor probes first.
SaaS version control vs self-hosted Git
Most teams run a SaaS version control platform (GitHub, GitLab, Bitbucket) where A.8.4 is implemented through organization roles, branch protection rules, and identity integration. Repository and organization roles set who can read, write, or administer; branch protection and required reviews gate changes to protected branches; and SSO with SCIM ties repository access to the identity provider so joiners and leavers are provisioned and deprovisioned centrally rather than as standalone Git accounts.
A self-hosted Git server (a self-managed GitLab, Gitea, or bare Git over SSH) implements the same control through the team's own access management. Repository permissions are backed by the server's own model or an LDAP directory, SSH keys or directory accounts authenticate contributors, and the same branch-protection and required-review settings are configured on the self-hosted instance. The access model is the team's responsibility end to end rather than inherited from a SaaS provider. The on-prem access control guide covers directory-backed permissions and access review in depth.
| Implementation theme | SaaS version control | Self-hosted Git |
| Repository permissions | Org and repository roles | Server model or LDAP-backed groups |
| Identity and provisioning | SSO with SCIM from the IdP | Directory accounts or managed SSH keys |
| Branch protection | Platform branch-protection rules | Protection configured on the self-hosted instance |
| Access logging | Platform audit log | Server and directory audit logs |
What evidence demonstrates A.8.4?
Evidence for ISO 27001 A.8.4 is the record that source code access is scoped, that changes to protected branches are reviewed, and that access is logged and periodically re-confirmed. Teams that export permission and merge records straight from the platform on a schedule, instead of compiling them by hand each audit, are practicing GRC engineering.
| Artifact | What it demonstrates | Cadence |
| Repository permission export | Access to source code is scoped by role and least privilege | Reviewed at least annually |
| Branch-protection configuration | Protected branches require review and block direct pushes | Point-in-time per audit period |
| Pull request and merge records | Changes to source are reviewed by a second person before merge | Per change |
| Access review records | Stale repository access is identified and removed | Quarterly or at least annually |
| Artifact and package registry permissions | Access to build outputs and libraries is restricted | Reviewed at least annually |
| Secret-scanning configuration and findings | Credentials are kept out of source and rotated when exposed | Continuous, reviewed per cadence |
Watch out
Source code that lives outside any controlled repository produces no A.8.4 evidence
A gap that comes up occasionally working with small stable teams during readiness work is source code that lives outside any controlled repository. In one engagement, a company had kept its entire codebase on a single developer's local Git for years, with periodic zip-file backups to a network drive and no central repository, no branch protection, and no record of who could read or change the code.
The development process delivered features reliably, but it produced nothing an auditor could inspect: no permission model, no review trail, no access log. The resolution required no added headcount. The team moved the code into a hosted repository with role-based permissions, turned on branch protection with a required check on the main branch, and enabled secret scanning, which turned an uncontrolled codebase into an access model that could be exported and reviewed. A related gap is broad standing write access, where every engineer holds admin on every repository because that is how the organization started, which a periodic repository permission review is designed to catch.
How does A.8.4 map to SOC 2?
ISO 27001 A.8.4 maps to the SOC 2 criteria that restrict logical access and that govern authorized, reviewed change.
| SOC 2 criteria | Overlap type | Evidence reusable in both directions |
| CC6.1, CC8.1 | Partial | Repository permission exports, branch-protection configuration, pull request and merge approval records, access review records, artifact registry permissions |
| Note | Source-code access is a subset of the broader CC6.1 logical access and CC8.1 change management criteria, so the same repository evidence supports both without covering them in full |
The overlap is Partial because CC6.1 governs logical access across the whole environment and CC8.1 governs the entire change process, while A.8.4 addresses one slice of each: access to the source code and development tooling specifically. The SOC 2 to ISO 27001 control mapping covers the full crosswalk and where SOC 2 work transfers to ISO 27001.
Is your source code access audit-ready?
Truvo designs and evidences repository access as part of an effective security program.
Related controls
ISO 27001 A.8.4 restricts access to the code itself; the controls around it govern who holds elevated rights, what an identity can reach, and how code is built. A.8.2 privileged access rights governs the admin and merge permissions that A.8.4 restricts on repositories and build systems, and A.8.3 information access restriction limits what an authenticated identity can reach once inside a system. A.8.25 secure development life cycle sets the wider secure-development rules around source code access, and A.5.15 access control defines the overall access policy that A.8.4 applies to the development estate. All four belong to the ISO 27001 certification guide.
Part of Truvo's control-by-control ISO 27001 reference series
This post is part of the ISO 27001:2022 Annex A cluster anchored by the ISO 27001 certification guide. If you want a second set of eyes on how source code access is designed and evidenced as part of an effective security program, Truvo runs scoping calls.
Frequently Asked Questions
What is ISO 27001 A.8.4?
ISO 27001 A.8.4 is the Annex A control titled Access to source code, in the Technological theme. It requires that read and write access to program source code, development tools, and software libraries is restricted on a need basis, so that source cannot be read or altered without authorization and its integrity is preserved.
What evidence satisfies A.8.4?
Typical A.8.4 evidence includes a repository permission export showing least-privilege access, branch-protection configuration for protected branches, pull request and merge records showing second-person review, periodic repository access review records, artifact and package registry permissions, and secret-scanning configuration with its findings and remediation.
Is A.8.4 new in ISO 27001:2022?
No. Access to source code carried over from the 2013 version of the standard and was not introduced in the 2022 revision. The 2022 revision reorganized Annex A into four themes and placed access to source code under the Technological controls as A.8.4, but the control itself is not new.
How do you handle A.8.4 on a very small development team?
Restrict access through the tooling rather than through headcount. Move code into a hosted or controlled repository with role-based permissions, turn on branch protection with a required status check on the main branch, and enable secret scanning. On a single-developer team where real-time peer review is not possible, automated checks on the protected branch and a documented periodic review of changes provide the controlled, reviewable access A.8.4 expects.
How does A.8.4 differ from A.8.2 privileged access rights?
A.8.4 restricts access to source code, development tools, and software libraries specifically, while A.8.2 governs elevated permissions across the whole environment. They meet on the source estate: the admin and merge rights that A.8.2 treats as privileged access are the same write permissions A.8.4 asks you to restrict on repositories and build systems.
How does A.8.4 map to SOC 2?
A.8.4 has Partial overlap with SOC 2 CC6.1 and CC8.1. CC6.1 covers logical access and CC8.1 covers change management across the whole environment, while A.8.4 addresses one slice of each: access to source code and development tooling. Repository permission exports, branch-protection configuration, and merge approval records are reusable across both frameworks.
Ready to Start Your Compliance Journey?
Get a clear, actionable roadmap with our readiness assessment.
Contact Us
Free Report: The CPCSC Compliance Playbook
Join the waitlist for a free copy when it's released.
About the Author
Former security architect for Bank of Canada and Payments Canada. 20+ years building compliance programs for critical infrastructure.