-
Notifications
You must be signed in to change notification settings - Fork 0
Add initial Toolkit system #3
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
Conversation
- Enhanced README.md with detailed instructions on running the tool, including cloning the repository and installing dependencies. - Updated command argument parsing in `page.py`, `slugify.py`, and `template_renderer.py` to ensure GitHub repository is provided, improving error handling. - Replaced hardcoded schema URLs with constants from `config.py` for better maintainability. - Removed unused demo and model files to clean up the repository.
…ate slugify argument to positional
…t functionality and usage scenarios
…n Kubernetes templates
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…re prerequisite uniqueness
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a comprehensive CLI toolkit for CTF challenge development and deployment. The toolkit provides commands for creating challenges, building Docker images, rendering Kubernetes templates, and managing CTFd pages. It includes Python source code, tests, configuration files, K8s templates, and extensive documentation.
Key changes:
- Added CLI framework with 5 commands:
create,template,pipeline,page, andslugify - Implemented data models for Challenge and Page with validation and serialization
- Created Kubernetes template system for challenge deployment
- Added comprehensive test suite with 1188 lines of tests
- Provided extensive README documentation (600+ lines)
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ctf.py | Main CLI entry point that registers and dispatches subcommands |
| src/library/data.py | Core data models (Challenge, Page, ChallengeFlag, DockerfileLocation) with validation |
| src/library/config.py | Configuration constants for categories, difficulties, schemas, and defaults |
| src/library/utils.py | Utility functions for path handling, slugification, and file operations |
| src/library/generator.py | Challenge scaffolding generator for directory and file creation |
| src/commands/*.py | Command implementations for create, template, pipeline, page, and slugify |
| src/tests/library/dataTest.py | Comprehensive unit tests for data models |
| src/test.py | Test runner script |
| template/*.yml | Kubernetes deployment templates for challenges and pages |
| README.md | Extensive documentation covering installation, usage, and structure |
| .gitignore | Standard Python gitignore |
| src/requirements.txt | Python dependencies (pyyaml, python-slugify) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ls and handle slug generation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 27 out of 28 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.