{"id":25435468,"url":"https://github.com/csivitu/ctfup","last_synced_at":"2025-11-01T02:30:32.860Z","repository":{"id":38058522,"uuid":"277494477","full_name":"csivitu/ctfup","owner":"csivitu","description":"A CLI tool to deploy CTF challenges to a k8 cluster for csictf.","archived":false,"fork":false,"pushed_at":"2023-01-07T19:58:29.000Z","size":430,"stargazers_count":13,"open_issues_count":14,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-04T22:44:52.487Z","etag":null,"topics":["csictf","ctf","ctf-tools","docker","google-cloud","kubernetes-deployment"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ctfup","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csivitu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-06T09:08:32.000Z","updated_at":"2023-09-19T07:50:30.000Z","dependencies_parsed_at":"2023-02-08T00:01:06.154Z","dependency_job_id":null,"html_url":"https://github.com/csivitu/ctfup","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csivitu%2Fctfup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csivitu%2Fctfup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csivitu%2Fctfup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csivitu%2Fctfup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csivitu","download_url":"https://codeload.github.com/csivitu/ctfup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239032206,"owners_count":19570770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csictf","ctf","ctf-tools","docker","google-cloud","kubernetes-deployment"],"created_at":"2025-02-17T07:30:04.546Z","updated_at":"2025-11-01T02:30:32.831Z","avatar_url":"https://github.com/csivitu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![csivit][csivitu-shield]][csivitu-url]\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n[![Issues][issues-shield]][issues-url]\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/csivitu/ctfup\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/csivitu/CSIWebsite2.0/master/Website/images/favicon.png\" alt=\"Logo\" width=\"80\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003ectfup\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    A CLI tool to deploy CTF challenges to a k8 cluster for `csictf`.\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/csivitu/ctfup\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/csivitu/ctfup\"\u003eView Demo\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/csivitu/ctfup/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/csivitu/ctfup/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\n## Table of Contents\n\n- [About the Project](#about-the-project)\n  - [Built With](#built-with)\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installation](#installation)\n- [Usage](#usage)\n- [Roadmap](#roadmap)\n- [Contributing](#contributing)\n- [License](#license)\n- [Contributors](#contributors-)\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n\n## About The Project\n\n**ctfup** is an npm package developed to streamline the deployment of CTF challenges to a kubernetes cluster. \n\n### Built With\n\n- [NodeJS](https://nodejs.org/en/)\n- [Typescript](https://www.typescriptlang.org/)\n- [Google Kubernetes](https://cloud.google.com/kubernetes-engine)\n\n\u003c!-- GETTING STARTED --\u003e\n\n## Getting Started\n\nTo get a local copy up and running follow these simple steps.\n\n### Prerequisites\n\nThis package is intended to be used in your CI script, or with the appropriate Google Cloud SDK.\n\n- npm\n\n```sh\nnpm install npm@latest -g\n```\n\n- A Google Cloud account with the Kubernetes Engine enabled.\n- A Google Cloud Service account.\n\n### Installation\n\n1. Clone the repo\n\n```sh\ngit clone https://github.com/csivitu/ctfup.git\n```\n\n2. Install NPM packages\n\n```sh\nnpm install\n```\n\n\u003c!-- USAGE EXAMPLES --\u003e\n\n## Usage\n\n\n1. Assuming you have a repository for challenges, kindly structure it as follows:\n\n```bash\n├── pwn\n│   ├── pwn-challenge-1\n│   │   ├── *\n│   │   ├──challenge.yml\n│   │   ├──Dockerfile\n│   │   └──.dockerignore\n│   │\n│   ├── pwn-challenge-2\n│   │   ├── *\n│   │   ├──challenge.yml\n│   │   ├──Dockerfile\n│   │   └──.dockerignore\n│   │\n│   └── pwn-challenge-3\n│\n├── crypto\n├── forensics\n├── linux\n├── reversing\n├── miscellaneous\n├── osint\n├── pwn\n├── web\n└── ctfup.yml\n```\n\nThe directories `pwn` , `crypto` etc. each have sub directories with each sub directory having a `challenge.yml`, a `Dockerfile` and corresponding `.dockerignore`.\n\n2. The root directory of your repository must have a config file `ctfup.yml` as per the format.\n\n```yaml\ncategories:\n  - \"crypto\"\n  - \"forensics\"\n  - \"linux\"\n  - \"reversing\"\n  - \"miscellaneous\"\n  - \"osint\"\n  - \"pwn\"\n  - \"web\"\nregistry: \"gcr.io/\u003cproject name\u003e-\u003cproject id\u003e\"\n```\n\n3. The format of `challenge.yml` is as follows:\n\n```yaml\n# This file represents the base specification of your challenge. It is used by\n# other tools to install and deploy your challenge.\n\n# Required sections\nname: \"challenge name\"\nauthor: \"author\"\n\n# Select a category from:\n# - Pwn\n# - Web\n# - OSINT\n# - Linux\n# - Crypto\n# - Forensics\n# - Reversing\n# - Miscellaneous\ncategory: category\n\n# This is the challenge description. Make sure you include the\n# necessary URLs / netcat strings here.\ndescription: This is a sample description\n\n# This is the number of points awarded for the challenge.\nvalue: 500\ntype: dynamic\n\n# Number of solves it takes to reach the minimum value.\ndecay: 450\n\n# Minimum value.\nminimum: 100\n\n# Flags specify answers that your challenge use. You should generally provide\n# at least one.\n# Can be removed if unused\n# Accepts strings or dictionaries\nflags:\n  - csictf{this_is_a_sample_flag}\n  - { type: \"static\", content: \"csictf{another_flag}\", data: \"asdfasdfsdf\" }\n\n# Tags are used to classify your challenge with topics. You should provide at\n# least one.\n# Can be removed if unused\n# Accepts strings\ntags:\n  - web\n  - sandbox\n  - js\n\n# Provide paths to files from the same directory that this file is in\n# Accepts strings\nfiles:\n  - dist/source.py\n\n# Hints are used to give players a way to buy or have suggestions. They are not\n# required but can be nice.\n# Can be removed if unused\n# Accepts dictionaries or strings\nhints:\n  - { content: \"This hint costs points\", cost: 10 }\n  - This hint is free\n\n# The state of the challenge.\n# May be \"visible\" or \"hidden\".\n# It is \"visible\" by default.\nstate: hidden\n\n# Specifies what version of the challenge specification was used.\n# Subject to change until ctfcli v1.0.0\nversion: \"0.1\"\n\n# The ports to expose. The target port will be used to access the deployed container.\nexpose:\n- containerPort: 9999\n  targetPort: 30231\n```\n\n4. The directory containing the `challenge.yml` file must _also_ contain a Dockerfile which will be used by GKE.\u003cbr\u003e\u003cbr\u003e\n\n5. Setup your preferred CI for your project. In this case, we will use a Github Action. \u003cbr\u003e\u003cbr\u003e\n\n```yaml\n- uses: actions/checkout@v2\n- uses: actions/setup-node@v1\n  with:\n    node-version: \"12\"\n- run: npm install -g ctfup\n```\n\n6. Add the required secrets and in your `yaml` config file, set up the gcloud environment with\n\n```yaml\nuses: GoogleCloudPlatform/github-actions/setup-gcloud@master\n  with:\n    version: '290.0.1'\n    service_account_key: ${{ secrets.GKE_SA_KEY }}\n    project_id: ${{ secrets.GKE_PROJECT }}\n```\n\nNote: use the latest version of the Github Action.\n\n7. Additional setup\n\n```yaml\n# Configure Docker to use the gcloud command-line tool as a credential\n# helper for authentication\n- run: |-\n    gcloud --quiet auth configure-docker\n# Get the GKE credentials so we can deploy to the cluster\n- run: |-\n    gcloud container clusters get-credentials \"${{ secrets.GKE_CLUSTER_NAME }}\" --zone \"${{ secrets.GKE_CLUSTER_ZONE }}\"\n```\n\n\u003cbr\u003e\n8. Deploy\n\n```yaml\n- name: Deploy\n  run: ctfup -c ctfup.yml .\n```\n\n\u003c!-- _For more examples, please refer to the [Documentation](https://example.com)_ --\u003e\n\n\u003c!-- ROADMAP --\u003e\n\n## Roadmap\n\nSee the [open issues](https://github.com/csivitu/ctfup/issues) for a list of proposed features (and known issues).\n\n\u003c!-- CONTRIBUTING --\u003e\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'feat: Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\nYou are requested to follow the contribution guidelines specified in [CONTRIBUTING.md](./CONTRIBUTING.md) while contributing to the project :smile:.\n\n\u003c!-- LICENSE --\u003e\n\n## License\n\nDistributed under the MIT License. See [`LICENSE`](./LICENSE) for more information.\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n\n[csivitu-shield]: https://img.shields.io/badge/csivitu-csivitu-blue\n[csivitu-url]: https://csivit.com\n[issues-shield]: https://img.shields.io/github/issues/othneildrew/Best-README-Template.svg?style=flat-square\n[issues-url]: https://github.com/csivitu/ctfup/issues\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/thebongy\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/7080652?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRishit Bansal\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/csivitu/ctfup/commits?author=thebongy\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#infra-thebongy\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/roerohan\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/42958812?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRohan Mukherjee\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/csivitu/ctfup/commits?author=roerohan\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#infra-roerohan\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/theProgrammerDavid\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/35698009?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003etheProgrammerDavid\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/csivitu/ctfup/commits?author=theProgrammerDavid\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsivitu%2Fctfup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsivitu%2Fctfup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsivitu%2Fctfup/lists"}