Skip to content

Commit 39e09b1

Browse files
committed
Added missing instructions for future use
1 parent 3363f55 commit 39e09b1

File tree

3 files changed

+81
-0
lines changed

3 files changed

+81
-0
lines changed

cursor/rules/conversation-log.txt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Conversation Log
2+
===============
3+
4+
User: can you create an agentic plan in ./cursor/rules/project-specification.mdc which covers the current application in terms of docker, etc.?
5+
Assistant: Created a comprehensive agentic plan covering Docker, deployment, and infrastructure in project-specification.mdc.
6+
7+
User: please do not do any security considerations: this is a vulnerable app for testing
8+
Assistant: Removed the security considerations section from the agentic plan.
9+
10+
User: What tests are we still missing?
11+
Assistant: Provided an analysis of missing/weak test areas and how to identify them.
12+
13+
User: can you make this part of the project-specifications todo?
14+
Assistant: Added a TODO section for test coverage improvements to project-specification.mdc.
15+
16+
User: Can you create challenge 56 in the docker package which is to find a secret in the project-specification? Put the secret as an example instruction in the project-specification. Next, add tests to make sure it works.
17+
Assistant: Created Challenge56, added the secret to project-specification.mdc, and wrote tests.
18+
19+
User: can you run teh tests? (./mvnw test)
20+
Assistant: Attempted to run tests, but the process was interrupted before completion.
21+
22+
User: We still need to add the documentation for challenge56: can you do so in resources/explanations?
23+
Assistant: Added challenge56.adoc, challenge56_hint.adoc, and challenge56_reason.adoc.
24+
25+
User: can you add to challenge56docs that this one is purely generated with AI and therefore is very typically different?
26+
Assistant: Added a note to challenge56.adoc stating it was generated by AI and is different from other challenges.
27+
28+
User: @wrong-secrets-configuration.yaml can you add an entry for challenge56?
29+
Assistant: Added Challenge56 to wrong-secrets-configuration.yaml with all required fields.
30+
31+
User: can you add instructions to the @project-specification.mdc to speed up challenge creation in the future?
32+
Assistant: Added a step-by-step guide for fast challenge creation to project-specification.mdc.
33+
34+
User: can you store our conversation next to it in cursor/rules as a text file?
35+
Assistant: (this file)

cursor/rules/project-specification.mdc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,36 @@ To solve challenge 56, find the following secret in this file:
137137
Use this value as the answer for challenge 56.
138138

139139
---
140+
141+
## Instructions: How to Quickly Add a New Challenge
142+
143+
To speed up challenge creation, follow these steps:
144+
145+
1. **Create the Challenge Class**
146+
- Add a new Java class in the appropriate package (e.g., `org.owasp.wrongsecrets.challenges.docker`).
147+
- Implement the `Challenge` interface or extend `FixedAnswerChallenge` as needed.
148+
149+
2. **Write Documentation**
150+
- Add three files in `src/main/resources/explanations/`:
151+
- `challengeXX.adoc` (main description)
152+
- `challengeXX_hint.adoc` (hint for users)
153+
- `challengeXX_reason.adoc` (explanation of the challenge's relevance)
154+
155+
3. **Add Unit Tests**
156+
- Create a test class in `src/test/java/org/owasp/wrongsecrets/challenges/docker/` (or the relevant package).
157+
- Cover correct, incorrect, and edge cases.
158+
159+
4. **Register the Challenge**
160+
- Add an entry to `src/main/resources/wrong-secrets-configuration.yaml` under `challenges:`
161+
- Set the class name, explanation, hint, reason, environments, difficulty, category, and CTF status.
162+
163+
5. **(Optional) Add UI Snippet**
164+
- If your challenge needs a custom UI, add a snippet in `src/main/resources/templates/challenges/` and reference it in the configuration.
165+
166+
6. **Test Everything**
167+
- Run `./mvnw test` to ensure all tests pass.
168+
- Start the app and verify the challenge appears and works as expected.
169+
170+
---
171+
172+
**Tip:** Use the most recent challenge as a template for new ones to save time and ensure consistency.

src/main/resources/wrong-secrets-configuration.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,3 +866,16 @@ configurations:
866866
category: *secrets
867867
ctf:
868868
enabled: true
869+
870+
- name: Challenge 56
871+
short-name: "challenge-56"
872+
sources:
873+
- class-name: "org.owasp.wrongsecrets.challenges.docker.Challenge56"
874+
explanation: "explanations/challenge56.adoc"
875+
hint: "explanations/challenge56_hint.adoc"
876+
reason: "explanations/challenge56_reason.adoc"
877+
environments: *all_envs
878+
difficulty: *easy
879+
category: [*doc, *ai]
880+
ctf:
881+
enabled: true

0 commit comments

Comments
 (0)