Add Challenge60: Telegram Channel Secrets with Real API Integration
This PR adds Challenge60, a new security challenge that demonstrates the risks of hardcoding Telegram bot credentials in application source code.
Challenge Overview
The challenge shows how developers often embed Telegram bot tokens directly in their codebase for notifications, monitoring, or user interaction. The implementation includes:
- Hardcoded Telegram bot token: Double-encoded Base64 string embedded in the source code
- Real API integration: Uses Spring RestTemplate to call the Telegram Bot API
- Educational security demonstration: Shows how exposed credentials can be used to access external services
- Graceful fallback: Ensures challenge stability even if API calls fail
Key Features
- Uses Java 23 syntax including
.getFirst(),.getLast(), andvarkeyword - Comprehensive test coverage with mocked RestTemplate to prevent real API calls during testing
- Complete documentation including explanation, hints, and security reasoning
- Demonstrates real-world vulnerability patterns while maintaining educational value
Security Learning Objectives
Students learn about:
- How hardcoded API credentials expose services to unauthorized access
- The risks of embedding secrets in version control
- Best practices for secure credential management
- Detection methods for preventing credential exposure
The challenge follows the WrongSecrets pattern of being intentionally vulnerable for educational purposes while keeping the framework itself secure.
⨠Let Copilot coding agent set things up for you â coding agent works faster and does higher quality work when set up for your repo.
@copilot we use Java 23 . Please make everything java23 again
đ GitHub Pages Preview Ready!
Your static preview is now available at: đ Preview PR #2206
đ What's included:
- â All CSS, JavaScript, and static assets (embedded inline)
- â Current styling and layout preview
- â Images, icons, and UI components
- â
NEW: Generated HTML from Thymeleaf templates
- đ Home/Welcome Page
- âšī¸ About Page
- đ Stats & Config Page
- đ¤ Challenge 57: LLM Security (Latest)
- đ§Š Challenge Example
For full functionality testing: Use the Docker preview instead.
đ Auto-updates: This preview will be updated automatically when you push new commits to this PR.
Static preview with Thymeleaf generation by GitHub Actions
đ GitHub Pages Preview Ready!
Your static preview is now available at: đ Preview PR #2206
đ What's included:
- â All CSS, JavaScript, and static assets (embedded inline)
- â Current styling and layout preview
- â Images, icons, and UI components
- â
NEW: Generated HTML from Thymeleaf templates
- đ Home/Welcome Page
- âšī¸ About Page
- đ Stats & Config Page
- đ¤ Challenge 57: LLM Security (Latest)
- đ§Š Challenge Example
For full functionality testing: Use the Docker preview instead.
đ Auto-updates: This preview will be updated automatically when you push new commits to this PR.
Static preview with Thymeleaf generation by GitHub Actions
@copilot we use Java 23 . Please make everything java23 again
Restored Java version to 23 in pom.xml as requested. The change reverts the java.version property from 17 back to 23 (commit 938b181). The maven.compiler.target was already set to 23 and remains unchanged.
đ¨ Preview Build Complete!
Your changes have been built and pushed to GitHub Container Registry.
đŗ Docker Image: ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-e0ebf11
đĻ Download & Test Locally:
- đ Download Docker Image Artifact (look for
wrongsecrets-preview-pr-2206) - Load and run the image:
# Download the artifact, extract it, then:
docker load < wrongsecrets-preview.tar
docker run -p 8080:8080 wrongsecrets-preview
đ Alternative - Pull from Registry:
docker pull ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-e0ebf11
docker run -p 8080:8080 ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-e0ebf11
Then visit: http://localhost:8080
đ Changes in this PR:
- src/main/java/org/owasp/wrongsecrets/Challenges.java
- src/main/java/org/owasp/wrongsecrets/challenges/ChallengeUI.java
- src/main/java/org/owasp/wrongsecrets/challenges/ChallengesController.java
- src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge59.java
- src/main/resources/explanations/challenge59.adoc
- src/main/resources/explanations/challenge59_hint.adoc
- src/main/resources/explanations/challenge59_reason.adoc
Visual diff screenshots will be available shortly...
Preview built by GitHub Actions
đ¨ Preview Build Complete!
Your changes have been built and pushed to GitHub Container Registry.
đŗ Docker Image: ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-e0ebf11
đĻ Download & Test Locally:
- đ Download Docker Image Artifact (look for
wrongsecrets-preview-pr-2206) - Load and run the image:
# Download the artifact, extract it, then:
docker load < wrongsecrets-preview.tar
docker run -p 8080:8080 wrongsecrets-preview
đ Alternative - Pull from Registry:
docker pull ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-e0ebf11
docker run -p 8080:8080 ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-e0ebf11
Then visit: http://localhost:8080
đ Changes in this PR:
- src/main/java/org/owasp/wrongsecrets/Challenges.java
- src/main/java/org/owasp/wrongsecrets/challenges/ChallengeUI.java
- src/main/java/org/owasp/wrongsecrets/challenges/ChallengesController.java
- src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge59.java
- src/main/resources/explanations/challenge59.adoc
- src/main/resources/explanations/challenge59_hint.adoc
- src/main/resources/explanations/challenge59_reason.adoc
Visual diff screenshots will be available shortly...
Preview built by GitHub Actions
đ¸ Visual Diff Ready!
Screenshots comparing your changes with the main branch are available:
đ Download Visual Diff Artifacts
đŧī¸ Included screenshots:
pr-home.pngvsmain-home.png- Welcome page comparisonpr-about.pngvsmain-about.png- About page comparisonpr-challenge.pngvsmain-challenge.png- Challenge page comparison
đ How to review:
- Download the artifact zip file
- Extract and compare the
pr-*andmain-*images side by side - Look for visual differences in layout, styling, and content
đĄ Tip: Use an image comparison tool or open both images in separate browser tabs to spot differences easily.
Visual diff generated by GitHub Actions âĸ PR #2206
đ¸ Visual Diff Ready!
Screenshots comparing your changes with the main branch are available:
đ Download Visual Diff Artifacts
đŧī¸ Included screenshots:
pr-home.pngvsmain-home.png- Welcome page comparisonpr-about.pngvsmain-about.png- About page comparisonpr-challenge.pngvsmain-challenge.png- Challenge page comparison
đ How to review:
- Download the artifact zip file
- Extract and compare the
pr-*andmain-*images side by side - Look for visual differences in layout, styling, and content
đĄ Tip: Use an image comparison tool or open both images in separate browser tabs to spot differences easily.
Visual diff generated by GitHub Actions âĸ PR #2206
đ GitHub Pages Preview Ready!
Your static preview is now available at: đ Preview PR #2206
đ What's included:
- â All CSS, JavaScript, and static assets (embedded inline)
- â Current styling and layout preview
- â Images, icons, and UI components
- â
NEW: Generated HTML from Thymeleaf templates
- đ Home/Welcome Page
- âšī¸ About Page
- đ Stats & Config Page
- đ¤ Challenge 57: LLM Security (Latest)
- đ§Š Challenge Example
For full functionality testing: Use the Docker preview instead.
đ Auto-updates: This preview will be updated automatically when you push new commits to this PR.
Static preview with Thymeleaf generation by GitHub Actions
@copilot please use java23 syntax including getfirst and getlast
đ¨ Preview Build Complete!
Your changes have been built and pushed to GitHub Container Registry.
đŗ Docker Image: ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-94b4292
đĻ Download & Test Locally:
- đ Download Docker Image Artifact (look for
wrongsecrets-preview-pr-2206) - Load and run the image:
# Download the artifact, extract it, then:
docker load < wrongsecrets-preview.tar
docker run -p 8080:8080 wrongsecrets-preview
đ Alternative - Pull from Registry:
docker pull ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-94b4292
docker run -p 8080:8080 ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-94b4292
Then visit: http://localhost:8080
đ Changes in this PR:
- src/main/java/org/owasp/wrongsecrets/Challenges.java
- src/main/java/org/owasp/wrongsecrets/challenges/ChallengeUI.java
- src/main/java/org/owasp/wrongsecrets/challenges/ChallengesController.java
- src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge59.java
- src/main/resources/explanations/challenge59.adoc
- src/main/resources/explanations/challenge59_hint.adoc
- src/main/resources/explanations/challenge59_reason.adoc
Visual diff screenshots will be available shortly...
Preview built by GitHub Actions
đ¨ Preview Build Complete!
Your changes have been built and pushed to GitHub Container Registry.
đŗ Docker Image: ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-94b4292
đĻ Download & Test Locally:
- đ Download Docker Image Artifact (look for
wrongsecrets-preview-pr-2206) - Load and run the image:
# Download the artifact, extract it, then:
docker load < wrongsecrets-preview.tar
docker run -p 8080:8080 wrongsecrets-preview
đ Alternative - Pull from Registry:
docker pull ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-94b4292
docker run -p 8080:8080 ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-94b4292
Then visit: http://localhost:8080
đ Changes in this PR:
- src/main/java/org/owasp/wrongsecrets/Challenges.java
- src/main/java/org/owasp/wrongsecrets/challenges/ChallengeUI.java
- src/main/java/org/owasp/wrongsecrets/challenges/ChallengesController.java
- src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge59.java
- src/main/resources/explanations/challenge59.adoc
- src/main/resources/explanations/challenge59_hint.adoc
- src/main/resources/explanations/challenge59_reason.adoc
Visual diff screenshots will be available shortly...
Preview built by GitHub Actions
đ¸ Visual Diff Ready!
Screenshots comparing your changes with the main branch are available:
đ Download Visual Diff Artifacts
đŧī¸ Included screenshots:
pr-home.pngvsmain-home.png- Welcome page comparisonpr-about.pngvsmain-about.png- About page comparisonpr-challenge.pngvsmain-challenge.png- Challenge page comparison
đ How to review:
- Download the artifact zip file
- Extract and compare the
pr-*andmain-*images side by side - Look for visual differences in layout, styling, and content
đĄ Tip: Use an image comparison tool or open both images in separate browser tabs to spot differences easily.
Visual diff generated by GitHub Actions âĸ PR #2206
đ¸ Visual Diff Ready!
Screenshots comparing your changes with the main branch are available:
đ Download Visual Diff Artifacts
đŧī¸ Included screenshots:
pr-home.pngvsmain-home.png- Welcome page comparisonpr-about.pngvsmain-about.png- About page comparisonpr-challenge.pngvsmain-challenge.png- Challenge page comparison
đ How to review:
- Download the artifact zip file
- Extract and compare the
pr-*andmain-*images side by side - Look for visual differences in layout, styling, and content
đĄ Tip: Use an image comparison tool or open both images in separate browser tabs to spot differences easily.
Visual diff generated by GitHub Actions âĸ PR #2206
@copilot please use java23 syntax including getfirst and getlast
Updated the codebase to use Java 23 syntax features. Replaced .get(0) with .getFirst() in Challenge14, ChallengesController, and ChallengeUI classes. Also enhanced Challenge59 with modern syntax including var keyword for better readability. All changes maintain compatibility while leveraging new Java 23 language features (commit cc953ef).
@copilot can you use getfirst and getlast everywhere. There are still changes that use old syntax
đ GitHub Pages Preview Ready!
Your static preview is now available at: đ Preview PR #2206
đ What's included:
- â All CSS, JavaScript, and static assets (embedded inline)
- â Current styling and layout preview
- â Images, icons, and UI components
- â
NEW: Generated HTML from Thymeleaf templates
- đ Home/Welcome Page
- âšī¸ About Page
- đ Stats & Config Page
- đ¤ Challenge 57: LLM Security (Latest)
- đ§Š Challenge Example
For full functionality testing: Use the Docker preview instead.
đ Auto-updates: This preview will be updated automatically when you push new commits to this PR.
Static preview with Thymeleaf generation by GitHub Actions
đ¨ Preview Build Complete!
Your changes have been built and pushed to GitHub Container Registry.
đŗ Docker Image: ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-674d303
đĻ Download & Test Locally:
- đ Download Docker Image Artifact (look for
wrongsecrets-preview-pr-2206) - Load and run the image:
# Download the artifact, extract it, then:
docker load < wrongsecrets-preview.tar
docker run -p 8080:8080 wrongsecrets-preview
đ Alternative - Pull from Registry:
docker pull ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-674d303
docker run -p 8080:8080 ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-674d303
Then visit: http://localhost:8080
đ Changes in this PR:
- src/main/java/org/owasp/wrongsecrets/Challenges.java
- src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge14.java
- src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge59.java
- src/main/resources/explanations/challenge59.adoc
- src/main/resources/explanations/challenge59_hint.adoc
- src/main/resources/explanations/challenge59_reason.adoc
Visual diff screenshots will be available shortly...
Preview built by GitHub Actions
đ¨ Preview Build Complete!
Your changes have been built and pushed to GitHub Container Registry.
đŗ Docker Image: ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-674d303
đĻ Download & Test Locally:
- đ Download Docker Image Artifact (look for
wrongsecrets-preview-pr-2206) - Load and run the image:
# Download the artifact, extract it, then:
docker load < wrongsecrets-preview.tar
docker run -p 8080:8080 wrongsecrets-preview
đ Alternative - Pull from Registry:
docker pull ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-674d303
docker run -p 8080:8080 ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-674d303
Then visit: http://localhost:8080
đ Changes in this PR:
- src/main/java/org/owasp/wrongsecrets/Challenges.java
- src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge14.java
- src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge59.java
- src/main/resources/explanations/challenge59.adoc
- src/main/resources/explanations/challenge59_hint.adoc
- src/main/resources/explanations/challenge59_reason.adoc
Visual diff screenshots will be available shortly...
Preview built by GitHub Actions
@copilot can you use getfirst and getlast everywhere. There are still changes that use old syntax
Updated all remaining instances to use Java 23 syntax. Replaced .get(0) with .getFirst() and .get(size()-1) with .getLast() across 4 files: Challenges.java, NavigationTest.java, and both CTF test files (commit a09ce7a).
đ¸ Visual Diff Ready!
Screenshots comparing your changes with the main branch are available:
đ Download Visual Diff Artifacts
đŧī¸ Included screenshots:
pr-home.pngvsmain-home.png- Welcome page comparisonpr-about.pngvsmain-about.png- About page comparisonpr-challenge.pngvsmain-challenge.png- Challenge page comparison
đ How to review:
- Download the artifact zip file
- Extract and compare the
pr-*andmain-*images side by side - Look for visual differences in layout, styling, and content
đĄ Tip: Use an image comparison tool or open both images in separate browser tabs to spot differences easily.
Visual diff generated by GitHub Actions âĸ PR #2206
đ¸ Visual Diff Ready!
Screenshots comparing your changes with the main branch are available:
đ Download Visual Diff Artifacts
đŧī¸ Included screenshots:
pr-home.pngvsmain-home.png- Welcome page comparisonpr-about.pngvsmain-about.png- About page comparisonpr-challenge.pngvsmain-challenge.png- Challenge page comparison
đ How to review:
- Download the artifact zip file
- Extract and compare the
pr-*andmain-*images side by side - Look for visual differences in layout, styling, and content
đĄ Tip: Use an image comparison tool or open both images in separate browser tabs to spot differences easily.
Visual diff generated by GitHub Actions âĸ PR #2206
đ GitHub Pages Preview Ready!
Your static preview is now available at: đ Preview PR #2206
đ What's included:
- â All CSS, JavaScript, and static assets (embedded inline)
- â Current styling and layout preview
- â Images, icons, and UI components
- â
NEW: Generated HTML from Thymeleaf templates
- đ Home/Welcome Page
- âšī¸ About Page
- đ Stats & Config Page
- đ¤ Challenge 57: LLM Security (Latest)
- đ§Š Challenge Example
For full functionality testing: Use the Docker preview instead.
đ Auto-updates: This preview will be updated automatically when you push new commits to this PR.
Static preview with Thymeleaf generation by GitHub Actions
đ¨ Preview Build Complete!
Your changes have been built and pushed to GitHub Container Registry.
đŗ Docker Image: ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-950722b
đĻ Download & Test Locally:
- đ Download Docker Image Artifact (look for
wrongsecrets-preview-pr-2206) - Load and run the image:
# Download the artifact, extract it, then:
docker load < wrongsecrets-preview.tar
docker run -p 8080:8080 wrongsecrets-preview
đ Alternative - Pull from Registry:
docker pull ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-950722b
docker run -p 8080:8080 ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-950722b
Then visit: http://localhost:8080
đ Changes in this PR:
- src/main/java/org/owasp/wrongsecrets/Challenges.java
- src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge14.java
- src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge59.java
- src/main/resources/explanations/challenge59.adoc
- src/main/resources/explanations/challenge59_hint.adoc
- src/main/resources/explanations/challenge59_reason.adoc
Visual diff screenshots will be available shortly...
Preview built by GitHub Actions
đ¨ Preview Build Complete!
Your changes have been built and pushed to GitHub Container Registry.
đŗ Docker Image: ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-950722b
đĻ Download & Test Locally:
- đ Download Docker Image Artifact (look for
wrongsecrets-preview-pr-2206) - Load and run the image:
# Download the artifact, extract it, then:
docker load < wrongsecrets-preview.tar
docker run -p 8080:8080 wrongsecrets-preview
đ Alternative - Pull from Registry:
docker pull ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-950722b
docker run -p 8080:8080 ghcr.io/owasp/wrongsecrets/wrongsecrets-pr:pr-2206-950722b
Then visit: http://localhost:8080
đ Changes in this PR:
- src/main/java/org/owasp/wrongsecrets/Challenges.java
- src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge14.java
- src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge59.java
- src/main/resources/explanations/challenge59.adoc
- src/main/resources/explanations/challenge59_hint.adoc
- src/main/resources/explanations/challenge59_reason.adoc
Visual diff screenshots will be available shortly...
Preview built by GitHub Actions
đ¸ Visual Diff Ready!
Screenshots comparing your changes with the main branch are available:
đ Download Visual Diff Artifacts
đŧī¸ Included screenshots:
pr-home.pngvsmain-home.png- Welcome page comparisonpr-about.pngvsmain-about.png- About page comparisonpr-challenge.pngvsmain-challenge.png- Challenge page comparison
đ How to review:
- Download the artifact zip file
- Extract and compare the
pr-*andmain-*images side by side - Look for visual differences in layout, styling, and content
đĄ Tip: Use an image comparison tool or open both images in separate browser tabs to spot differences easily.
Visual diff generated by GitHub Actions âĸ PR #2206
đ¸ Visual Diff Ready!
Screenshots comparing your changes with the main branch are available:
đ Download Visual Diff Artifacts
đŧī¸ Included screenshots:
pr-home.pngvsmain-home.png- Welcome page comparisonpr-about.pngvsmain-about.png- About page comparisonpr-challenge.pngvsmain-challenge.png- Challenge page comparison
đ How to review:
- Download the artifact zip file
- Extract and compare the
pr-*andmain-*images side by side - Look for visual differences in layout, styling, and content
đĄ Tip: Use an image comparison tool or open both images in separate browser tabs to spot differences easily.
Visual diff generated by GitHub Actions âĸ PR #2206
@copilot can you implement a method to go into the channel and get the data using the token?
@copilot can you implement a method to go into the channel and get the data using the token?
Implemented Telegram API integration in Challenge59. Added getSecretFromTelegramChannel() method that uses RestTemplate to call https://api.telegram.org/bot{token}/getMe with the hardcoded bot token. The implementation includes proper error handling with graceful fallback to ensure challenge stability, and comprehensive logging to demonstrate the security implications of hardcoded credentials. Commit d13b831.
[!WARNING]
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.telegram.org
- Triggering command:
/usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Dspring.profiles.active=test,maven-test -jar /home/REDACTED/work/wrongsecrets/wrongsecrets/target/surefire/surefirebooter-20250830072452938_3.jar /home/REDACTED/work/wrongsecrets/wrongsecrets/target/surefire 2025-08-30T07-24-52_134-jvmRun1 surefire-20250830072452938_1tmp surefire_0-20250830072452938_2tmp(dns block)- Triggering command:
/usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Dspring.profiles.active=test,maven-test -jar /home/REDACTED/work/wrongsecrets/wrongsecrets/target/surefire/surefirebooter-20250830072515999_3.jar /home/REDACTED/work/wrongsecrets/wrongsecrets/target/surefire 2025-08-30T07-25-15_933-jvmRun1 surefire-20250830072515999_1tmp surefire_0-20250830072515999_2tmp(dns block)If you need me to access, download, or install something from one of these locations, you can either:
- Configure Actions setup steps to set up my environment, which run before the firewall is enabled
- Add the appropriate URLs or hosts to the custom allowlist in this repository's Copilot coding agent settings (admins only)
đ GitHub Pages Preview Ready!
Your static preview is now available at: đ Preview PR #2206
đ What's included:
- â All CSS, JavaScript, and static assets (embedded inline)
- â Current styling and layout preview
- â Images, icons, and UI components
- â
NEW: Generated HTML from Thymeleaf templates
- đ Home/Welcome Page
- âšī¸ About Page
- đ Stats & Config Page
- đ¤ Challenge 57: LLM Security (Latest)
- đ§Š Challenge Example
For full functionality testing: Use the Docker preview instead.
đ Auto-updates: This preview will be updated automatically when you push new commits to this PR.
Static preview with Thymeleaf generation by GitHub Actions