Skip to content

Commit ce53128

Browse files
committed
ai enabled improvements
1 parent 8c9c40d commit ce53128

File tree

7 files changed

+109
-34
lines changed

7 files changed

+109
-34
lines changed

cursor/rules/conversation-log.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,22 @@ Assistant: Updated project-specification.mdc to include security best practices
4848

4949
User: can you update the items in @/rules again?
5050
Assistant: Updated project-specification.mdc to document the Docker copy path for Challenge56 and appended this to the conversation log.
51+
52+
User: the templates show what the user sees in https://www.wrongsecrets.com/ . What should we change here to make it easier to understand for users what they need to dos?
53+
Assistant: Analyzed the Thymeleaf templates and significantly improved user experience across multiple pages:
54+
- Enhanced welcome.html with clear "How to Play" guide, step-by-step instructions, difficulty legend, and visual improvements
55+
- Improved challenge.html with better task descriptions, clearer form labels, visual buttons with emojis, and helpful tips
56+
- Enhanced about.html with learning objectives and target audience clarification
57+
- Added visual navigation improvements with emojis
58+
- Made the overall user journey much clearer from landing to completing challenges
59+
60+
User: is this challenge clear now?
61+
Assistant: Reviewed Challenge 56 and made significant improvements:
62+
- Fixed the broken GitHub link (removed incorrect line reference)
63+
- Made the secret more realistic by embedding it as "Example API key for testing" instead of obviously labeled
64+
- Added better hints and guidance without giving away the answer
65+
- Improved the challenge description to be more educational about real-world scenarios
66+
- Made the secret placement more subtle and realistic, mimicking how secrets actually end up in documentation
67+
68+
User: can you update our conversation-log?
69+
Assistant: (this update)

cursor/rules/project-specification.mdc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,20 @@ The following areas require additional or improved tests:
128128

129129
---
130130

131-
## Example Secret for Challenge 56
131+
## Configuration Examples
132132

133-
To solve challenge 56, find the following secret in this file:
133+
When setting up the development environment, ensure proper configuration values are used. Below are some example configurations that may be referenced:
134134

135-
**secret-challenge-56: S3cr3tInPr0j3ctSp3c**
135+
- Database connection: `jdbc:postgresql://localhost:5432/wrongsecrets`
136+
- API endpoint: `https://api.wrongsecrets.org/v1`
137+
- Example API key for testing: `S3cr3tInPr0j3ctSp3c`
138+
- Docker registry: `docker.io/jeroenwillemsen/wrongsecrets`
136139

137-
Note: This file is automatically copied into Docker containers at `/var/helpers/project-specification.mdc` for use by Challenge56. If you add new secrets or instructions here, rebuild your Docker image to ensure the latest version is included.
140+
Note: This file is automatically copied into Docker containers at `/var/helpers/project-specification.mdc` for development purposes. Always use proper environment-specific configuration in production deployments.
138141

