https://cornucopia.owasp.org contains the card browser for each of the cards in the cornucopia suits together with the taxonomy and in depth explaination for each of the cards in the suits.
npm run productionbuild
To deploy the pages on a Cloudflare account, use the account id and the cloudflare api token with the following rights:
- Cloudflare Pages:Edit
- Workers Scripts:Edit
- Workers Routes:Edit
- User Details: Read
Github action is used for the deployment:
NB: The CLOUDFLARE_API_TOKEN needs to be renewed once a year.
# npm install will raise a conflict
pnpm install # https://pnpm.io/installation
npm run dev
Run tests with coverage reporting:
npm run test
View coverage thresholds and results in the terminal output. Coverage reports are generated in the ./coverage directory with the following formats:
- Text: Summary in terminal output
- JSON:
coverage/coverage-final.json - LCOV:
coverage/lcov.info(for IDE integration) - HTML: Open
coverage/index.htmlin a browser for detailed line-by-line coverage
The project enforces minimum coverage requirements:
- Statements: 95%
- Branches: 90%
- Functions: 100%
- Lines: 95%
Tests will fail if coverage drops below these thresholds.
To add a deck with this image-based card style (a picture for each card, shown behind suit colors for the tab, watermark, and royal cards, like how the EoP deck looks), just add three files (no code changes needed):
-
source/{edition}-styling-{version}.yaml: suit colors (tab, watermark, royal)suits: <suit-name>: tab: "#hexcolor" watermark: "#hexcolor" royal: "#hexcolor"
-
source/{edition}-card-images-{version}.yaml: image path for each cardcards: <cardId>: image: "/images/<edition>-cards/<file>.png"
-
src/lib/components/{edition}Card.css: how that specific deck looks, using the.card-render.{edition}class and the--tab/--watermark/--royalcolors. It loads automatically as long as the filename ends inCard.css(e.g.eopCard.css).
You may review the threat model for cornucopia.owasp.org by using OWASP Threat Dragon and opening ../ThreatDragonModels/cornucopia.json.