ISO/IEC 27001:2022 Annex A · Control 8.4
Access to Source Code: A Practical Implementation Guide
Protect source code, build definitions and development assets from unauthorized access and change.
This control concerns appropriately managing read and write access to source code, development tools and software libraries.
What should the control achieve?
- Repositories and development assets are inventoried.
- Read and write rights follow role need.
- Protected branches and review prevent unauthorized change.
- Access and sensitive activity are logged and reviewed.
Step-by-step implementation
Inventory code assets
Include repositories, build scripts, infrastructure code, libraries and signing material.
Define repository roles
Separate read, contribute, maintain and administer permissions.
Protect changes
Require peer review, branch protection and controlled merge.
Secure pipelines and secrets
Keep credentials outside code and restrict build administration.
Monitor access
Log cloning, permission changes, releases and unusual activity.
Review lifecycle
Remove access after project, role or supplier change.
What this could look like in practice
Production repositories require SSO and MFA. Developers cannot push directly to protected branches; two reviewers approve sensitive components. Build secrets reside in a vault and contractor access expires automatically.
| Activity | Practical implementation | Evidence |
|---|---|---|
| Repository access | Project owner approves role-based access. | Access request |
| Code change | Protected branch requires review and passing tests. | Pull request |
| Release | Pipeline uses controlled signing identity. | Build log |
| Offboarding | Repository and artifact access is removed. | Removal record |
Implementation evidence
- Code-access policy
- Repository inventory
- Role configuration
- Branch protections
- Pull-request history
- Secret scans
- Pipeline permissions
- Access reviews
Useful metrics
- Repositories without branch protection
- Dormant code access
- Secrets detected in code
- Admin changes reviewed
Common mistakes
- Treating read access as harmless.
- Allowing direct pushes to production branches.
- Storing secrets in repositories.
- Giving build administrators unrestricted code rights.
- Forgetting archived and third-party repositories.
Questions an auditor may ask
- Who can read and change source code?
- How are protected changes enforced?
- Where are build secrets stored?
- Show contractor access removal.
Continue through Annex A
Explore the growing library of practical guides for all 93 Annex A controls.
Open the ISO 27001 Annex A Control LibraryThis independent educational guide paraphrases the practical intent of the control and does not replace the official ISO standards, professional advice or an organization-specific risk assessment. It is not affiliated with or endorsed by ISO.