From 7d1a8f409b752e10ed77ed2e54a0f2db7ef0f735 Mon Sep 17 00:00:00 2001 From: Pantelis Roditis Date: Mon, 22 Dec 2025 11:16:18 +0200 Subject: [PATCH 1/5] dont cry about img tags --- .markdownlint.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.markdownlint.yaml b/.markdownlint.yaml index 015a17ac8..7ace1f4be 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -2,4 +2,5 @@ MD012: false MD013: false # Disable required empty line after heading -MD022: false \ No newline at end of file +MD022: false +MD033: false \ No newline at end of file From 3255e8fe50bd0901893d84a3fca60b620a1edccf Mon Sep 17 00:00:00 2001 From: Pantelis Roditis Date: Mon, 22 Dec 2025 11:42:17 +0200 Subject: [PATCH 2/5] update initializing a new event --- docs/Initializing a new event.md | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/docs/Initializing a new event.md b/docs/Initializing a new event.md index c226050b5..632386bf3 100644 --- a/docs/Initializing a new event.md +++ b/docs/Initializing a new event.md @@ -1,16 +1,25 @@ -# Instructions for events +# Initializing a new event -1. Create an empty github repo -2. Clone the repo locally +The following document provides instructions on how to initialize a private project for your new event. + +Its generally advised that you do not work directly on a clone of the official project, since the project may get updated in between which can cause your project to be corrupted. + +1. Create an empty github repo (we dont clone since clones cant be private) +2. Clone your new project locally 3. Clone echoctf.red repo into a temporary location -4. move all files from echoctf.red to the empty repo except `.git/`, `.github/`, +4. move all files from echoctf.red to the empty repo, except: `.git/`, `.github/`, `.mkdocs.yml`, `.readthedocs.yml`, `README.md`, `FAQ.md`, `docker-compose.yml`, `docker-compose-novpn.yml`, `docker-compose-novpn-macvlan.yml`, `CREDITS.md`, `CONTRIBUTING.md` -5. `mkdir migrations` -6. edit `contrib/init.sh` and modify the database name on top of the file as well as and the **`sysconfig`** values -7. run `./init.sh settings services sql migrate sysconfig init services tmuxs` (notice that `services` need to given twice) -8. Edit `frontend/config/web.php` and change the cookie `secure` flag to false +5. Create a folder for your local migrations `mkdir migrations` +6. Copy the files from `contrib/sample-migrations/` into `migrations` +7. Edit the migration files with your own details, such as event name, durations etc + +For local testing also do the following: + +1. edit `contrib/init.sh` and modify the database name on top of the file as well as and the **`sysconfig`** values +2. run `./contrib/init.sh settings services sql migrate sysconfig init services tmuxs` (notice that `services` is given twice) +3. Edit `frontend/config/web.php` and change the cookie `secure` flag to `false` In order to: @@ -24,3 +33,10 @@ In order to: * `frontend/images/logo.png` same logo but larger (919x184) * `frontend/web/images/twnew-target.png` logo used to create target social images (1200x628) * `frontend/web/images/badge.tpl.png` Template image used to generate the player badges (800x220) + +2. Certain image folders on the frontend are not tracked in git, so if you want to add images there you have to remove the `.gitignore` entries + * `frontend/web/images/.gitignore` for flag images (you can use the ones you like as long as they follow the same format) + * `frontend/web/images/targets/.gitignore` for your network images + * `frontend/web/images/networks/.gitignore` for your network images + * `frontend/web/images/avatars/.gitignore`, `frontend/web/images/avatars/badges/.gitignore`, `frontend/web/images/avatars/team/.gitignore` for player and team avatars as well as player badges. + * `frontend/web/images/challenge/.gitignore` & `frontend/web/images/challenge/category/.gitignore` for specific challenges or categories From d813e052772b045f77ae7b4cef235c6b2ceebdf5 Mon Sep 17 00:00:00 2001 From: Pantelis Roditis Date: Mon, 22 Dec 2025 11:42:28 +0200 Subject: [PATCH 3/5] remove scrutinizer files --- .github/scrutinizer.yml | 162 ---------------------------------------- 1 file changed, 162 deletions(-) delete mode 100644 .github/scrutinizer.yml diff --git a/.github/scrutinizer.yml b/.github/scrutinizer.yml deleted file mode 100644 index 07d1986ef..000000000 --- a/.github/scrutinizer.yml +++ /dev/null @@ -1,162 +0,0 @@ -build: - environment: - php: 7.3.0 - nodes: - frontend: - root_path: "./frontend" - project_setup: - override: - - 'true' - tests: - override: - - php-scrutinizer-run --enable-security-analysis --sub-project-dir=frontend/ - - - command: phpcs-run - idle_timeout: 1200 - backend: - root_path: "./backend" - project_setup: - override: - - 'true' - tests: - override: - - php-scrutinizer-run --enable-security-analysis --sub-project-dir=backend/ - - - command: phpcs-run - idle_timeout: 1200 - - tests: true - dependencies: - before: - - composer global require "fxp/composer-asset-plugin" --no-interaction -filter: - dependency_paths: - - "*/vendor/" -checks: - php: - code_rating: true - duplication: true - fix_php_opening_tag: false - remove_php_closing_tag: false - one_class_per_file: false - side_effects_or_types: false - no_mixed_inline_html: false - require_braces_around_control_structures: false - php5_style_constructor: false - no_global_keyword: false - avoid_usage_of_logical_operators: false - psr2_class_declaration: false - no_underscore_prefix_in_properties: false - no_underscore_prefix_in_methods: false - blank_line_after_namespace_declaration: false - single_namespace_per_use: false - psr2_switch_declaration: false - psr2_control_structure_declaration: false - avoid_superglobals: false - security_vulnerabilities: true - no_exit: false - -coding_style: - php: - indentation: - general: - use_tabs: false - size: 2 - switch: - indent_case: true - spaces: - general: - linefeed_character: newline - before_parentheses: - function_declaration: undefined - closure_definition: undefined - function_call: undefined - if: undefined - for: undefined - while: undefined - switch: undefined - catch: undefined - array_initializer: undefined - around_operators: - assignment: undefined - logical: undefined - equality: undefined - relational: undefined - bitwise: undefined - additive: undefined - multiplicative: undefined - shift: undefined - unary_additive: undefined - concatenation: undefined - negation: undefined - before_left_brace: - class: undefined - function: undefined - if: undefined - else: undefined - for: undefined - while: undefined - do: undefined - switch: undefined - try: undefined - catch: undefined - finally: undefined - before_keywords: - else: undefined - while: undefined - catch: undefined - finally: undefined - within: - brackets: undefined - array_initializer: undefined - grouping: undefined - function_call: undefined - function_declaration: undefined - if: undefined - for: undefined - while: undefined - switch: undefined - catch: undefined - type_cast: undefined - ternary_operator: - before_condition: undefined - after_condition: undefined - before_alternative: undefined - after_alternative: undefined - in_short_version: undefined - other: - before_comma: undefined - after_comma: undefined - before_semicolon: undefined - after_semicolon: undefined - after_type_cast: undefined - braces: - classes_functions: - class: undefined - function: undefined - closure: undefined - if: - opening: new-line - always: false - else_on_new_line: true - for: - opening: new-line - always: false - while: - opening: undefined - always: false - do_while: - opening: undefined - always: false - while_on_new_line: false - switch: - opening: undefined - try: - opening: new-line - catch_on_new_line: true - finally_on_new_line: true - upper_lower_casing: - keywords: - general: undefined - constants: - true_false_null: undefined From c64b1afee47e3582cd4dd19effe5df06e718ea34 Mon Sep 17 00:00:00 2001 From: Pantelis Roditis Date: Mon, 22 Dec 2025 11:44:43 +0200 Subject: [PATCH 4/5] update gitingore for when we develop --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..73b4acbfc --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +echoCTF-full*.sql +echoCTF-dataonly.sql +/init.sh From 85e3a9ac3148d0583501129a0699179c1a8007fc Mon Sep 17 00:00:00 2001 From: Pantelis Roditis Date: Mon, 22 Dec 2025 11:47:17 +0200 Subject: [PATCH 5/5] update our local gitignore used when develop --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 73b4acbfc..c75d4961c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -echoCTF-full*.sql -echoCTF-dataonly.sql +/echoCTF-full*.sql +/echoCTF-dataonly.sql /init.sh