Web Scaffolding for the Companion Edition on OWASP Cornucopia website#2528
Open
ayman-art wants to merge 25 commits intoOWASP:masterfrom
Open
Web Scaffolding for the Companion Edition on OWASP Cornucopia website#2528ayman-art wants to merge 25 commits intoOWASP:masterfrom
ayman-art wants to merge 25 commits intoOWASP:masterfrom
Conversation
… 9 suits in data/cards/companion-cards-1.0-en via local script.
…source\companion-cards-1.0-en.yaml as it is the expected name.
…small paragraph for companion to be edited.
- add companion edition with version 1.0 to decks - add language 'en' to companion edition
- add companion to decks list - add companion version 1.0 to latests list
- update cards map to include campanion cards.
… include companion suits and cards
… for normal suit cards, and (#e8e8e8) to royal ones) to companion edition
…n changing version to companion
…[version]/[lang] route
… attacks of companion edition.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements web pages for the Companion Edition on the OWASP Cornucopia website, closing #2393.
Changes
Data scaffolding —
cornucopia.owasp.org/data/cards/companion-cards-1.0-en/llm,agentic-ai,cloud,frontend,devops,social-engineering,automated-threatsLLM2,AAI3) contains two files:explanation.md— pre-filled with a Scenario/Threat Modeling templatetechnical-note.md— intentionally empty, to be filled latercompanion-cards-1.0.yaml→companion-cards-1.0-en.yamlto match the expected naming convention used by the deck loadercornucopia.owasp.org/src/domain/card/cardColor.ts#dbdbdb) for standard cards and a lighter grey (#e8e8e8) for royal cards for now.cornucopia.owasp.org/src/domain/card/order.tscornucopia.owasp.org/src/domain/suit/order.tscornucopia.owasp.org/src/domain/suit/suitController.tscompanionedition with version1.0and languageencornucopia.owasp.org/src/lib/services/deckService.tscompanion,1.0,['en']) to bothlatestsanddecksarrayscornucopia.owasp.org/src/lib/components/companionCardMapping.svelte(new)id,value,url,*_print), as in other editions, keys with _print is not displayed. this is handled dynamically'-'capeckey with properCAPEC™labelcornucopia.owasp.org/src/lib/components/companionCardTaxonomy.svelte(new)mobileAppCardTaxonomy.svelteMappingsListandAttackscomponentscards.companionCardTaxonomy.h1.1and.h1.2cornucopia.owasp.org/src/lib/components/cardFound.sveltecompanionedition usingCompanionCardTaxonomycornucopia.owasp.org/src/lib/components/cardPreview.svelteCompanionCardMappingfor companion edition card previewscornucopia.owasp.org/data/website/pages/cards/en.jsonbutton.3andh2.3entries for the Companion version selector button and section headingp4paragraph describing the Companion EditioncompanionCardTaxonomy.h1translation keys for Mappings and Attacks headingscornucopia.owasp.org/src/routes/cards/+page.server.tscornucopia.owasp.org/src/routes/cards/+page.svelteVERSION_COMPANIONconstant andcompanionSuitsderived storeAAI2cornucopia.owasp.org/src/routes/cards/[card]/+page.server.tscornucopia.owasp.org/src/routes/cards/[card]/+page.sveltecards_options"companion"→"Companion Edition"mapping ingetEdition()cornucopia.owasp.org/src/routes/edition/[edition]/+page.svelteVERSION_COMPANIONconstantAAI2cornucopia.owasp.org/src/routes/edition/[edition]/[card]/+page.server.tscompanionedition now correctly maps to version1.0cornucopia.owasp.org/src/routes/edition/[edition]/[card]/:(
+page.svelte,[version]/+page.svelte,[version]/[lang]/+page.svelte)cards_optionsin each route"companion"→"Companion Edition"togetEdition()in each routecornucopia.owasp.org/src/lib/services/deckService.test.tshasEdition,hasVersion,hasLanguage,getDecks,getLatestVersion,getLatestEditions,getLanguages,getLanguagesForEditionVersion,getVersionsgetDecksexpected length from 3 → 4,getLatestEditionsfrom 2 → 3cornucopia.owasp.org/src/lib/services/decService.integration.test.ts1.0/endata loads without errorRoutes implemented
The following routes now work for the Companion Edition:
https://cornucopia.owasp.org/cards/{card code}https://cornucopia.owasp.org/edition/companion/{card code}/1.0/enhttps://cornucopia.owasp.org/edition/companion/{card code}/1.0https://cornucopia.owasp.org/edition/companion/{card code}https://cornucopia.owasp.org/edition/companionCards are also browsable from
https://cornucopia.owasp.org/cardsvia the new "Companion version" tab.Screenshots
browsing from cards/:


browsing from edition/companion:
route edition/companion/[card]/[version]/[lang] and similarly edition/companion/[card]/[version] and edition/companion/[card]:



route card/[card]:
Notes
#dbdbdb) for now, as specified.technical-note.mdfiles are intentionally empty;explanation.mdfiles carry the agreed Scenario/Threat Modeling template as specified.companion-cards-1.0-en.yamlrename was required to match the deck loader's existing logic.