Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cornucopia.owasp.org/script/headers-stage.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ function main() {
Access-Control-Allow-Origin: *
! Content-Type
Content-Type: application/json
/api/mapping/companion/1.0
! Access-Control-Allow-Origin
Access-Control-Allow-Origin: *
! Content-Type
Content-Type: application/json
/api/cre/mobileapp/en
! Access-Control-Allow-Origin
Access-Control-Allow-Origin: *
Expand Down Expand Up @@ -124,3 +129,4 @@ function main() {
}

main();

6 changes: 6 additions & 0 deletions cornucopia.owasp.org/script/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,16 @@ function main() {
Access-Control-Allow-Origin: *
! Content-Type
Content-Type: application/json
/api/mapping/companion/1.0
! Access-Control-Allow-Origin
Access-Control-Allow-Origin: *
! Content-Type
Content-Type: application/json
`;

const headersFile = path.join(buildDir, '_headers');
fs.writeFileSync(headersFile, headers);
}

main();

42 changes: 42 additions & 0 deletions cornucopia.owasp.org/static/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,48 @@ paths:
capec: [ 54, 113, 116, 143, 144, 149, 150, 155, 169, 215, 224, 497, 541, 546 ]
capec_map: {}

/mapping/companion/{version}:
get:
summary: Get Companion Edition mapping by version
description: |
Get the OWASP Cornucopia Companion Edition mapping data
by version.
parameters:
- name: version
in: path
required: true
schema:
type: string
enum: ["1.0"]
responses:
'200':
description: Companion mapping data
content:
application/json:
schema:
type: object
examples:
example:
summary: Example Companion mapping response
value:
meta:
edition: companion
component: mappings
language: ALL
version: "1.0"
cards:
LLM2:
id: "LLM2"
value: "2"
url: "https://cornucopia.owasp.org/cards/LLM2"
stride: [ D ]
stride_print: [ "Denial of Service" ]
cia: [ A ]
cia_print: [ "Availability" ]
owasp_llm_top10: [ LLM10:2025 ]
owasp_llm_top10_print: [ "LLM10:2025: Unbounded Consumption" ]
cwe: [ CWE-400, CWE-770 ]

/mapping/mobileapp/{version}:
get:
summary: Get Mobile App mapping by version
Expand Down
1 change: 1 addition & 0 deletions cornucopia.owasp.org/svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ export default {
'/api/mapping/webapp/2.2',
'/api/mapping/webapp/3.0',
'/api/mapping/mobileapp/1.1',
'/api/mapping/companion/1.0',
'/edition/mobileapp/PC2/1.1/en',
'/edition/mobileapp/PC2/1.1/uk',
'/edition/mobileapp/PC2/1.1/hi',
Expand Down
Loading