feat(challenges): add challenges 70 and 71 with AI agent skills - #2647
feat(challenges): add challenges 70 and 71 with AI agent skills#2647kekubhai wants to merge 2 commits into
Conversation
- Add Challenge 67: Extract hardcoded secret from Cursor skill deployment preview file - Add Challenge 67 Controller: Serve Cursor SKILL.md file for challenge interaction - Add Challenge 68: Decode base64-encoded secret from Claude incident reporter skill - Add Challenge 68 Controller: Serve Claude skill files and handle incident report submission - Add comprehensive test suites for Challenge 67 and 68 (unit and controller tests) - Add challenge resources: skill definitions, documentation, and supporting scripts - Add challenge explanations: descriptions, hints, and reasoning for both challenges - Update README.md: increment total challenge count to 69 and add challenge links - Update challenge configuration: register new challenges in wrong-secrets-configuration.yaml - Demonstrates secrets exposure through AI agent skill files shipped in plain text format
|
Hi @kekubhai ! Thank you for your MR! Can you please rename them to challenge 70 and 71 :) ? we have 68, and 69 in the queue :) |
|
sure , on it |
- Rename Challenge67 to Challenge70 with updated Cursor skill for deploy-preview - Rename Challenge68 to Challenge71 with updated Claude skill for incident-reporter - Update all controller classes and tests to reference new challenge numbers - Add challenge explanations, hints, and reasons documentation for challenges 70 and 71 - Update wrong-secrets-configuration.yaml with new challenge configurations - Update README.md to reference challenges 70 and 71 instead of 67 and 68 - Restructure resource files to match new challenge numbering scheme
| @@ -0,0 +1,41 @@ | |||
| --- | |||
| name: incident-reporter | |||
| description: Assemble a structured incident report from the on-call runbook and upload it to the incident tracker. Use when the user asks to file, report, or close out an incident. | |||
There was a problem hiding this comment.
can you replace this file with a claude exported skill? (E.g. a zip file)
if you do not have claude (Free) , i can generate one for you.
| byte[] zipSkill() throws IOException { | ||
| var bundle = new ByteArrayOutputStream(); | ||
| try (var zip = new ZipOutputStream(bundle)) { | ||
| for (String name : SKILL_FILES) { | ||
| var entry = new ZipEntry(name); | ||
| entry.setTime(FIXED_ENTRY_TIME); | ||
| zip.putNextEntry(entry); | ||
| try (var content = new ClassPathResource(SKILL_ROOT + name).getInputStream()) { | ||
| content.transferTo(zip); | ||
| } | ||
| zip.closeEntry(); | ||
| } | ||
| } | ||
| return bundle.toByteArray(); |
There was a problem hiding this comment.
this is super clever :D , it now behaves like a skill. but given the markdown files are readable/searchable on source it makes it a little too easy. Please export the skill and replace it.
|
|
||
| <div class="skill-warning" style="border: 1px solid #ffeaa7; border-radius: 6px; padding: 15px; margin: 15px 0;"> | ||
| <p>Fetch the skill from the command line:</p> | ||
| <pre class="skill-code" style="padding: 10px; border-radius: 4px; overflow-x: auto; font-size: 13px;">curl -s http://localhost:8080/skills/cursor/deploy-preview/SKILL.md</pre> |
There was a problem hiding this comment.
Would this work?
| <pre class="skill-code" style="padding: 10px; border-radius: 4px; overflow-x: auto; font-size: 13px;">curl -s http://localhost:8080/skills/cursor/deploy-preview/SKILL.md</pre> | |
| <pre class="skill-code" | |
| style="padding: 10px; border-radius: 4px; overflow-x: auto; font-size: 13px;" | |
| th:text="'curl -s ' + ${#httpServletRequest.scheme} + '://' + ${#httpServletRequest.serverName} + ':' + ${#httpServletRequest.serverPort} + '/skills/cursor/deploy-preview/SKILL.md'"> | |
| </pre> |
There was a problem hiding this comment.
Yep, that makes sense. I’ll use the request’s scheme, host, and port so the curl command works regardless of where the application is running.
|
|
||
| Agent skills are becoming a popular way to share automation with a team: you drop a folder with a `SKILL.md` in it, the agent picks it up, and everybody gets the same workflow. Unfortunately that also makes them a very convenient place to "temporarily" park a shared credential. | ||
|
|
||
| This application ships a Cursor skill called `deploy-preview`. The skill lives in the resource folder and is hosted by the backend at link:/skills/cursor/deploy-preview/SKILL.md[`/skills/cursor/deploy-preview/SKILL.md`]. |
There was a problem hiding this comment.
Can we maybe add a link to the github location of the skill file as well?
| That makes a skill bundle a great hiding place, because reviewers tend to read the `SKILL.md` and stop there. The interesting part is usually in the files next to it. | ||
|
|
||
| This application ships a Claude skill called `incident-reporter`. The skill files live in the resource folder and the backend serves them as a bundle at link:/skills/claude/incident-reporter.zip[`/skills/claude/incident-reporter.zip`]. | ||
|
|
There was a problem hiding this comment.
Can we maybe add a link to the github location of the skill file as well once it is a zip file?
|
Thanks! I don’t have Claude Free available right now, so if you can generate/export the skill ZIP, that would be helpful. I’ll replace the current bundle with the exported skill and update the challenge accordingly. |
|
Yep, that works. Once you share the exported skill ZIP, I’ll replace the current bundle with it and also add the GitHub source links for both skills. |
SKILL.mdfilewrong-secrets-configuration.yamlWhat kind of changes does this PR include?
Description
Adds two new AI security challenges demonstrating how secrets can be exposed through AI agent skill files. Challenge 70 uses a Cursor skill containing a hardcoded secret, while Challenge 71 requires extracting and decoding a base64-encoded secret from a Claude skill bundle.
Both challenges load their secrets from resource files rather than hardcoding them in Java and include the required tests, explanations, and configuration.
Relations
Closes #2645
References
N/A
Checklist: