Skip to content

Commit b988075

Browse files
committed
add AI
1 parent 473b2ac commit b988075

22 files changed

Lines changed: 1356 additions & 404 deletions

src/assets/YAML/default/AI/DataProtection.yaml

Lines changed: 82 additions & 68 deletions
Large diffs are not rendered by default.

src/assets/YAML/default/AI/Guidance.yaml

Lines changed: 368 additions & 129 deletions
Large diffs are not rendered by default.

src/assets/YAML/default/AI/Isolation.yaml

Lines changed: 278 additions & 55 deletions
Large diffs are not rendered by default.

src/assets/YAML/default/AI/RedTeaming.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ AI:
2727
time: 3
2828
resources: 1
2929
usefulness: 4
30-
level: 2
30+
level: 3
3131
tags:
3232
- ai
3333
- red-teaming
@@ -36,6 +36,8 @@ AI:
3636
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/aisvs-c07
3737
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/owasp-llm-top-10
3838
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/owasp-agentic-top-10
39+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/aima
40+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/owasp-ai-exchange
3941
references:
4042
samm2:
4143
- V-ST-A-1
@@ -54,16 +56,26 @@ AI:
5456
risk: |-
5557
One-off manual red teaming does not catch regressions. Model updates, prompt
5658
changes or new tool integrations silently reintroduce vulnerabilities in
57-
AI-based features.
59+
AI-based features. Upstream providers additionally update models without
60+
notice ("silent model drift"): identical prompts produce different
61+
behavior although nothing in the organization changed, and the change
62+
goes unnoticed until complaints accumulate.
5863
measure: |-
5964
Integrate automated AI red teaming / adversarial testing tools into the
6065
delivery pipeline of AI-based features and run them regularly and on every
61-
significant change to prompts, models or guardrails.
66+
significant change to prompts, models or guardrails. Complement the
67+
adversarial tests with behavioral regression tests ("golden answers"):
68+
defined test queries whose responses are compared semantically against
69+
approved reference answers, so silent upstream model updates are
70+
detected. Maintain the reference answers like any other reviewed
71+
content: stale expected answers make the tests pass while the
72+
responses are wrong.
6273
dependsOn:
6374
- b4233919-6de0-4ed3-b7da-3bdd91c8db5e # Basic AI red teaming
6475
assessment: |
6576
- Show the automated AI red teaming tool and its integration into the delivery pipeline.
6677
- Show recent runs, what triggered them (e.g. prompt or model changes) and how regressions are reported.
78+
- Show the golden-answer test set, the semantic comparison against reference answers and when the reference answers were last reviewed.
6779
difficultyOfImplementation:
6880
knowledge: 4
6981
time: 3
@@ -79,6 +91,8 @@ AI:
7991
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/garak
8092
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/pyrit
8193
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/promptfoo
94+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/aigf
95+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/aima
8296
references:
8397
samm2:
8498
- V-ST-A-2

src/assets/YAML/default/AI/Verification.yaml

Lines changed: 277 additions & 17 deletions
Large diffs are not rendered by default.

src/assets/YAML/default/AI/_meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ _meta:
99
The _Red Teaming_ subdimension focuses on adversarial testing of AI components and AI-based features.
1010
The _Data Protection_ subdimension focuses on preventing leakage of sensitive data through AI tools,
1111
including validation of model input and output (e.g. prompt injection prevention).
12-
The _Verification_ subdimension focuses on the verification of AI-generated code; automated security
12+
The _Verification_ subdimension focuses on the verification of AI-generated artifacts (specifications, plans and code); automated security
1313
testing such as SAST/DAST is intentionally NOT duplicated here, it is referenced from the
1414
_Test and Verification_ dimension (see ARCHITECTURE.md, section "Handling duplicates").

src/assets/YAML/default/BuildAndDeployment/Build.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,31 @@
22
---
33
Build and Deployment:
44
Build:
5-
Building and testing of artifacts in virtual environments:
5+
Building and testing of artifacts in virtualized environments:
66
uuid: a340f46b-6360-4cb8-847b-a0d3483d09d3
77
description: |-
88
While building and testing artifacts, third party systems, application frameworks
99
and 3rd party libraries are used. These might be malicious as a result of
1010
vulnerable libraries or because they are altered during the delivery phase.
11+
12+
Depending on your environment, usage of virtual machines
13+
or container technology is a good way. After the build, the filesystem should
14+
not be used again in other builds.
1115
risk: |-
1216
While building and testing artifacts, third party systems, application frameworks
1317
and 3rd party libraries are used. These might be malicious as a result of
1418
vulnerable libraries or because they are altered during the delivery phase.
1519
measure:
1620
Each step during within the build and testing phase is performed in
1721
a separate virtual environments, which is destroyed afterward.
18-
meta:
19-
implementationGuide:
20-
Depending on your environment, usage of virtual machines
21-
or container technology is a good way. After the build, the filesystem should
22-
not be used again in other builds.
2322
difficultyOfImplementation:
2423
knowledge: 2
2524
time: 2
2625
resources: 2
2726
usefulness: 2
2827
level: 2
28+
dependsOn:
29+
- 3a94d55e-fd82-4996-9eb3-20d23ff2a873 # Applications are running in virtualized environments
2930
implementation:
3031
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/ci-cd-tools
3132
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/container-technology
@@ -82,6 +83,11 @@ Build and Deployment:
8283
comments: ""
8384
Pinning of artifacts:
8485
uuid: f3c4971e-9f4d-4e59-8ed0-f0bdb6262477
86+
description:
87+
Pinning artifacts in Dockerfile refers to the practice of using specific,
88+
immutable versions of base images and dependencies in your build process. Instead of using the
89+
latest tag for your base image, select a specific version or digest. For example, replace FROM node:latest,
90+
to FROM node@sha256:abcdef12.
8591
risk:
8692
Unauthorized manipulation of artifacts might be difficult to spot. For
8793
example, this may result in using images with malicious code. Also, intended
@@ -91,12 +97,6 @@ Build and Deployment:
9197
comment:
9298
The usage of pinning requires a good processes for patching. Therefore,
9399
choose this activity wisely.
94-
meta:
95-
implementationGuide:
96-
Pinning artifacts in Dockerfile refers to the practice of using specific,
97-
immutable versions of base images and dependencies in your build process. Instead of using the
98-
latest tag for your base image, select a specific version or digest. For example, replace FROM node:latest,
99-
to FROM node@sha256:abcdef12.
100100
difficultyOfImplementation:
101101
knowledge: 2
102102
time: 2

src/assets/YAML/default/BuildAndDeployment/Deployment.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,56 @@ Build and Deployment:
189189
iso27001-2022:
190190
- 5.37
191191
- 8.32
192+
Drift detection for deployed configuration:
193+
uuid: 9cba815f-02d2-4b06-a11f-7f28580e135a
194+
description: |-
195+
Deployment pipelines put an approved, versioned state into production —
196+
drift detection continuously verifies that production still matches it.
197+
Deployed infrastructure and configuration can be changed past the
198+
pipeline: through a quick hotfix, direct console or shell access, or a
199+
compromised automation account. Continuously comparing the running
200+
state against the versioned desired state (e.g. GitOps reconciliation,
201+
infrastructure-as-code plan diffs) detects such out-of-band changes.
202+
risk: |-
203+
Production is modified outside the deployment process — a manual
204+
hotfix, a console change or an attacker altering configuration. The
205+
running state no longer matches the reviewed, versioned state:
206+
hardening is silently loosened and never restored, the repository
207+
gives a false sense of the deployed reality, and rebuilding the
208+
environment reproduces neither the fix nor the compromise analysis.
209+
measure: |-
210+
Continuously compare the deployed state of infrastructure and
211+
configuration against the versioned desired state (e.g. via GitOps
212+
controllers that reconcile and report drift, or scheduled
213+
infrastructure-as-code plan runs). Alert on every deviation and either
214+
revert it automatically to the approved state or bring the change
215+
through the regular review process. Document intentional exceptions
216+
so the alerts stay actionable.
217+
dependsOn:
218+
- 67e1a9aa-9fbf-4ec5-a2de-400f01960c51 # Automated deployment process
219+
assessment: |
220+
- Show the drift detection mechanism (e.g. GitOps reconciliation status or scheduled plan diffs) and the covered environments.
221+
- Demonstrate that an out-of-band change to production configuration raises an alert or is reverted automatically.
222+
- Show how the last drift finding was handled (automatic revert or formal re-approval) and the documented exceptions.
223+
difficultyOfImplementation:
224+
knowledge: 3
225+
time: 2
226+
resources: 2
227+
usefulness: 4
228+
level: 3
229+
implementation:
230+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/gitops
231+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/argocd
232+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/fluxcd
233+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/terraform
234+
references:
235+
samm2:
236+
- O-EM-A-2
237+
iso27001-2017:
238+
- 12.1.2
239+
iso27001-2022:
240+
- 8.9
241+
comments: ""
192242
Environment depending configuration parameters (secrets):
193243
uuid: df428c9d-efa0-4226-9f47-a15bb53f822b
194244
risk: >-

