Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Cornucopia website #992

Merged
merged 406 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
406 commits
Select commit Hold shift + click to select a range
ad36bca
Bump mvdan/shfmt from `f30aadd` to `ad0c069`
dependabot[bot] Dec 23, 2024
0f28b99
Bump github/codeql-action from 3.27.9 to 3.28.0
dependabot[bot] Dec 23, 2024
db0df24
Fix conflict
sydseter Feb 3, 2025
2bbe972
Bump hypothesis from 6.122.4 to 6.122.7
dependabot[bot] Dec 23, 2024
e33aada
Fix conflict
sydseter Feb 3, 2025
68c54f1
Bump click from 8.1.7 to 8.1.8
dependabot[bot] Dec 23, 2024
d05f5e6
Update install_cornucopia_deps.txt
sydseter Dec 23, 2024
42d176a
Bump hypothesis from 6.122.7 to 6.123.0
dependabot[bot] Dec 24, 2024
0a2205c
Fix conflict
sydseter Feb 3, 2025
dd90cb3
Bump mypy from 1.13.0 to 1.14.0
dependabot[bot] Dec 24, 2024
92962fd
Bump coverage from 7.6.9 to 7.6.10
dependabot[bot] Dec 27, 2024
b5988fa
Bump mvdan/shfmt from `ad0c069` to `956145b`
dependabot[bot] Dec 27, 2024
1be811c
Bump hypothesis from 6.123.0 to 6.123.1
dependabot[bot] Dec 25, 2024
f927b30
Bump hypothesis from 6.123.1 to 6.123.2
dependabot[bot] Dec 27, 2024
7c810fd
Fix conflict
sydseter Feb 3, 2025
96b245e
Bump coverage from 7.6.9 to 7.6.10
dependabot[bot] Dec 30, 2024
6498d2d
Update install_cornucopia_deps.txt
sydseter Jan 2, 2025
6035a7f
Update install_cornucopia_deps.txt
sydseter Jan 2, 2025
ba46e85
Fix conflict
sydseter Feb 3, 2025
89f35a3
Bump mypy from 1.14.0 to 1.14.1
dependabot[bot] Jan 1, 2025
2c7fc71
Bump mypy from 1.14.0 to 1.14.1
dependabot[bot] Jan 3, 2025
4d6ff1e
Bump mvdan/shfmt from `956145b` to `5064aa6`
dependabot[bot] Jan 3, 2025
e0cca25
Fix conflict
sydseter Feb 3, 2025
67646ac
Bump mvdan/shfmt from `5064aa6` to `2ac1dcd`
dependabot[bot] Jan 6, 2025
42671a0
Bump setuptools from 75.6.0 to 75.7.0
dependabot[bot] Jan 6, 2025
469a6ee
Bump virtualenv from 20.28.0 to 20.28.1
dependabot[bot] Jan 3, 2025
eff54da
Update requirements.txt
sydseter Jan 3, 2025
816cd66
Bump charset-normalizer from 3.3.2 to 3.4.1
dependabot[bot] Dec 30, 2024
8d1385b
Update install_cornucopia_deps.txt
sydseter Jan 2, 2025
a39f8dd
Update install_cornucopia_deps.txt
sydseter Jan 2, 2025
eff16ad
Bump pathvalidate from 3.2.2 to 3.2.3
dependabot[bot] Jan 7, 2025
5c9fda7
Bump hypothesis from 6.123.2 to 6.123.7
dependabot[bot] Jan 7, 2025
4efd704
Bump python from `804ad02` to `6076e7d`
dependabot[bot] Jan 8, 2025
d193c5b
Fix conflict
sydseter Feb 3, 2025
4d8d0b4
Bump hypothesis from 6.123.7 to 6.123.13
dependabot[bot] Jan 10, 2025
bd5871b
Bump step-security/harden-runner from 2.10.2 to 2.10.3
dependabot[bot] Jan 10, 2025
10221dc
Bump actions/upload-artifact from 4.5.0 to 4.6.0
dependabot[bot] Jan 10, 2025
96c3942
Bump python from `6076e7d` to `9ab3b6e`
dependabot[bot] Jan 10, 2025
2230886
Bump setuptools from 75.7.0 to 75.8.0
dependabot[bot] Jan 10, 2025
39adaf4
Update README.md
sydseter Jan 9, 2025
57f36cc
Update webapp-cards-1.22-en.yaml
sydseter Jan 9, 2025
cccee6d
Update webapp-cards-2.00-nl.yaml
sydseter Jan 9, 2025
3e1e285
Update webapp-cards-1.22-no_nb.yaml
sydseter Jan 10, 2025
155c5dc
Update webapp-cards-1.22-es.yaml
sydseter Jan 10, 2025
ddb616f
Update webapp-cards-2.00-pt-pt.yaml
sydseter Jan 10, 2025
fb1fbdb
Update webapp-cards-2.00-it.yaml
sydseter Jan 10, 2025
55ebbdd
Update webapp-cards-2.00-es.yaml
sydseter Jan 10, 2025
51906fc
Update webapp-cards-2.00-en.yaml
sydseter Jan 10, 2025
12f70d2
Update webapp-cards-1.22-pt-pt.yaml
sydseter Jan 10, 2025
c3bc3fd
Update webapp-cards-2.00-pt_br.yaml
sydseter Jan 10, 2025
ed593e6
Update webapp-cards-1.22-pt_br.yaml
sydseter Jan 10, 2025
5a035d6
Update webapp-cards-2.00-no_nb.yaml
sydseter Jan 10, 2025
0fff93c
Update mobileapp-cards-1.00-en.yaml
sydseter Jan 10, 2025
b5b7c08
Update webapp-cards-2.00-fr.yaml
sydseter Jan 10, 2025
34cea0b
Update webapp-cards-1.22-fr.yaml
sydseter Jan 10, 2025
bb1b6ce
Update webapp-cards-1.22-it.yaml
sydseter Jan 10, 2025
65d0be2
Update webapp-cards-1.22-nl.yaml
sydseter Jan 10, 2025
e46cf15
Update mobileapp-cards-1.00-en.yaml
sydseter Jan 10, 2025
47cf015
Bump hypothesis from 6.123.13 to 6.123.16
dependabot[bot] Jan 13, 2025
4854f5f
Bump github/codeql-action from 3.28.0 to 3.28.1
dependabot[bot] Jan 13, 2025
1f9cd37
Bump hypothesis from 6.123.16 to 6.123.17
dependabot[bot] Jan 14, 2025
43aa300
Bump virtualenv from 20.28.1 to 20.29.0
dependabot[bot] Jan 16, 2025
a354465
Bump hypothesis from 6.123.17 to 6.124.0
dependabot[bot] Jan 16, 2025
943c144
Bump mvdan/shfmt from `2ac1dcd` to `9e7fbaf`
dependabot[bot] Jan 17, 2025
0307900
Bump mvdan/shfmt from `9e7fbaf` to `f3d0d6f`
dependabot[bot] Jan 20, 2025
1a0edc8
Bump hypothesis from 6.124.0 to 6.124.1
dependabot[bot] Jan 20, 2025
7d7939e
Bump virtualenv from 20.29.0 to 20.29.1
dependabot[bot] Jan 20, 2025
a230cf9
Bump step-security/harden-runner from 2.10.3 to 2.10.4
dependabot[bot] Jan 20, 2025
f0b05d9
Bump github/codeql-action from 3.28.1 to 3.28.2
dependabot[bot] Jan 22, 2025
8d38cf3
Bump github/codeql-action from 3.28.2 to 3.28.4
dependabot[bot] Jan 24, 2025
1b84ae8
Bump filelock from 3.16.1 to 3.17.0
dependabot[bot] Jan 23, 2025
2ab583d
Bump hypothesis from 6.124.1 to 6.124.2
dependabot[bot] Jan 23, 2025
c5e627f
Bump pipenv from 2024.4.0 to 2024.4.1
dependabot[bot] Jan 23, 2025
f727496
Fix conflict
sydseter Feb 3, 2025
3811e7b
Sign: Removed personal Github integration
jefmeijvis Sep 11, 2024
da897e4
Create endpoints for the QR codes.
sydseter Sep 12, 2024
eed947e
use asvs 4.0.3 mapping
sydseter Sep 13, 2024
c0db318
Add prerender links to the config and fix broken links
sydseter Sep 13, 2024
eee7e14
Add cornucopia as a card to the suit.
sydseter Sep 13, 2024
70e57b6
Add cards/cornucopia to the prerendering
sydseter Sep 13, 2024
4eb36f8
Fix folder case
sydseter Sep 13, 2024
3f43695
fix folder name
sydseter Sep 13, 2024
eb98c53
Sign: Temp rename cornucopia.png card
jefmeijvis Sep 17, 2024
2ed39f5
Sign: Make CORNUCOPIA.png captital so it alligns with the other cards
jefmeijvis Sep 17, 2024
fc30431
Sign: Stripped out old visitor tracking
jefmeijvis Sep 17, 2024
d261d48
Sign: Added CSS card rendering instead of PNG images
jefmeijvis Sep 17, 2024
5570b8a
Sign: Replaced the card images on the homepage with the new rendered …
jefmeijvis Sep 26, 2024
1962f71
Fetch the mapping from the cornucopia repository.
sydseter Sep 19, 2024
6224bbd
Update lock file
sydseter Sep 20, 2024
5b224ab
Mock DeckService in order to avoid making requests to the cornucopia …
sydseter Sep 20, 2024
c241f4e
Sign: Updated card preview to work with updated Suitcontroller and De…
jefmeijvis Sep 26, 2024
51e06c6
Fix conflict
sydseter Feb 3, 2025
90c267f
Adding taxonomy for the mobile version.
sydseter Nov 12, 2024
7269900
change card code to cm
sydseter Nov 12, 2024
a945297
Add card scenarios
sydseter Nov 12, 2024
f665c45
Add card scenarios
sydseter Nov 12, 2024
52e2a26
Add description for taxonomy regarding MASTG-TEST-0068
sydseter Nov 12, 2024
e1ebe37
Adding attacks, explanation and technical notes
sydseter Nov 13, 2024
8770992
Updating explanation and technical notes
sydseter Nov 13, 2024
d63c91f
Adding support for mobile deck
sydseter Nov 15, 2024
c43d06e
correct getSuitNameByCardId
sydseter Nov 16, 2024
6f6a6cb
Adding about and printing instructions. Changing the video on the how…
sydseter Nov 19, 2024
ac49c52
Fixing some urls and styles.
sydseter Nov 19, 2024
b3e5876
Sign: Packages minor & patch version updates
jefmeijvis Nov 20, 2024
e37b2e2
Sign: Removed old google analytics integration
jefmeijvis Nov 20, 2024
6fd40ed
Sign: Removed debugging url printing on markdown image render component
jefmeijvis Nov 20, 2024
30e39f2
Sign: Removed copied folder from mobileapp cards data
jefmeijvis Nov 20, 2024
72a4fb4
Sign: Added support for browsing mobile deck
jefmeijvis Nov 20, 2024
ca42950
Sign: Added card colors for mobile card deck
jefmeijvis Nov 20, 2024
51c2477
Sign: Updated webshop page with support for multiple vendors
jefmeijvis Nov 20, 2024
813e3fe
Sign: Added button to toggle between versions
jefmeijvis Nov 20, 2024
166b625
Sign: More responsive scaling for the card rendering
jefmeijvis Nov 20, 2024
c501b29
Sign: Consistent CSS styling box-shadow
jefmeijvis Nov 21, 2024
1a8dc79
Sign: Removed hover effect on card preview
jefmeijvis Nov 21, 2024
2a9d0cb
Sign: Improved UX when switching between deck versions
jefmeijvis Nov 21, 2024
21e177b
Sign: Button scaling on mobile
jefmeijvis Nov 21, 2024
7305cc4
Sign: Better responsive scaling on mobile devices
jefmeijvis Nov 21, 2024
572f9d3
Sign: Default cards to be shown when switching versions
jefmeijvis Nov 21, 2024
5a60cd2
Sign: Updated breadcrumbs component
jefmeijvis Nov 21, 2024
e0dd7d0
Sign: Fixed blockquote styling
jefmeijvis Nov 21, 2024
dc5ac66
Sign: Fixed layout issue
jefmeijvis Nov 21, 2024
9c933e6
Sign: Make cookie notice readable again
jefmeijvis Nov 21, 2024
60a89e4
Add solution for translations
sydseter Nov 22, 2024
6bc075f
Refactoring so that the cards can be internationalized.
sydseter Nov 23, 2024
e534baa
Remove the explaination card
sydseter Nov 23, 2024
1517efe
Cleanup
sydseter Nov 23, 2024
e4f1919
Ensure the website material for the decks can be translated in multip…
sydseter Nov 23, 2024
7013f1d
Ensure we can translate the taxonomy as well.
sydseter Nov 23, 2024
57cf4ac
Ensure mobile card codes can be used with the browser.
sydseter Nov 26, 2024
27ecb03
Fixed the card browser.
sydseter Nov 28, 2024
25e6e22
Implement mapping for the mobile deck
sydseter Nov 28, 2024
3d1d4d5
Fix syntax error
sydseter Nov 28, 2024
1ff7768
Clean up. Fix home page.
sydseter Nov 29, 2024
9cbcf67
Adding faq and roadmap pages, breadcrumbs and adjust css.
sydseter Dec 2, 2024
349715b
fix broken link
sydseter Dec 2, 2024
a103ae4
Fix linking and orthography
sydseter Dec 4, 2024
a7d4186
Fix 404s
sydseter Dec 4, 2024
7a533a2
Correct ortography.
sydseter Dec 5, 2024
7159ec6
Add translation for all elements and fix the hero card preview on the…
sydseter Dec 23, 2024
ca2949a
Ensure navigation and the home page is responsive.
sydseter Jan 2, 2025
facb38a
Fix english translation and ensure the items in the sub menu flexes
sydseter Jan 2, 2025
0d31272
Fix logo and the introduction.
sydseter Jan 3, 2025
b0a75e8
Add a bit of top margin to the logo.
sydseter Jan 3, 2025
89ac0af
Removing references to DotNetLab where it is not warranted.
sydseter Jan 3, 2025
b788faf
resolve merge conflict.
sydseter Jan 3, 2025
66a3439
Merge from general-feedback branch
sydseter Jan 3, 2025
896ede9
Typo
jefmeijvis Dec 24, 2024
603109b
Merge from general-feedback branch
sydseter Jan 3, 2025
ac4b8d5
Merge from general-feedback branch
sydseter Jan 3, 2025
dbcb929
restored styling of cards
jefmeijvis Dec 24, 2024
1c82f19
Ensure the desktop menu displays correctly when javascript is disabled.
sydseter Jan 3, 2025
ec08623
simplify layout and remove unused styles. Fixup mobile layout.
sydseter Jan 3, 2025
93fe96e
minor fixes.
sydseter Jan 3, 2025
5dac3c4
Remove the suit from the url.
sydseter Jan 3, 2025
6e8fe9b
Ensure the mobile menu works without javascript.
sydseter Jan 4, 2025
e30653b
Sign: CSS adjustments, manual hero card selection, changed list inden…
jefmeijvis Jan 6, 2025
1a483ba
Sign: Fixed external link CSS typo
jefmeijvis Jan 6, 2025
a234317
Sign: Updated link after pseudo element method so it can match text c…
jefmeijvis Jan 6, 2025
c55d195
Sign: Added message and direct youtube link for when javascript is di…
jefmeijvis Jan 6, 2025
c79f66a
Ensure the site works without javascript
sydseter Jan 6, 2025
3b9c646
Apply revision
sydseter Jan 8, 2025
c80b849
Ensure first word is capitalized.
sydseter Jan 8, 2025
8a48c96
Sign: Removed unused old components
jefmeijvis Jan 7, 2025
e8b5c55
Fix conflict
sydseter Feb 3, 2025
a459c28
Fix mapping
sydseter Jan 8, 2025
b964c8f
fix case
sydseter Jan 8, 2025
544c532
fix case
sydseter Jan 8, 2025
5f94cfe
fix case
sydseter Jan 8, 2025
445e83c
Fix case issues
sydseter Jan 9, 2025
e3f8005
Fix case
sydseter Jan 9, 2025
241ad17
Fix logo
sydseter Jan 9, 2025
16b52a9
remove disc from un ordered markup list.
sydseter Jan 9, 2025
5c87a72
fix spelling
sydseter Jan 9, 2025
e344994
remove br
sydseter Jan 9, 2025
e352143
use p instead of list
sydseter Jan 9, 2025
d0e2f36
Sign: Updated external link indicator
jefmeijvis Jan 9, 2025
d960fce
correct headers.
sydseter Jan 9, 2025
fc83bf3
correct test.
sydseter Jan 9, 2025
4cb686f
Fix styles in markup.
sydseter Jan 9, 2025
f02ff34
Remove logging.
sydseter Jan 9, 2025
07a9c8b
Remove commenting from everywhere but the news
sydseter Jan 9, 2025
1015a78
remove sanitization
sydseter Jan 9, 2025
3933bb1
add p instead of list
sydseter Jan 9, 2025
e99b999
Sign: Updated opengraph from logo to dedicated image so it fits on se…
jefmeijvis Jan 13, 2025
adbf6aa
remove duplicate line
sydseter Jan 9, 2025
669f6d4
add csp policy
sydseter Jan 10, 2025
812d132
Ensure a strict csp policy is enforced.
sydseter Jan 13, 2025
5c83aca
fixup
sydseter Jan 14, 2025
6bea73d
fixup
sydseter Jan 14, 2025
a910991
fixup
sydseter Jan 14, 2025
35e87a0
Fix revisions.
sydseter Jan 14, 2025
cd54339
Add vercel to the policy
sydseter Jan 14, 2025
4652462
Add vercel to the policy
sydseter Jan 14, 2025
5f0d400
Add cso for vite preview
sydseter Jan 14, 2025
95698c6
adding vercel preview config
sydseter Jan 14, 2025
3b50013
Fix url issues.
sydseter Jan 14, 2025
cf96a41
ignore missing id when card
sydseter Jan 14, 2025
dac3abe
Ensure the id's for the nonscript version of the card browser card is…
sydseter Jan 14, 2025
1e05101
Use hooks to add headers.
sydseter Jan 14, 2025
b3c9eeb
Add various options for writing the headers file
sydseter Jan 14, 2025
a8427ad
Add various options for writing the headers file
sydseter Jan 14, 2025
7a1d032
Fix conflict
sydseter Feb 3, 2025
f966bba
Fix conflict
sydseter Feb 3, 2025
10c263f
move code into subfolder
sydseter Jan 24, 2025
079c5da
Adding the website add build job
sydseter Jan 24, 2025
9f90986
build
sydseter Jan 24, 2025
bde9f7f
change wd for build
sydseter Jan 24, 2025
3c5facc
Ensure node installs in sub dir
sydseter Jan 24, 2025
fb5d8d1
Ensure github is merged
sydseter Jan 24, 2025
b216d98
Remove cache
sydseter Jan 24, 2025
cb68d17
add cache dir and correct the sync
sydseter Jan 24, 2025
58b7dd9
deploy to cloudflare
sydseter Jan 24, 2025
e95ae95
test deploy
sydseter Jan 24, 2025
5b1eb42
Differeniate headers between how-to-play and the rest
sydseter Jan 24, 2025
c259e05
Add noindex for now.
sydseter Jan 24, 2025
4b0f12c
allow only one domain
sydseter Jan 24, 2025
725ea38
Add img-src policy
sydseter Jan 24, 2025
d32d94e
Fix conflict
sydseter Feb 3, 2025
324ac09
Adding static nonce
sydseter Jan 24, 2025
b839d62
call replace all globally
sydseter Jan 24, 2025
d325630
add base-uri
sydseter Jan 24, 2025
d02c93f
fix baseuri
sydseter Jan 24, 2025
45f544f
fix baseuri
sydseter Jan 24, 2025
a048f56
remove header first
sydseter Jan 24, 2025
efa050e
remove try adding nonce
sydseter Jan 24, 2025
2588739
Add nonce to the stylesheet
sydseter Jan 25, 2025
ff6ed09
Turn of csp
sydseter Jan 25, 2025
3a3a016
Turn of csp
sydseter Jan 25, 2025
0c4a7ce
remove script-src-elem
sydseter Jan 25, 2025
e2c783a
remove self from script-src
sydseter Jan 25, 2025
a095773
add unsafe-line
sydseter Jan 25, 2025
dd05400
Add self to script-src
sydseter Jan 25, 2025
a2c283c
Add self to script-src
sydseter Jan 25, 2025
88d2764
upgrade insecure requests and add anonymous iframe
sydseter Jan 25, 2025
46aeae1
add picture-in-picture support
sydseter Jan 25, 2025
7acb2ab
add picture-in-picture support
sydseter Jan 25, 2025
5a86448
Add wrangler file
sydseter Jan 25, 2025
64820cc
Add wrangler file
sydseter Jan 25, 2025
e215447
Fix conflict
sydseter Feb 3, 2025
56e1d68
Ignore GHSA-vg6x-rcgg-rjx6 as there are no exploitable attack vector …
sydseter Jan 27, 2025
aba3b5e
Ignore GHSA-vg6x-rcgg-rjx6 adding comment
sydseter Jan 27, 2025
c5a43dd
Fix style for script
sydseter Jan 27, 2025
66d56c4
Fix so that it doesn't do anything to files.
sydseter Jan 28, 2025
d967f36
Rename staging token and account id secrets. Correcting the zone name.
sydseter Jan 28, 2025
49b5611
Changing the COM code for mobile cornucopia suit to CM
sydseter Jan 28, 2025
a39bfbd
Update deploy-staging.yml
sydseter Jan 28, 2025
bb31358
Change code for mobile cornucopia suit from COM to CM
sydseter Jan 28, 2025
3eada21
Fix conflict
sydseter Feb 3, 2025
68e980f
resolve conflict
sydseter Feb 3, 2025
a232afb
Change the news headline into Cornucopia Community News and add a blo…
sydseter Feb 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
npm-debug.log
build
.svelte-kit
Empty file added .env
Empty file.
46 changes: 46 additions & 0 deletions .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Build and Test
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
paths:
- 'cornucopia.owasp.org/**'
permissions:
contents: read
jobs:
hardening:
name: Hardening
runs-on: ubuntu-latest
steps:
# Make sure we have some code to test
- name: Harden runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
github-cloud.githubusercontent.com:443
github.com:443
motd.ubuntu.com:443
keys.openpgp.org:443
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
name: Install pnpm
with:
version: 10.0.0
run_install: false

