Skip to content
Open
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
13 changes: 8 additions & 5 deletions .github/workflows/run-tests-generate-output.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Run Tests and generate output files
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
pull_request:
# Triggers the workflow on pull request events
# Using pull_request_target allows the build artifacts link to be posted as a comment
# even for PRs from forked repositories.
pull_request_target:
paths:
- 'source/**'
- 'scripts/convert**'
Expand Down Expand Up @@ -33,8 +35,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.event.pull_request.head.ref }}
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
persist-credentials: false
# Set the pip environment up
- name: Get Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
Expand Down Expand Up @@ -122,7 +125,7 @@ jobs:
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
retention-days: 5
name: cornucopia-build-files.${{ github.sha }}.zip
name: cornucopia-build-files.${{ github.event.pull_request.head.sha }}.zip
path: |
output/cornucopia-build-files.zip
commentpr:
Expand All @@ -144,7 +147,7 @@ jobs:

| Name | Link |
|------|------|
| Output files | [cornucopia-build-files.${{ github.sha }}.zip](${{needs.uploadoutputfiles.outputs.artifact-url}}) |
| Output files | [cornucopia-build-files.${{ github.event.pull_request.head.sha }}.zip](${{needs.uploadoutputfiles.outputs.artifact-url}}) |

with:
script: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.event.pull_request.head.ref }}
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
persist-credentials: false
# Set the pip environment up
- name: Get Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
Expand Down
12 changes: 6 additions & 6 deletions copi.owasp.org/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# - https://pkgs.org/ - resource for finding needed packages
# - Ex: hexpm/elixir:1.14.2-erlang-25.1.1-debian-bullseye-20220801-slim
#
FROM --platform=linux/amd64 hexpm/elixir:1.19-erlang-28.3-debian-bullseye-20251208@sha256:9d1e59c326674de89a2eac9cd7f118ae2917e1c6cde02e8fa4cd785198ca9be0 as builder
FROM hexpm/elixir:1.19-erlang-28.3-debian-bullseye-20251208@sha256:9d1e59c326674de89a2eac9cd7f118ae2917e1c6cde02e8fa4cd785198ca9be0 AS builder
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe revert this?

# install build dependencies
RUN apt-get update -y && apt-get install -y build-essential git nodejs npm \
&& apt-get clean && rm -f /var/lib/apt/lists/*_*
RUN apt-get update -y && (apt-get install -y build-essential git nodejs npm || (sleep 10 && apt-get update -y && apt-get install -y build-essential git nodejs npm)) \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why installing these packages?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as this is work on the converter it’s better not to do fixes on copi. If you believe this could be an improvement open an issue and explain why you believe we should do these changes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opened a separate issue proposing this as an improvement, with an explanation of why it could be useful.

&& apt-get clean && rm -rf /var/lib/apt/lists/*

# prepare build dir
WORKDIR /app
Expand Down Expand Up @@ -58,10 +58,10 @@ RUN mix release

# start a new build stage so that the final image will only contain
# the compiled release and other runtime necessities
FROM --platform=linux/amd64 hexpm/elixir:1.19-erlang-28.3-debian-bullseye-20251208@sha256:9d1e59c326674de89a2eac9cd7f118ae2917e1c6cde02e8fa4cd785198ca9be0
FROM hexpm/elixir:1.19-erlang-28.3-debian-bullseye-20251208@sha256:9d1e59c326674de89a2eac9cd7f118ae2917e1c6cde02e8fa4cd785198ca9be0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix in separate issue.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be done together with the retry mechanism, but not here.


RUN apt-get update -y && apt-get install -y libstdc++6 openssl libncurses5 locales \
&& apt-get clean && rm -f /var/lib/apt/lists/*_*
RUN apt-get update -y && (apt-get install -y libstdc++6 openssl libncurses5 locales || (sleep 10 && apt-get update -y && apt-get install -y libstdc++6 openssl libncurses5 locales)) \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Additionally, Adam Shostack maintains a list of tabletop security games and rela

Cornucopia is developed, maintained, updated and promoted by a worldwide team of volunteers. The contributors to date have been:

- Abhijit
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also add your full name. Your choice.

- Artim Banyte
- Simon Bennetts
- Thomas Berson
Expand Down
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,14 @@ The script:
## Contributing to Development
### LibreOffice Installation
LibreOffice is required to convert `.docx` files to `.pdf` format.
- **Windows**: `winget install -e --id TheDocumentFoundation.LibreOffice`
- **Mac OS X**: `brew install --cask libreoffice`
- **Ubuntu**: `sudo apt update && sudo apt install libreoffice`
### Dev setup for the Cornucopia Converter
For copi.owasp.org and cornucopia.owasp.org see separate README.md
Expand Down
Loading
Loading