src/assets/YAML/default/CultureAndOrganization/Design.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Culture and Organization:
3030
* Input is escaped output is encoded appropriately using well established libraries.
3131
3232
Source: OWASP Project Integration Project
33+
# AI support
34+
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_.
3335
implementation:
3436
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/whiteboard
3537
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/miro-or-any-other-c
@@ -38,6 +40,8 @@ Culture and Organization:
3840
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/owasp-samm
3941
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/threagile
4042
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/threat-matrix-for-storage
43+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/apiiro-ai-threat-modeling
44+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/threat-designer
4145
references:
4246
samm2:
4347
- D-TA-B-2
@@ -112,7 +116,7 @@ Culture and Organization:
112116
113117
![SKF](https://github.com/OWASP/www-project-integration-standards/raw/master/writeups/owasp_in_sdlc/images/skf_qs.png "SKF")
114118
115-
This practice has the side effect that it trains non-security specialists to think like attackers.
119+
This practice has the side effect that it trains non-security specialists to spot how functionality can be misused.
116120
117121
The outcomes of this stage should help lay the foundation of secure design and considerations.
118122
@@ -127,6 +131,10 @@ Culture and Organization:
127131
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.
128132
129133
Source: OWASP Project Integration Project
134+
# AI support
135+
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.
136+
137+
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.
130138
risk:
131139
Technical related threats are discovered too late in the development and deployment process.
132140
measure: |
@@ -147,6 +155,8 @@ Culture and Organization:
147155
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/threat-modeling-play
148156
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/owasp-samm
149157
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/threat-matrix-for-storage
158+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/threat-designer
159+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/tm-skills
150160
references:
151161
samm2:
152162
- D-TA-B-2
@@ -197,6 +207,17 @@ Culture and Organization:
197207
comments: ""
198208
Creation of simple abuse stories:
199209
uuid: bacf85b6-5bc0-405d-b5ba-a5d971467cc1
210+
description: |-
211+
Abuse stories are the attacker's counterpart to user stories: for a
212+
given user story they describe how the same functionality can be
213+
misused. Large language models are well suited as a complementary
214+
tool for this activity: given a user story and its acceptance
215+
criteria, they generate candidate abuse stories. This covers a step
216+
teams often skip, because systematically asking how functionality
217+
can be misused requires experience most development teams do not
218+
have. Generated abuse stories are drafts: the team
219+
reviews them, discards irrelevant ones and derives security
220+
acceptance criteria from the relevant ones.
200221
risk:
201222
User stories mostly don't consider security implications. Security flaws
202223
are discovered too late in the development and deployment process.

src/assets/YAML/default/Implementation/ApplicationHardening.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,14 @@ Implementation:
283283
- App. Hardening Level 2
284284
Secure headers:
285285
uuid: 29318d60-18ce-4526-80ea-f5928e49f639
286+
description: |
287+
Essential headers:
288+
- Content-Security-Policy: Define trusted sources for content
289+
- Strict-Transport-Security: Enforce HTTPS connections
290+
- X-Frame-Options: Prevent clickjacking attacks
291+
- X-Content-Type-Options: Prevent MIME-type sniffing
292+
- X-XSS-Protection: Enable browser's XSS filtering
293+
- Referrer-Policy: Control information in the Referrer header
286294
risk: |
287295
Missing or misconfigured security headers can lead to various security vulnerabilities, e.g.:
288296
- Cross-Site Scripting (XSS) due to missing Content Security Policy
@@ -310,15 +318,6 @@ Implementation:
310318
level: 3
311319
implementation:
312320
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/owasp-secure-headers
313-
meta:
314-
implementationGuide: |
315-
Essential headers:
316-
- Content-Security-Policy: Define trusted sources for content
317-
- Strict-Transport-Security: Enforce HTTPS connections
318-
- X-Frame-Options: Prevent clickjacking attacks
319-
- X-Content-Type-Options: Prevent MIME-type sniffing
320-
- X-XSS-Protection: Enable browser's XSS filtering
321-
- Referrer-Policy: Control information in the Referrer header
322321
references:
323322
samm2:
324323
- O-EM-A-2

0 commit comments

Comments
 (0)