- name: Install Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20.18.2
- name: Build
working-directory: cornucopia.owasp.org
run: |
pnpm install # Install dependencies
npm run build # Build production version
pnpm audit --prod
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: ["python"]
language: ["python", "typescript"]
# CodeQL supports [ $supported-codeql-languages ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Dependency Review'
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
with:
# Ignore GHSA-vg6x-rcgg-rjx6 as the dev server is not used for static projects other then for debugging locally
allow-ghsas: GHSA-vg6x-rcgg-rjx6,
62 changes: 62 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
name: Build and Deploy The Cornucopia Website on Production
on:
push:
branches: [master]
paths:
- 'cornucopia.owasp.org/**'
permissions:
contents: read
jobs:
if: false
hardening:
name: Hardening
runs-on: ubuntu-latest
steps:
# Make sure we have some code to test
- name: Harden runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
github-cloud.githubusercontent.com:443
github.com:443
motd.ubuntu.com:443
keys.openpgp.org:443
build-and-deploy-production:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
name: Install pnpm
with:
version: 10.0.0
run_install: false

- name: Install Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20.18.2
- name: Build
working-directory: cornucopia.owasp.org
run: |
pnpm install # Install dependencies
npm run build # Build production version
- name: Deploy the website
uses: cloudflare/wrangler-action@7a5f8bbdfeedcde38e6777a50fe685f89259d4ca
with:
workingDirectory: "cornucopia.owasp.org"
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
wranglerVersion: "3.105.1"
command: pages deploy build --project-name=cornucopia
- name: Deploy the worker routes
uses: cloudflare/wrangler-action@7a5f8bbdfeedcde38e6777a50fe685f89259d4ca
with:
workingDirectory: "cornucopia.owasp.org"
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
wranglerVersion: "3.105.1"
command: deploy script/nonce-worker.js --config script/wrangler.toml --env production
60 changes: 60 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
name: Build and Deploy The Cornucopia Website on Staging
on:
pull_request:
paths:
- 'cornucopia.owasp.org/**'
permissions:
contents: read
jobs:
hardening:
name: Hardening
runs-on: ubuntu-latest
steps:
# Make sure we have some code to test
- name: Harden runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
github-cloud.githubusercontent.com:443
github.com:443
motd.ubuntu.com:443
keys.openpgp.org:443
build-and-deploy-staging:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
name: Install pnpm
with:
version: 10.0.0
run_install: false

