# yaml-language-server: $schema=../../schemas/dsomm-schema-implementation.json --- Implementation: Development and Source Control: Local development linting & style checks performed: uuid: 517b0957-4981-4ac0-b4c7-0d8d1934c474 risk: Insecure or unmaintainable code base. measure: >- Integrate static code analysis tools in IDEs. difficultyOfImplementation: knowledge: 1 time: 1 resources: 1 usefulness: 2 level: 5 description: "" implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/stylecop - $ref: src/assets/YAML/default/implementations.yaml#/implementations/sonarqube-lint - $ref: src/assets/YAML/default/implementations.yaml#/implementations/eslint references: samm2: - V-ST-A-1 iso27001-2017: - ISO 27001:2017 mapping is missing iso27001-2022: - ISO 27001:2022 mapping is missing comments: "" Require a PR before merging: uuid: e7598ac4-b082-4e56-b7df-e2c6b426a5e2 risk: Intentional or accidental alterations in critical branches like main (or master). measure: >- Define source code management system policies (e.g. branch protection rules, mandatory code reviews from at least one person, ...) to ensure that changes to critical branches are only possible under defined conditions. These policies can be implemented at repository level or organization level, depending on the source code management system. difficultyOfImplementation: knowledge: 2 time: 1 resources: 2 usefulness: 4 level: 2 implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/azuredevops - $ref: src/assets/YAML/default/implementations.yaml#/implementations/github-policies references: samm2: - O-EM-A-1 iso27001-2017: - Peer review - four eyes principle is not explicitly required by ISO 27001 - 6.1.2 - 14.2.1 iso27001-2022: - Peer review - four eyes principle is not explicitly required by ISO 27001 - 5.3 - 8.25 Dismiss stale PR approvals: uuid: ea6f69f7-54a5-4922-ac15-a77ff0c16162 risk: Intentional or accidental alterations in critical branches like main (or master) through post-approval code additions. measure: >- Implement a policy where any commits made after a pull request has been approved automatically revoke that approval, necessitating a fresh review and re-approval process. difficultyOfImplementation: knowledge: 2 time: 1 resources: 2 usefulness: 4 level: 3 dependsOn: - e7598ac4-b082-4e56-b7df-e2c6b426a5e2 # Require a PR before merging implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/azuredevops - $ref: src/assets/YAML/default/implementations.yaml#/implementations/github-policies - $ref: src/assets/YAML/default/implementations.yaml#/implementations/signing-of-commits-protection references: samm2: - O-EM-A-1 iso27001-2017: - Peer review - four eyes principle is not explicitly required by ISO 27001 - 6.1.2 - 14.2.1 iso27001-2022: - Peer review - four eyes principle is not explicitly required by ISO 27001 - 5.3 - 8.25 Version control: uuid: 066084c6-1135-4635-9cc5-9e75c7c5459f description: Use a _version control system_ like Github, Gitlab, Bitbucket, etc to version your source code. Also known as _source control_, _revision control_, or _source code management_. risk: Without version control, it is challenging to track changes, collaborate effectively, and maintain a history of code modifications. Rollback to earlier versions is hard. measure: >- Version your source code in order to identify deployed features and issues. This includes application and infrastructure code, jenkins configuration, container and virtual machine images definitions. difficultyOfImplementation: knowledge: 3 time: 3 resources: 3 usefulness: 5 level: 1 implementation: [] references: samm2: - O-EM-A-1 - I-SB-A-2 iso27001-2017: - Not explicitly covered by ISO 27001 - too specific - 12.1.1 - 12.1.2 - 14.2.2 iso27001-2022: - Not explicitly covered by ISO 27001 - too specific - 5.37 - 8.32 .gitignore: uuid: 363a3eea-baf9-4010-88ca-bb8186a2989d risk: Unintended leakage of secrets, debug, or workstation specific data measure: >- .gitignore files help prevent accidental commits of secrets, debug, or workstation specific data difficultyOfImplementation: knowledge: 2 time: 1 resources: 1 usefulness: 5 level: 4 dependsOn: [] implementation: [] references: samm2: - O-EM-A-1 iso27001-2017: - Not explicitly covered by ISO 27001 - too specific - 12.1.1 - 12.1.2 - 14.2.2 iso27001-2022: - Not explicitly covered by ISO 27001 - too specific - 5.37 - 8.32 Require status checks to pass: uuid: ac8730a2-ccc0-465c-9550-d91edae9d5ee risk: Organizations risk introducing broken builds, quality issues, and security vulnerabilities into their codebase. measure: >- Mandate passing of security related specified status checks, like successful builds or static application security tests, before proceeding. difficultyOfImplementation: knowledge: 2 time: 1 resources: 2 usefulness: 4 level: 3 dependsOn: - e7598ac4-b082-4e56-b7df-e2c6b426a5e2 implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/azuredevops - $ref: src/assets/YAML/default/implementations.yaml#/implementations/github-policies - $ref: src/assets/YAML/default/implementations.yaml#/implementations/signing-of-commits-protection references: samm2: - O-EM-A-1 iso27001-2017: - 6.1.2 - 14.2.1 iso27001-2022: - 5.3 - 8.25 Block pushes containing secrets: uuid: 50ba2bfb-2ae3-4576-8813-a8f00d8a3220 description: |- _Test for stored secrets in code_ (Test and Verification) finds secrets after they have entered the repository; at that point the secret is exposed in the history and must be rotated. Server-side push protection moves the control from detection to prevention: the source code management system rejects pushes containing known secret formats before they enter the repository, independent of any tooling on the committing machine. Like other source control policies (e.g. _Require a PR before merging_, _Block force pushes_), enforcement on the server also covers commits produced by AI coding agents and other automation, which push at higher volume than humans and cannot be assumed to run local checks. Local scanners as pre-commit hooks or CI steps (e.g. Gitleaks) remain useful as an early warning, but the enforcement point is the server. Pattern-based blocking catches known secret formats, not everything, so this activity complements rather than replaces the detection activities. risk: |- Secrets are detected only after they have been pushed: they are already exposed in the repository history, rotation is urgent and often incomplete, and clones and forks retain the secret even after a history rewrite. measure: |- Enable server-side push protection on the source code management system so that pushes containing known secret formats are rejected before entering the repository, with a documented bypass procedure for false positives. Optionally add local pre-commit or CI scanning as an early warning. dependsOn: - c6e3c812-56e2-41b0-ae01-b7afc41a004c # Test for stored secrets in code assessment: | - Demonstrate that a push containing a test secret is rejected by the source code management system. - Show that push protection is enabled for all relevant repositories, not only a sample. - Show the documented bypass procedure and who may use it. difficultyOfImplementation: knowledge: 1 time: 1 resources: 2 usefulness: 3 level: 3 tags: - secrets - scm implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/github-push-protection - $ref: src/assets/YAML/default/implementations.yaml#/implementations/gitleaks - $ref: src/assets/YAML/default/implementations.yaml#/implementations/trufflehog references: samm2: - O-EM-A-1 iso27001-2017: - vcs usage is not explicitly covered by ISO 27001 - too specific - 9.4.3 - 10.1.2 iso27001-2022: - vcs usage is not explicitly covered by ISO 27001 - too specific - 5.17 - 8.24 comments: "" Block force pushes: uuid: c7d99b18-c3e1-4d22-b2e3-9aa9146c0b17 risk: |- Misuse of force push can lead to loss of work. It may overwrite remote branches without warning, potentially erasing valuable contributions from team members. This can disrupt collaboration, cause data loss, and create confusion in the development process. Bypassing the pull request process might remove an important code review step. This increases the risk of merging low-quality or buggy code into the main branch, potentially introducing bugs in the codebase. measure: >- Mandate blocking of force pushes in the version control platform. difficultyOfImplementation: knowledge: 2 time: 1 resources: 2 usefulness: 3 level: 3 dependsOn: - e7598ac4-b082-4e56-b7df-e2c6b426a5e2 implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/azuredevops - $ref: src/assets/YAML/default/implementations.yaml#/implementations/github-policies references: samm2: - O-EM-A-1 iso27001-2017: - 6.1.2 - 14.2.1 iso27001-2022: - 5.3 - 8.25