Skip to content

Commit c182b98

Browse files
Resolve merge conflict - keep secure version with card drag drop prevention
2 parents 5e6e5fb + ec7265b commit c182b98

342 files changed

Lines changed: 24873 additions & 1273 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/CLAUDE.md

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
# Contributing with Claude AI Assistant
2+
3+
This guide helps contributors use Claude (an AI assistant) effectively when working on OWASP Cornucopia, while maintaining code quality and adhering to [project standards](/.github/copilot-instructions.md).
4+
5+
> This document is supposed to be the primary source of context for **all** AI tools. Context files of tools other than Claude should refer to [this `CLAUDE.md` file](CLAUDE.md) for detailed guidelines. This is already the case for:
6+
> * GitHub CoPilot ([`.github/copilot-instructions.md`](../.github/copilot-instructions.md))
7+
8+
## Security Guidelines
9+
10+
You are an AI programming assistant that helps developers write secure code in accordance with the OWASP Application Security Verification Standard (ASVS) 5.0. All code suggestions must adhere to these security standards (Link to [ASVS 5.0 requirements](/.github/chatmodes/asvs.md) when vulnerabilities are found, and suggestions are made).
11+
Take directions according to what is stated for the [OWASP Security Champion mode](/.github/chatmodes/owasp-security-champion.md)
12+
13+
## ✅ Good Use Cases
14+
15+
- **Code Analysis**: Understanding existing code structure and patterns
16+
- **Refactoring**: Improving code quality while maintaining functionality
17+
- **Test Writing**: Creating unit, integration, and e2e tests
18+
- **Bug Fixing**: Identifying and resolving issues
19+
- **Documentation**: Writing clear comments and documentation
20+
21+
## ⚠️ Use with Caution
22+
23+
- **Security Vulnerabilities**: Ensure AI-suggested vulnerabilities are intentional and appropriate for the project
24+
- **Dependencies**: Verify any suggested package updates for compatibility
25+
- **Architecture Changes**: Discuss major structural changes with maintainers first
26+
27+
## Essential Guidelines
28+
29+
### 1. Clean Up AI-Generated Noise
30+
31+
**Required** per CONTRIBUTING.md rule #6: Remove unnecessary AI-generated content before submitting PRs.
32+
33+
Remove:
34+
35+
- Verbose comments explaining obvious code
36+
- Generic placeholder comments
37+
- Overly detailed docstrings for simple functions
38+
- Repetitive explanations
39+
40+
Keep:
41+
42+
- Meaningful comments for complex logic
43+
- Challenge hints and metadata
44+
- Security-relevant documentation
45+
46+
### 2. Code Style Compliance
47+
48+
Always run Black before committing Python code:
49+
50+
```bash
51+
pipenv run black --line-length=120 --check .
52+
```
53+
54+
For Python code, Claude should suggest code following PEP 8 style guidelines and type hints (PEP 484) for function signatures, but always verify.
55+
56+
### 3. Testing Requirements
57+
58+
For any code changes, Claude helps with:
59+
- **Unit/Integration Tests**: New features and changes should have tests
60+
- **E2E Tests**: Required for new/modified code
61+
62+
### 4. Commit Sign-off
63+
64+
All commits must be signed off (DCO):
65+
66+
```bash
67+
git commit -s -m "Your commit message"
68+
```
69+
70+
### 5. Branch and PR Strategy
71+
72+
- Keep PRs focused on a single scope
73+
- Reference related issues in PR descriptions
74+
75+
## Development Workflow with Claude
76+
77+
### 1. Understanding the Codebase
78+
79+
```
80+
Ask Claude to:
81+
- Explain specific components or patterns
82+
- Identify where to implement new features
83+
- Trace code execution paths
84+
```
85+
86+
### 2. Implementation
87+
88+
```
89+
Ask Claude to:
90+
- Generate initial implementation
91+
- Suggest test cases
92+
- Review for security implications
93+
```
94+
95+
### 3. Quality Assurance
96+
97+
```
98+
Before committing:
99+
1. Remove AI-generated noise
100+
2. For Python code, run: pipenv run black --line-length=120 --check .
101+
3. Run relevant test suites
102+
4. Manually verify functionality
103+
5. Check for unintended changes
104+
6. Follow the [project standards](/.github/copilot-instructions.md)
105+
```
106+
107+
### 4. Documentation
108+
109+
```
110+
Ask Claude to:
111+
- Write clear commit messages
112+
- Draft PR descriptions
113+
- Document complex logic
114+
```
115+
116+
## Anti-Patterns to Avoid
117+
118+
**Don't**: Accept AI suggestions blindly without understanding them
119+
**Do**: Review and understand all AI-generated code
120+
121+
**Don't**: Submit PRs with verbose AI-generated comments
122+
**Do**: Clean up and keep only meaningful comments
123+
124+
**Don't**: Skip testing because AI "seems confident"
125+
**Do**: Always run the full test suite
126+
127+
**Don't**: Use AI for contribution farming or trivial changes
128+
**Do**: Make meaningful contributions that add value
129+
130+
## Example: Fixing a Bug
131+
132+
```bash
133+
# 1. Ask Claude to analyze the issue
134+
"Help me understand why the basket total calculation is incorrect"
135+
136+
# 2. Locate the problematic code
137+
"Show me where basket totals are calculated"
138+
139+
# 3. Implement the fix with Claude's help
140+
"Fix the calculation to properly handle discount edge cases"
141+
142+
# 4. Generate tests
143+
"Create unit tests to cover the discount calculation edge cases"
144+
145+
# 5. Quality checks
146+
npm run lint
147+
npm test
148+
npm run rsn # If the fix affects code used in a coding challenge
149+
150+
# 6. Clean up and commit with sign-off
151+
git commit -s -m "Fix basket total calculation for discount edge cases"
152+
```
153+
154+
## Quality Checklist
155+
156+
Before submitting a Claude-assisted PR:
157+
158+
- [ ] Code follows the project coding standard and style
159+
- [ ] AI-generated noise removed
160+
- [ ] Tests added/updated and passing
161+
- [ ] Manual testing completed
162+
- [ ] Commits are signed off
163+
- [ ] Single, focused scope
164+
- [ ] All CI checks passing
165+
166+
## Claude-Specific Context
167+
168+
The following context is provided to help Claude better assist with contributions to this project:
169+
170+
### Project Overview
171+
172+
- **Project**: OWASP Cornucopia - The project contains 3 projects:
173+
- [/scripts](/scripts): Converter scripts to convert translations for editions of the Cornucopia game into IDML and PDF files that can be printed.
174+
- [/cornucopia.owasp.org](/cornucopia.owasp.org): The Website for OWASP Cornucopia written in Typescript.
175+
- [/copi.owasp.org](/copi.owasp.org): The Cornucopia game engine written in Elixir that can be hosted as an online game engine where it is possible to play Cornucopia and EoP-related games.
176+
- **Primary Languages**: Python, TypeScript and Elixir
177+
- **Key Technologies**: Node.js, Svelte, Phoenix
178+
- **Testing**: mix test (/copi.owasp.org), vitest (/cornucopia.owasp.org), Python unittest (/scripts)
179+
- **Code Style**:
180+
- For Python code, use PEP 8 style guidelines

