-
Notifications
You must be signed in to change notification settings - Fork 13
Add defense CTF challenges, IDS integration, and CTF UX improvements #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
28932a0
Add defense CTF challenges and fix IDS detection bugs
a688142
Fix CTF back button and redirect navigation in iframe
5926677
Fix fenced code blocks rendering inside markdown list items
3776a2b
Improve CTF layout: category tiles, tags, collapsible hints
0a47911
Add collapsible hint sections to all training modules
88f54fb
Add challenge filtering, progressive hints, flag feedback, learning p…
6ce9781
Remove filter bar and learning path from CTF page
82a3fe6
Integrate detect challenges with IDS — flags revealed on rule trigger
1f4c75b
Merge main into feature/defense-ctf-challenges
4b2cf06
Restructure CTF training content and redesign challenge page UI
59d83ba
Fix unrealistic defense advice and content issues in training modules
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Minimal dev setup - landing page only (for UI testing) | ||
| services: | ||
| landing: | ||
| build: | ||
| context: . | ||
| dockerfile: software/landing/Dockerfile | ||
| restart: "no" | ||
| mem_limit: 128m | ||
| cap_add: | ||
| - NET_ADMIN | ||
| - NET_RAW | ||
| network_mode: host | ||
| volumes: | ||
| - /var/run/docker.sock:/var/run/docker.sock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium
Copilot Autofix
AI about 2 months ago
In general, the problem should be fixed by ensuring that exception objects (or their string representations) are never sent directly to clients. Instead, log detailed error information on the server and return a generic, user-friendly error message to the client.
The best targeted fix here is to change the
except Exception as eblock inCTFManager.verify_defenseso that it continues to log the detailed error (including stack trace) but returns a generic message that does not containstr(e). We do not need to change the/ctf/verify/<challenge_id>route inapp.py; it can continue to return whateververify_defenseproduces. That keeps existing control flow and success behavior intact while only altering the contents of error messages. Concretely, insoftware/landing/modules/ctf_manager.py, lines 130–132 should be updated to:logger.error(..., exc_info=True)call so that developers still see the detailed error and stack trace."message"value fromf'Verification error: {str(e)}'to a generic string such as'An internal verification error occurred.'(or similarly non-revealing text).No new methods or imports are required; we rely only on the existing logger.