- name: Install Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20.18.2
- name: Build
working-directory: cornucopia.owasp.org
run: |
pnpm install # Install dependencies
npm run build # Build production version
- name: Deploy the website
uses: cloudflare/wrangler-action@7a5f8bbdfeedcde38e6777a50fe685f89259d4ca
with:
workingDirectory: "cornucopia.owasp.org"
apiToken: ${{ secrets.CLOUDFLARE_STAGING_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_STAGING_ACCOUNT_ID }}
wranglerVersion: "3.105.1"
command: pages deploy build --project-name=cornucopia
- name: Deploy the worker routes
uses: cloudflare/wrangler-action@7a5f8bbdfeedcde38e6777a50fe685f89259d4ca
with:
workingDirectory: "cornucopia.owasp.org"
apiToken: ${{ secrets.CLOUDFLARE_STAGING_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_STAGING_ACCOUNT_ID }}
wranglerVersion: "3.105.1"
command: deploy script/nonce-worker.js --config script/wrangler.toml --env staging
2 changes: 2 additions & 0 deletions .github/workflows/run-tests-for-patches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Run tests status check.
on:
# Triggers the workflow on push or pull request events but only for the main branch
pull_request:
paths-ignore:
- 'cornucopia.owasp.org/**'
branches:
- master
# Allows you to run this workflow manually from the Actions tab
Expand Down
44 changes: 28 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
.idea
*venv
output/temp
.DS_Store
resources/.DS_Store
__pycache__
vm.command
.coverage
coverage.xml
*~*docx
.mypy_cache
client_secrets.json
version.properties
.hypothesis/**
output/**
tests/test_files/output/**
.idea
*venv
output/temp
.DS_Store
resources/.DS_Store
__pycache__
vm.command
.coverage
coverage.xml
*~*docx
.mypy_cache
client_secrets.json
version.properties
.hypothesis/**
output/**
tests/test_files/output/**
node_modules
cornucopia.owasp.org/build
cornucopia.owasp.org/.svelte-kit
cornucopia.owasp.org/package
cornucopia.owasp.org/vite.config.js.timestamp-*
cornucopia.owasp.org/vite.config.ts.timestamp-*
cornucopia.owasp.org/.vscode/settings.json
cornucopia.owasp.org/cache/*.cache
cornucopia.owasp.org/.vs
cornucopia.owasp.org/.vs
cornucopia.owasp.org/package-lock.json
cornucopia.owasp.org/coverage/**
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
4 changes: 2 additions & 2 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ For font licensing, please read font [README.md](./resources/templates/Fonts/REA

Copyright (C) 2017, Oleksandr Kucherenko under [MIT](https://opensource.org/license/mit)


### Cloudflare Worker Content Security Policy Nonce Generator (nonce-worker.js)

MIT License Copyright (c) 2020 Move Your Digital, Inc.

please read [README.md](./cornucopia.owasp.org/script/README.md)

## Building the Deck

Merges to the main branch will generate new DOCX and IDML files to use to print off new version of the deck but if you wish to produce these locally yourself then use the ./scripts/convert.py scipt to do this:
Expand Down
16 changes: 16 additions & 0 deletions cornucopia.owasp.org/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.vscode/settings.json
/cache/*.cache
.vs
/.vs
package-lock.json
coverage/**
29 changes: 29 additions & 0 deletions cornucopia.owasp.org/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM node:20-alpine AS builder

WORKDIR /app

# Install dependencies
COPY package.json ./
RUN npm install -g pnpm
RUN pnpm install

# Copy source code
COPY . .

# Build the application
RUN pnpm run build

# Production stage
FROM nginx:alpine

# Copy the built assets from builder stage to nginx
COPY --from=builder /app/build /usr/share/nginx/html

# Copy custom Nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]

# Added a comment to push to repo webhook
Loading
Loading