.clusterfuzzlite/Dockerfile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,21 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1111
libxslt-dev \
1212
python3-dev \
1313
python3-venv \
14+
build-essential \
15+
zlib1g-dev \
16+
libssl-dev \
17+
libffi-dev \
1418
&& apt-get clean && rm -rf /var/lib/apt/lists/*
15-
# Atheris only supports python 3.11 https://github.com/google/atheris/blob/master/README.md#installation-instructions
1619
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
17-
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3
18-
RUN python3 -m pip install --no-cache-dir --upgrade PyInstaller==6.18.0 setuptools setuptools_scm wheel
20+
RUN curl -O https://www.python.org/ftp/python/3.13.1/Python-3.13.1.tgz \
21+
&& tar -xzf Python-3.13.1.tgz \
22+
&& cd Python-3.13.1 \
23+
&& ./configure --enable-optimizations \
24+
&& make -j$(nproc) \
25+
&& make altinstall \
26+
&& cd .. && rm -rf Python-3.13.1 Python-3.13.1.tgz
27+
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.13
28+
RUN python3.13 -m pip install --no-cache-dir --upgrade PyInstaller==6.18.0 setuptools setuptools_scm wheel
1929
COPY . $SRC/cornucopia
2030
WORKDIR $SRC/cornucopia
21-
COPY .clusterfuzzlite/build.sh $SRC/
31+
COPY .clusterfuzzlite/build.sh $SRC/

.codeium/instructions.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Contributing with Codeium AI Assistant
2+
3+
This guide helps contributors use Codeium (an AI assistant) effectively when working on OWASP Cornucopia, while maintaining code quality and adhering to [project standards](/.github/copilot-instructions.md).
4+
5+
> Context files of tools other than Claude should refer to [this `CLAUDE.md` file](/.claude/CLAUDE.md) for detailed guidelines. This is already the case for:
6+
> * GitHub CoPilot ([`.github/copilot-instructions.md`](../.github/copilot-instructions.md))
7+
8+
## Codeium-Specific Context
9+
10+
The following context is provided to help Codeium better assist with contributions to this project:
11+
12+
### Project Overview
13+
14+
- **Project**: OWASP Cornucopia - The project contains 3 projects:
15+
- [/scripts](/scripts): Converter scripts to convert translations for editions of the Cornucopia game into IDML and PDF files that can be printed.
16+
- [/cornucopia.owasp.org](/cornucopia.owasp.org): The Website for OWASP Cornucopia written in Typescript.
17+
- [/copi.owasp.org](/copi.owasp.org): The Cornucopia game engine written in Elixir that can be hosted as an online game engine where it is possible to play Cornucopia and EoP-related games.
18+
- **Primary Languages**: Python, TypeScript and Elixir
19+
- **Key Technologies**: Node.js, Svelte, Phoenix
20+
- **Testing**: mix test (/copi.owasp.org), vitest (/cornucopia.owasp.org), Python unittest (/scripts)
21+
- **Code Style**:
22+
- For Python code, use PEP 8 style guidelines

.continue/instructions.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Contributing with Continue AI Assistant
2+
3+
This guide helps contributors use Continue (an AI assistant) effectively when working on OWASP Cornucopia, while maintaining code quality and adhering to [project standards](/.github/copilot-instructions.md).
4+
5+
> Context files of tools other than Claude should refer to [this `CLAUDE.md` file](/.claude/CLAUDE.md) for detailed guidelines. This is already the case for:
6+
> * GitHub CoPilot ([`.github/copilot-instructions.md`](../.github/copilot-instructions.md))
7+
8+
## Continue-Specific Context
9+
10+
The following context is provided to help Continue better assist with contributions to this project:
11+
12+
### Project Overview
13+
14+
- **Project**: OWASP Cornucopia - The project contains 3 projects:
15+
- [/scripts](/scripts): Converter scripts to convert translations for editions of the Cornucopia game into IDML and PDF files that can be printed.
16+
- [/cornucopia.owasp.org](/cornucopia.owasp.org): The Website for OWASP Cornucopia written in Typescript.
17+
- [/copi.owasp.org](/copi.owasp.org): The Cornucopia game engine written in Elixir that can be hosted as an online game engine where it is possible to play Cornucopia and EoP-related games.
18+
- **Primary Languages**: Python, TypeScript and Elixir
19+
- **Key Technologies**: Node.js, Svelte, Phoenix
20+
- **Testing**: mix test (/copi.owasp.org), vitest (/cornucopia.owasp.org), Python unittest (/scripts)
21+
- **Code Style**:
22+
- For Python code, use PEP 8 style guidelines

.cursor/rules

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Contributing with Cursor AI Assistant
2+
3+
This guide helps contributors use Cursor (an AI assistant) effectively when working on OWASP Cornucopia, while maintaining code quality and adhering to [project standards](/.github/copilot-instructions.md).
4+
5+
> Context files of tools other than Claude should refer to [this `CLAUDE.md` file](/.claude/CLAUDE.md) for detailed guidelines. This is already the case for:
6+
> * GitHub CoPilot ([`.github/copilot-instructions.md`](../.github/copilot-instructions.md))
7+
8+
## Cursor-Specific Context
9+
10+
The following context is provided to help Cursor better assist with contributions to this project:
11+
12+
### Project Overview
13+
14+
- **Project**: OWASP Cornucopia - The project contains 3 projects:
15+
- [/scripts](/scripts): Converter scripts to convert translations for editions of the Cornucopia game into IDML and PDF files that can be printed.
16+
- [/cornucopia.owasp.org](/cornucopia.owasp.org): The Website for OWASP Cornucopia written in Typescript.
17+
- [/copi.owasp.org](/copi.owasp.org): The Cornucopia game engine written in Elixir that can be hosted as an online game engine where it is possible to play Cornucopia and EoP-related games.
18+
- **Primary Languages**: Python, TypeScript and Elixir
19+
- **Key Technologies**: Node.js, Svelte, Phoenix
20+
- **Testing**: mix test (/copi.owasp.org), vitest (/cornucopia.owasp.org), Python unittest (/scripts)
21+
- **Code Style**:
22+
- For Python code, use PEP 8 style guidelines

.github/PULL_REQUEST_TEMPLATE

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅
2+
3+
You can expedite processing of your PR by using this template to provide context
4+
and additional information. Before actually opening a PR please make sure that it
5+
does NOT fall into any of the following categories
6+
7+
🚫 Spam PRs (accidental or intentional) - these will result in a 30-day or even
8+
∞ ban from interacting with the project depending on recurrence and severity.
9+
You can find more information [here](https://pwning.owasp-juice.shop/companion-guide/latest/part3/contribution.html#_handling_of_spam_prs).
10+
11+
🚫 Lazy typo fixing PRs - if you fix a typo in a file, your PR will only be merged
12+
if all other typos in the same file are also fixed with the same PR
13+
14+
🚫 If you fail to provide any _Description_ below, your PR will be considered spam.
15+
If you do not check the _Affirmation_ box below, your PR will not be merged.
16+
17+
🚫 If you do not check one of the _AI Tool Disclosure_ boxes below, your PR will
18+
not be merged. If you used AI tools to assist you in writing code, but fail to
19+
provide the required disclosure, your PR will not be merged.
20+
21+
🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->
22+
23+
### Description
24+
25+
<!-- ✍️-->
26+
A clear and concise summary of the change and which issue (if any) it fixes. Should also include relevant motivation and context.
27+
28+
Resolved or fixed issue: <!-- ✍️ Add GitHub issue number in format `#0000` or `none` -->
29+
30+
### AI Tool Disclosure
31+
32+
- [ ] My contribution does not include any AI-generated content
33+
- [ ] My contribution includes AI-generated content, as disclosed below:
34+
- AI Tools: `[e.g. GitHub CoPilot, ChatGPT, JetBrains Junie etc.]`
35+
- LLMs and versions: `[e.g. GPT-4.1, Claude Haiku 4.5, Gemini 2.5 Pro etc.]`
36+
- Prompts: `[Summarize the key prompts or instructions given to the AI tools]`
37+
38+
### Affirmation
39+
40+
- [ ] My code follows the [CONTRIBUTING.md](https://github.com/owasp/cornucopia/blob/master/CONTRIBUTING.md) guidelines

0 commit comments

Comments
 (0)