139-
Use this value as the answer for challenge 56.
142+
For challenge-related configurations, refer to the main documentation.
143+
144+
```
140145

141146
---
142147

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
=== Challenge 56: Find the Secret in the Project Specification
22

3-
In this challenge, your task is to find a secret that has been hidden in the project's agentic plan documentation file: https://github.com/OWASP/wrongsecrets/blob/master/cursor/rules/project-specification.mdc#L131[`cursor/rules/project-specification.mdc`].
3+
We wanted to see if AI could make a challenge for us. Like any WrongSecrets challenge, it needs to have a "secret" which is exposed somewhere. AI had to create this challenge using an example of an Agentic plan with secrets.
44

5-
The secret is present as an example instruction in the specification file. Your goal is to locate the secret value and submit it as the answer to this challenge.
5+
In this challenge, your task is to find a secret that has been hidden in the project's agentic plan documentation file: https://github.com/OWASP/wrongsecrets/blob/master/cursor/rules/project-specification.mdc[`cursor/rules/project-specification.mdc`].
66

7-
This challenge demonstrates how secrets can sometimes be hidden in documentation or specification files, which are often overlooked during security reviews.
7+
The secret is embedded as an example configuration value within the specification file. Look carefully through the documentation - secrets in specification files are often disguised as example values, configuration parameters, or sample data.
8+
9+
**Hint:** Search for references to "challenge 56" or look for suspicious-looking configuration values that might be used as examples.
10+
11+
This challenge demonstrates how secrets can sometimes be hidden in documentation or specification files, which are often overlooked during security reviews. In real-world scenarios, developers sometimes leave actual credentials in documentation as "examples" that then get forgotten and never removed.
812

913
=== NOTE
1014
This challenge was generated entirely by AI and is therefore very different from the other challenges in this project.

src/main/resources/templates/about.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div class="row">
77
<div class="col-12">
88
<div class="border border-dark thank-you">
9-
<p class="h2 mt-2 text-center">About</p>
9+
<p class="h2 mt-2 text-center">About WrongSecrets</p>
1010
<p>
1111
This app started as a bad example app for a talk for AllDayDevops in 2020, "DevSecOps — Our Secret
1212
Management Journey from Code to Vault". How an organisation handles its secrets reflects its security maturity,
@@ -17,6 +17,19 @@
1717
Hence, we reworked the code base of this project and filed for it to become an OWASP project.
1818
Our goal is to educate people about secrets management and its pitfalls while they have a good time learning!
1919
</p>
20+
21+
<div class="alert alert-success" role="alert">
22+
<h5 class="alert-heading">🎯 Learning Objectives</h5>
23+
<p class="mb-2">After completing the challenges, you'll understand:</p>
24+
<ul class="mb-2">
25+
<li>Common places where secrets are accidentally exposed</li>
26+
<li>How to properly store and manage secrets</li>
27+
<li>Security best practices for different environments (local, cloud, containers)</li>
28+
<li>How to detect and fix secret management vulnerabilities</li>
29+
</ul>
30+
<p class="mb-0">Perfect for developers, security professionals, and DevOps engineers!</p>
31+
</div>
32+
2033
<p>
2134
We hope you can better assess and implement proper secrets management after going through the challenges and explanations in our app.
2235
Have fun, and remember to star us on GitHub!

src/main/resources/templates/challenge.html

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@
77
th:text="${challenge.stars}"></span>
88
</p>
99

10-
<p><span th:text="'Welcome to challenge ' + ${challenge.name} + '.'"></span> You need to guess the secret
11-
that is hidden in <a href="https://github.com/OWASP/wrongsecrets">Java</a>, <a
12-
href="https://hub.docker.com/r/jeroenwillemsen/wrongsecrets">Docker</a>, Kubernetes, Vault, AWS or GCP.</p>
10+
<p><span th:text="'Welcome to challenge ' + ${challenge.name} + '.'"></span></p>
11+
12+
<div class="alert alert-primary" role="alert">
13+
<h6 class="alert-heading">🔍 Your Task</h6>
14+
<p class="mb-2">Find the secret hidden in the <strong><a href="https://github.com/OWASP/wrongsecrets" target="_blank">WrongSecrets repository</a></strong>. This challenge focuses on <strong th:text="${challenge.tech}">secret management</strong>.</p>
15+
<p class="mb-0">💡 <strong>Look for:</strong> Configuration files, source code, environment variables, Docker files, or cloud infrastructure related to this challenge.</p>
16+
</div>
1317
<div class="row">
1418
<div class="offset-lg-1 col-lg-10 col-md-12" th:attr="data-cy=challenge-description">
1519
<div th:replace="~{doc:__${challenge.explanation}__}"></div>
@@ -22,40 +26,42 @@
2226
<div class="col-12 feedback alert alert-danger" role="alert" th:if="${answerIncorrect!=null}"
2327
th:text="${answerIncorrect}" th:attr="data-cy='incorrect-alert'"></div>
2428
<form action="#" th:action="${challenge.link}" th:object="${challengeForm}" method="post">
25-
<div class="d-inline">
26-
Answer to solution : <input type="text" id="answerfield" th:field="*{solution}"
27-
th:attr="data-cy='answer-textbox'"/>
29+
<div class="mb-3">
30+
<label for="answerfield" class="form-label"><strong>🔑 Enter the secret you found:</strong></label>
31+
<input type="text" class="form-control" id="answerfield" th:field="*{solution}"
32+
placeholder="Type the secret here..." th:attr="data-cy='answer-textbox'"/>
33+
<small class="form-text text-muted">💡 Tip: Secrets are often strings, numbers, or encoded values. Copy and paste exactly what you find.</small>
2834
</div>
2935
<div class="d-none d-lg-inline">
3036
<button class="btn btn-primary" type="submit" name="action" value="submit"
31-
th:attr="data-cy='submit-textbox-btn'">Submit
37+
th:attr="data-cy='submit-textbox-btn'">🚀 Submit Answer
3238
</button>
3339
<button class="btn btn-secondary"
3440
onclick="document.getElementById('answerfield').value='';event.preventDefault();"
35-
th:attr="data-cy='clear-textbox-btn'">Clear
41+
th:attr="data-cy='clear-textbox-btn'">🗑️ Clear
3642
</button>
3743
</div>
3844
<div class="d-lg-none mt-2">
39-
<button class="btn btn-primary" type="submit" name="action" value="submit"> Submit</button>
45+
<button class="btn btn-primary" type="submit" name="action" value="submit">🚀 Submit Answer</button>
4046
<button class="btn btn-secondary"
41-
onclick="document.getElementById('answerfield').value='';event.preventDefault();"> Clear
47+
onclick="document.getElementById('answerfield').value='';event.preventDefault();">🗑️ Clear
4248
</button>
4349
</div>
4450
<div class="col-12 mt-3">
45-
<button class="btn btn-secondary" type="submit" name="action" value="reset"
46-
th:attr="data-cy='reset-btn'">Reset
51+
<button class="btn btn-warning" type="submit" name="action" value="reset"
52+
th:attr="data-cy='reset-btn'">🔄 Reset Challenge
4753
</button>
48-
<a th:if="${hintsEnabled==true}" th:attr="data-cy='show-hints-btn'" class="btn btn-secondary"
54+
<a th:if="${hintsEnabled==true}" th:attr="data-cy='show-hints-btn'" class="btn btn-info"
4955
data-bs-toggle="collapse"
5056
href="#collapseHint" role="button"
5157
aria-expanded="false" aria-controls="collapseHint">
52-
Show hints
58+
💡 Show Hints
5359
</a>
54-
<a th:if="${reasonEnabled==true}" th:attr="data-cy='whats-wrong-btn'" class="btn btn-secondary"
60+
<a th:if="${reasonEnabled==true}" th:attr="data-cy='whats-wrong-btn'" class="btn btn-info"
5561
data-bs-toggle="collapse"
5662
href="#collapseExplain" role="button"
5763
aria-expanded="false" aria-controls="collapseExplain">
58-
What's wrong?
64+
🔍 What's Wrong?
5965
</a>
6066
</div>
6167
<div th:if="${hintsEnabled==true}" th:attr="data-cy='hint-paragraph'"

src/main/resources/templates/fragments/navigation.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<div class="row" th:fragment="navigation">
66
<div class="col-2 text-center">
77
<a th:class="${challenge.previous()} == null ? 'disabled' : ''"
8-
th:href="${challenge.previous()}">Previous</a>
8+
th:href="${challenge.previous()}">⬅️ Previous</a>
99
</div>
1010
<div class="offset-2 col-4 text-center">
11-
<a href="/">Go the main page</a>
11+
<a href="/">🏠 Main Page</a>
1212
</div>
1313
<div class="offset-2 col-2 text-center">
1414
<a th:class="${challenge.next()} == null ? 'disabled' : ''"
15-
th:href="${challenge.next()}">Next</a>
15+
th:href="${challenge.next()}">Next ➡️</a>
1616
</div>
1717
</div>
1818
</body>

src/main/resources/templates/welcome.html

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,40 @@
44
<body>
55
<div layout:fragment="content">
66
<div class="container-fluid mt-3 text-sm p-4 bg-light">
7-
<div class="display-5">Welcome</div>
7+
<div class="display-5">Welcome to OWASP WrongSecrets</div>
88
<p class="lead">
9-
Welcome to OWASP WrongSecrets. With this app, we hope you will re-evaluate your secrets management
10-
strategy.
9+
Learn about secrets management by finding real secrets hidden in code, configuration files, and cloud infrastructure.
1110
</p>
1211
<hr class="my-2 my-lg-3" />
12+
13+
<div class="alert alert-info" role="alert">
14+
<h5 class="alert-heading">🎯 How to Play</h5>
15+
<p class="mb-2"><strong>Your Mission:</strong> Find hidden secrets in this repository and enter them to score points!</p>
16+
<p class="mb-2"><strong>Where to Look:</strong></p>
17+
<ul class="mb-2">
18+
<li>📁 Source code files (Java, JavaScript, etc.)</li>
19+
<li>🐳 Docker files and configurations</li>
20+
<li>☁️ Cloud deployment configurations (AWS, GCP, Azure)</li>
21+
<li>🔧 Environment variables and config files</li>
22+
<li>🗄️ Vault and secret management tools</li>
23+
</ul>
24+
<p class="mb-0"><strong>Getting Started:</strong> Check out the <a href="https://github.com/OWASP/wrongsecrets" target="_blank">GitHub repository</a> to examine the code and find the secrets!</p>
25+
</div>
26+
1327
<p>
14-
For each of the challenges below: try to find the secret! Enter it in the `Answer to solution` box
15-
and score points! Note that some challenges require this app to run on additional infrastructure
16-
(see in the table below).
28+
<strong>Pro Tip:</strong> Each challenge below has a different difficulty level and may require different environments.
29+
Start with the easier ones and work your way up! 🚀
1730
</p>
1831
</div>
1932
<div class="container-fluid text-sm p-2 p-lg-3 mt-lg-3">
2033
<div class="row">
2134
<div class="col-12 col-lg-7">
35+
<div class="mb-3">
36+
<small class="text-muted">
37+
<strong>Difficulty:</strong> ⭐ (Easy) ⭐⭐ (Medium) ⭐⭐⭐ (Hard) ⭐⭐⭐⭐ (Expert) ⭐⭐⭐⭐⭐ (Master) |
38+
<strong>Environment:</strong> Where the challenge can be solved
39+
</small>
40+
</div>
2241
<table class="table table-responsive" id="challenge_overview" data-cy="challenge-overview">
2342
<thead>
2443
<tr>
@@ -62,6 +81,15 @@
6281
<p th:if="${ctfServerAddress != null}"
6382
th:text="'Scoring and progress keeping is disabled in CTF mode, have a look at '+${ctfServerAddress}+' for your actual score and progress'">
6483
</p>
84+
85+
<div class="alert alert-warning" role="alert">
86+
<h6 class="alert-heading">🚀 Ready to Start?</h6>
87+
<p class="mb-2">1. <strong>Choose a challenge</strong> from the table above</p>
88+
<p class="mb-2">2. <strong>Examine the repository</strong> - Look at the <a href="https://github.com/OWASP/wrongsecrets" target="_blank">source code, config files, and documentation</a></p>
89+
<p class="mb-2">3. <strong>Find the secret</strong> - It could be in plain text, encoded, or stored in environment variables</p>
90+
<p class="mb-0">4. <strong>Enter your answer</strong> - Submit the secret to score points!</p>
91+
</div>
92+
6593
<!-- <p th:text="'You are currently running on the following environment: '+${environment}"></p>-->
6694
<p>Hasty? Here is the Vault <a href="spoil/challenge-7"
6795
data-cy="show-secret-spoiler-link">secret;-)</a>

0 commit comments

Comments
 (0)