# yaml-language-server: $schema=../../schemas/dsomm-schema-culture-and-organization.json --- Culture and Organization: Design: Conduction of advanced threat modeling: uuid: ae22dafd-bcd6-41ee-ba01-8b7fe6fc1ad9 risk: Inadequate identification of business and technical risks. measure: Threat modeling is performed by using reviewing user stories and producing security driven data flow diagrams. difficultyOfImplementation: knowledge: 4 time: 3 resources: 2 usefulness: 3 level: 4 dependsOn: - 47419324-e263-415b-815d-e7161b6b905e # Conduction of simple threat modeling on technical level - dd5ed7c1-bdbf-400f-b75f-6d3953a1a04e # Creation of threat modeling processes and standards description: | **Example High Maturity Scenario:** Based on a detailed threat model defined and updated through code, the team decides the following: * Local encrypted caches need to expire and auto-purged. * Communication channels encrypted and authenticated. * All secrets persisted in shared secrets store. * Frontend designed with permissions model integration. * Permissions matrix defined. * Input is escaped output is encoded appropriately using well established libraries. Source: OWASP Project Integration Project # AI support At this maturity level, AI can lift threat modeling from periodic workshops to a continuous activity: AI threat modeling tools generate architecture-aware threat model drafts from feature tickets and design documents before implementation starts, re-run the analysis when new tickets arrive and compare the threat model against the implemented code to surface drift between design intent and implementation (e.g. Apiiro AI Threat Modeling, commercial). The generated models require expert review, see the note on failure modes in _Conduction of simple threat modeling on technical level_. implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/whiteboard - $ref: src/assets/YAML/default/implementations.yaml#/implementations/miro-or-any-other-c - $ref: src/assets/YAML/default/implementations.yaml#/implementations/draw-io - $ref: src/assets/YAML/default/implementations.yaml#/implementations/threat-modeling-play - $ref: src/assets/YAML/default/implementations.yaml#/implementations/owasp-samm - $ref: src/assets/YAML/default/implementations.yaml#/implementations/threagile - $ref: src/assets/YAML/default/implementations.yaml#/implementations/threatatlas - $ref: src/assets/YAML/default/implementations.yaml#/implementations/threat-matrix-for-storage - $ref: src/assets/YAML/default/implementations.yaml#/implementations/apiiro-ai-threat-modeling - $ref: src/assets/YAML/default/implementations.yaml#/implementations/threat-designer references: samm2: - D-TA-B-2 iso27001-2017: - Not explicitly covered by ISO 27001 - May be part of risk assessment - 8.2.1 - 14.2.1 iso27001-2022: - Not explicitly covered by ISO 27001 - May be part of risk assessment - 5.12 - 8.25 comments: "" Conduction of simple threat modeling on business level: uuid: 48f97f31-931c-46eb-9b3e-e2fec0cd0426 risk: Business related threats are discovered too late in the development and deployment process. measure: Threat modeling of business functionality is performed during the product backlog creation to facilitate early detection of security defects. difficultyOfImplementation: knowledge: 2 time: 3 resources: 1 usefulness: 3 level: 3 implementation: [] references: samm2: - D-TA-B-1 - D-TA-A-2 iso27001-2017: - Not explicitly covered by ISO 27001 - May be part of risk assessment - 8.2.1 - 14.2.1 iso27001-2022: - Not explicitly covered by ISO 27001 - May be part of risk assessment - 5.12 - 8.25 comments: "" Conduction of simple threat modeling on technical level: uuid: 47419324-e263-415b-815d-e7161b6b905e description: | # OWASP SAMM Description Threat modeling is a structured activity for identifying, evaluating, and managing system threats, architectural design flaws, and recommended security mitigations. It is typically done as part of the design phase or as part of a security assessment. Threat modeling is a team exercise, including product owners, architects, security champions, and security testers. At this maturity level, expose teams and stakeholders to threat modeling to increase security awareness and to create a shared vision on the security of the system. At maturity level 1, you perform threat modeling ad-hoc for high-risk applications and use simple threat checklists, such as STRIDE. Avoid lengthy workshops and overly detailed lists of low-relevant threats. Perform threat modeling iteratively to align to more iterative development paradigms. If you add new functionality to an existing application, look only into the newly added functions instead of trying to cover the entire scope. A good starting point is the existing diagrams that you annotate during discussion workshops. Always make sure to persist the outcome of a threat modeling discussion for later use. Your most important tool to start threat modeling is a whiteboard, smartboard, or a piece of paper. Aim for security awareness, a simple process, and actionable outcomes that you agree upon with your team. Once requirements are gathered and analysis is performed, implementation specifics need to be defined. The outcome of this stage is usually a diagram outlining data flows and a general system architecture. This presents an opportunity for both threat modeling and attaching security considerations to every ticket and epic that is the outcome of this stage. Source: https://owaspsamm.org/model/design/threat-assessment/stream-b/ # OWASP Project Integration Description There is some great advice on threat modeling out there *e.g.* [this](https://arstechnica.com/information-technology/2017/07/how-i-learned-to-stop-worrying-mostly-and-love-my-threat-model/) article or [this](https://www.microsoft.com/en-us/securityengineering/sdl/threatmodeling) one. A bite sized primer by Adam Shostack himself can be found [here](https://adam.shostack.org/blog/2018/03/threat-modeling-panel-at-appsec-cali-2018/). OWASP includes a short [article](https://wiki.owasp.org/index.php/Category:Threat_Modeling) on Threat Modeling along with a relevant [Cheatsheet](https://cheatsheetseries.owasp.org/cheatsheets/Threat_Modeling_Cheat_Sheet.html). Moreover, if you're following OWASP SAMM, it has a short section on [Threat Assessment](https://owaspsamm.org/model/design/threat-assessment/). There's a few projects that can help with creating Threat Models at this stage, [PyTM](https://github.com/izar/pytm) is one, [ThreatSpec](https://github.com/threatspec/threatspec) is another. > Note: _A threat model can be as simple as a data flow diagram with attack vectors on every flow and asset and equivalent remediations. An example can be found below._ ![Threat Model](https://github.com/OWASP/www-project-integration-standards/raw/master/writeups/owasp_in_sdlc/images/threat_model.png "Threat Model") Last, if the organizations maps Features to Epics, the Security Knowledge Framework (SKF) can be used to facilitate this process by leveraging it's questionnaire function. ![SKF](https://github.com/OWASP/www-project-integration-standards/raw/master/writeups/owasp_in_sdlc/images/skf_qs.png "SKF") This practice has the side effect that it trains non-security specialists to spot how functionality can be misused. The outcomes of this stage should help lay the foundation of secure design and considerations. **Example Low Maturity Scenario:** Following vague feature requirements the design includes caching data to a local unencrypted database with a hardcoded password. Remote data store access secrets are hardcoded in the configuration files. All communication between backend systems is plaintext. Frontend serves data over GraphQL as a thin layer between caching system and end user. GraphQL queries are dynamically translated to SQL, Elasticsearch and NoSQL queries. Access to data is protected with basic auth set to _1234:1234_ for development purposes. Source: OWASP Project Integration Project # AI support Large language models can support threat modeling as a complementary tool: given an architecture description, a data flow diagram or a user story, they generate candidate threat lists (e.g. along STRIDE) and suggested mitigations, which the team then reviews, corrects and prioritizes in the workshop. Tools such as [STRIDE GPT](https://github.com/mrwadams/stride-gpt) automate this drafting step; agentic applications such as [Threat Designer](https://github.com/awslabs/threat-designer) analyze architecture diagrams and let the team refine the resulting threat model interactively; agent skills such as [tm_skills](https://github.com/izar/tm_skills) let an AI coding agent generate pytm-based threat models with data flow diagrams directly from the codebase and evaluate user stories for security-notable events. Be aware of the failure modes: a language model confidently fills gaps in an incomplete system description and produces threats for components that do not exist, and its output is non-deterministic (the same input yields different threat models). Validating an AI-generated threat model requires exactly the security expertise the tool seems to replace (see [Team Werewolves wins!](https://threatmodeling.dev/team-werewolves-wins/)). AI-generated threats are a starting point for the discussion, not its result. The team exercise and the shared understanding remain the core of this activity. risk: Technical related threats are discovered too late in the development and deployment process. measure: | Perform threat modeling of technical features during product sprint planning using simple checklists and diagrams. Document identified threats and mitigations for new or changed functionality. assessment: | - Evidence of threat modeling activities exists for high-risk applications, including annotated diagrams and documented threats/mitigations. - Activities are performed during sprint planning and involve relevant stakeholders. Outcomes are recorded and accessible for review. level: 1 difficultyOfImplementation: knowledge: 2 time: 3 resources: 1 usefulness: 3 implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/whiteboard - $ref: src/assets/YAML/default/implementations.yaml#/implementations/miro-or-any-other-c - $ref: src/assets/YAML/default/implementations.yaml#/implementations/draw-io - $ref: src/assets/YAML/default/implementations.yaml#/implementations/threat-modeling-play - $ref: src/assets/YAML/default/implementations.yaml#/implementations/owasp-samm - $ref: src/assets/YAML/default/implementations.yaml#/implementations/threatatlas - $ref: src/assets/YAML/default/implementations.yaml#/implementations/threat-matrix-for-storage - $ref: src/assets/YAML/default/implementations.yaml#/implementations/threat-designer - $ref: src/assets/YAML/default/implementations.yaml#/implementations/tm-skills references: samm2: - D-TA-B-2 iso27001-2017: - Not explicitly covered by ISO 27001 - May be part of risk assessment - 8.2.1 - 14.2.1 iso27001-2022: - Not explicitly covered by ISO 27001 - May be part of risk assessment - 5.12 - 8.25 comments: "" Creation of advanced abuse stories: uuid: 0a929c3e-ab9a-4206-8761-adf84b74622e risk: Simple user stories are not going deep enough. Relevant security considerations are performed. Security flaws are discovered too late in the development and deployment process measure: Advanced abuse stories are created as part of threat modeling activities. difficultyOfImplementation: knowledge: 4 time: 2 resources: 1 usefulness: 4 level: 5 dependsOn: - bacf85b6-5bc0-405d-b5ba-a5d971467cc1 # Creation of simple abuse stories implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/don-t-forget-evil-user-stories references: samm2: - D-TA-B-2 - V-RT-B-2 iso27001-2017: - Not explicitly covered by ISO 27001 - May be part of project management - 6.1.5 - May be part of risk assessment - 8.1.2 iso27001-2022: - Not explicitly covered by ISO 27001 - May be part of project management - 5.8 - May be part of risk assessment - 5.9 comments: "" Creation of simple abuse stories: uuid: bacf85b6-5bc0-405d-b5ba-a5d971467cc1 description: |- Abuse stories are the attacker's counterpart to user stories: for a given user story they describe how the same functionality can be misused. Large language models are well suited as a complementary tool for this activity: given a user story and its acceptance criteria, they generate candidate abuse stories. This covers a step teams often skip, because systematically asking how functionality can be misused requires experience most development teams do not have. Generated abuse stories are drafts: the team reviews them, discards irrelevant ones and derives security acceptance criteria from the relevant ones. risk: User stories mostly don't consider security implications. Security flaws are discovered too late in the development and deployment process. measure: Abuse stories are created during the creation of user stories. difficultyOfImplementation: knowledge: 2 time: 2 resources: 1 usefulness: 4 level: 3 implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/don-t-forget-evil-user-stories dependsOn: - 47419324-e263-415b-815d-e7161b6b905e # Conduction of simple threat modeling on technical level - dd5ed7c1-bdbf-400f-b75f-6d3953a1a04e # Creation of threat modeling processes and standards references: samm2: - D-TA-B-2 iso27001-2017: - Not explicitly covered by ISO 27001 - May be part of project management - 6.1.5 - May be part of risk assessment - 8.1.2 iso27001-2022: - Not explicitly covered by ISO 27001 - May be part of project management - 5.8 - May be part of risk assessment - 5.9 comments: "" Creation of threat modeling processes and standards: uuid: dd5ed7c1-bdbf-400f-b75f-6d3953a1a04e risk: Inadequate identification of business and technical risks. measure: Creation of threat modeling processes and standards through the organization helps to enhance the security culture and provide more structure to the threat model exercises. difficultyOfImplementation: knowledge: 4 time: 3 resources: 2 usefulness: 3 level: 3 description: "" implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/threat-modeling-play - $ref: src/assets/YAML/default/implementations.yaml#/implementations/owasp-samm - $ref: src/assets/YAML/default/implementations.yaml#/implementations/threatatlas dependsOn: - 47419324-e263-415b-815d-e7161b6b905e # Conduction of simple threat modeling on technical level references: samm2: - D-TA-B-3 - D-TA-B-2 iso27001-2017: - Not explicitly covered by ISO 27001 - May be part of risk assessment - 8.2.1 - 14.2.1 iso27001-2022: - Not explicitly covered by ISO 27001 - May be part of risk assessment - 5.12 - 8.25 comments: "" Information security targets are communicated: uuid: 1b9281b9-48e2-4c01-9ac6-9db9931c4885 risk: Employees don't know their organizations security targets. Therefore security is not considered during development and administration as much as it should be. measure: Transparent and timely communication of the security targets by senior management is essential to ensure teams' buy-in and support. difficultyOfImplementation: knowledge: 1 time: 1 resources: 1 usefulness: 3 level: 2 implementation: [] references: samm2: - G-SM-A-2 iso27001-2017: - 5.1.1 - 7.2.1 iso27001-2022: - 5.1 - 5.4 comments: ""