Commit Graph
14682 Commits
Author SHA1 Message Date
kevinveenbirkenbachandCopilot Autofix powered by AI 4785335a6b Potential fix for code scanning alert no. 173: Code injection
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-01-25 14:42:51 +01:00
kevinveenbirkenbach 6bff0a1188 Merge pull request #54 from kevinveenbirkenbach/alert-autofix-174
Potential fix for code scanning alert no. 174: Jinja2 templating with autoescape=False
2026-01-25 14:41:37 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI 5e2b697fe1 Potential fix for code scanning alert no. 174: Jinja2 templating with autoescape=False
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-01-25 14:41:18 +01:00
kevinveenbirkenbach a9f8eb2d8f Added adminstration helper 2026-01-25 14:32:04 +01:00
kevinveenbirkenbach bfcd97df67 Merge pull request #53 from kevinveenbirkenbach/alert-autofix-136
Potential fix for code scanning alert no. 136: Empty except
2026-01-25 11:29:15 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI 620ec7e1c0 Potential fix for code scanning alert no. 136: Empty except
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-01-25 11:28:43 +01:00
kevinveenbirkenbach cbd4a4dc93 Fixed path 2026-01-25 11:25:59 +01:00
kevinveenbirkenbach 1f8bfe4b31 Release version 0.12.0 v0.12.0 2026-01-25 11:19:36 +01:00
kevinveenbirkenbach 5f36451327 Merge pull request #51 from kevinveenbirkenbach/dependabot/github_actions/actions/upload-artifact-6
chore(deps): bump actions/upload-artifact from 4 to 6
2026-01-25 11:16:52 +01:00
kevinveenbirkenbach bed107114f Merge pull request #52 from kevinveenbirkenbach/feature/features-refactoring
Harden CI/CD, TLS, and Secret Handling; Improve Idempotency and Test Stability
2026-01-25 11:16:10 +01:00
kevinveenbirkenbach 49da7376a9 ci(ansible): add galaxy-to-git fallback for collection installation
Split collection requirements into Galaxy and Git sources and
introduce retry logic with Git fallback to harden CI against
transient Ansible Galaxy API failures.
2026-01-25 11:03:19 +01:00
kevinveenbirkenbach ea39b5b215 ci(ansible): add retry logic for galaxy collection install
Retry ansible-galaxy collection installation up to 10 times with
randomized backoff to mitigate transient Galaxy API outages.

https://chatgpt.com/share/6975e68c-1ae4-800f-810c-91521230f55b
2026-01-25 10:46:45 +01:00
kevinveenbirkenbach 10e0b7d479 Test universal parallel to server 2026-01-25 10:19:15 +01:00
kevinveenbirkenbach fc9e77241b Activated universal CI tests 2026-01-25 10:17:14 +01:00
kevinveenbirkenbach 9fd8b2328e ci(lint-shell): fix container invocation for shellcheck
- Use container ENTRYPOINT directly instead of calling shellcheck twice

https://chatgpt.com/share/69756a53-53c8-800f-9056-37baac0ab931
2026-01-25 01:59:28 +01:00
kevinveenbirkenbach f3e1ee0960 ci(lint): run ShellCheck via container and fix SC1091 false positives
- Run ShellCheck using koalaman/shellcheck container instead of apt
- Align CI linting behavior with local ShellCheck versions
- Suppress SC1091 for sourcing /etc/os-release in docker install script

https://chatgpt.com/share/69756a53-53c8-800f-9056-37baac0ab931
2026-01-25 01:56:42 +01:00
kevinveenbirkenbach 84397d01c3 feat(sys-ctl-hlth-csp)!: build URL targets from nginx listen directives
Switch CSP health crawler to URL-only mode by deriving http/https from each
nginx .conf (listen 80/443/ssl) and passing full URLs to csp-checker.
Update unit tests accordingly.

BREAKING CHANGE: sys-ctl-hlth-csp now passes full URLs instead of domains.

https://chatgpt.com/share/69756136-e658-800f-9e52-7d9c4a79d026
2026-01-25 01:42:44 +01:00
kevinveenbirkenbach 5cec8c9cb3 Removed dfelegate to localhost 2026-01-25 00:26:22 +01:00
kevinveenbirkenbach 6096890998 feat(web-app-baserow): add Django admin bootstrap and SECRET_KEY handling
- add optional idempotent bootstrap of Django superuser via script module
- execute admin bootstrap through docker compose exec with env injection
- avoid shell/quoting issues by passing credentials via environment
- introduce BASEROW_SECRET_KEY and wire it into container env
- ensure container recreation when DB credentials change
- document admin bootstrap and SECRET_KEY requirements in README

https://chatgpt.com/share/6975538c-a6d0-800f-b2ea-fbab963ef142
2026-01-25 00:19:31 +01:00
kevinveenbirkenbach 59b2d09eb7 fix(shellcheck): suppress false-positive for trap-invoked function
SC2329 is a known ShellCheck limitation for functions invoked via trap.

https://chatgpt.com/share/69755296-2d74-800f-8675-261a283e3782
2026-01-25 00:18:35 +01:00
kevinveenbirkenbach db2a9a6539 fix(shellcheck): address unused loop var and trap false positive
- Replace seq-based loop with brace expansion to avoid unused variable warning
- Use quoted trap handler so ShellCheck detects restore_hba invocation

https://chatgpt.com/share/69755296-2d74-800f-8675-261a283e3782
2026-01-25 00:15:27 +01:00
kevinveenbirkenbach 383a59e9a1 feat(svc-db-postgres): robust superuser password rotation via script with explicit auth verification
- replace Python helper with Bash script executed via ansible.script
- wait for postgres readiness inside container (pg_isready)
- explicitly verify password auth via temporary pg_hba override
- distinguish CHANGED / UNCHANGED / ALREADY OK states
- map script result deterministically to Ansible changed/failed logic
- remove legacy postgres_set_superuser_password.py

https://chatgpt.com/share/69754a74-9d18-800f-89a6-304b083fbe50
2026-01-24 23:40:47 +01:00
kevinveenbirkenbach 9b567a2f0e feat(postgres): ensure superuser password idempotently via helper script
Add a Python helper script to ensure the postgres superuser password inside
the Docker container without shell/SQL quoting issues.

The script:
- checks whether the password already works
- updates it only if necessary
- signals change state via exit codes (0 = unchanged, 2 = changed)

The role now calls the script via ansible.builtin.script and maps rc to
changed/failed correctly.

https://chatgpt.com/share/697528b6-79f4-800f-96c9-da993feff9b9
2026-01-24 21:16:47 +01:00
kevinveenbirkenbach 86eb54c0df Deactivated OIDC on Matrix and Mastodon as well as soon as TLS isn't integrated 2026-01-24 21:12:44 +01:00
kevinveenbirkenbach c86d9820f5 fix(dev-deploy): add missing when_down arg in restart
restart delegates to up.handler(), which expects args.when_down.
Add when_down=False to the restart -> up args shim to avoid AttributeError.

https://chatgpt.com/share/69752530-c570-800f-b82c-f4bc10231292
2026-01-24 21:01:45 +01:00
kevinveenbirkenbach f1b4436d57 Removed " to allow the test deploy of multiple apps in one step 2026-01-24 20:30:31 +01:00
kevinveenbirkenbach bc23176c60 Deactivated oidc in test environment temporary 2026-01-24 20:17:52 +01:00
kevinveenbirkenbach 76b4e4e08f fix(discourse): force C.UTF-8 locale to prevent Ruby US-ASCII crashes
https://chatgpt.com/share/6975155f-76e8-800f-999e-a8ee3b24236c
2026-01-24 19:54:14 +01:00
kevinveenbirkenbach 2b4e8473e4 Refactored LDAP for Discourse configuration 2026-01-24 18:13:13 +01:00
kevinveenbirkenbach 3b1032895a feat(security): introduce sed_escape filter and enforce safe sed replacements
- add sed_escape Jinja filter for sed replacement safety
  - escapes \, &, and the active sed delimiter
  - designed explicitly for sed s/// replacement context

- patch all sed-based config updates across roles
  - espocrm, friendica, gitea, matomo, moodle, wordpress
  - ensure every Jinja value in sed replacements uses sed_escape
  - use correct delimiter-specific escaping (/, |, #)

- add robust integration test to enforce sed_escape usage
  - scans all roles/*/tasks/**/*.yml
  - detects sed substitutions with Jinja in replacement part
  - ignores delimiters inside {{ ... }} blocks
  - fails CI if sed_escape is missing

- harden repository against sed injection, delimiter breakage,
  and credential corruption in config patching tasks

https://chatgpt.com/share/6974fb45-1ee8-800f-80bd-c71122e4ac02
2026-01-24 18:02:37 +01:00
kevinveenbirkenbach 8b1ae03e77 fix(env): prevent dotenv_quote double-quoting in env.j2 templates
- Replace `"{{ ... | dotenv_quote }}"` with `{{ ... | dotenv_quote }}` across roles
- Update integration test to enforce pure Jinja + dotenv_quote and forbid wrapped quotes

https://chatgpt.com/share/6974e6c6-51b8-800f-80a1-a76f885cf57e
2026-01-24 16:35:27 +01:00
kevinveenbirkenbach b2eea91fa4 Activated debug 2026-01-24 16:28:20 +01:00
kevinveenbirkenbach d4ecd331a5 test(integration): fail on double-quoted | quote in shell password expressions
Extend password-quoting integration test to:
- fail when password variables in shell tasks miss the `| quote` filter
- fail when `| quote` is used but the Jinja expression is wrapped in quotes
  (double-quoting)

This ensures shell-safe password handling and prevents quoted secrets
from being passed literally to CLI tools.

https://chatgpt.com/share/6974dd33-9470-800f-b469-d31fabcd59e1
2026-01-24 16:03:09 +01:00
kevinveenbirkenbach 737adaa567 fix(shell): quote all password variables in shell tasks
Ensure all password usages in shell commands are safely quoted using the
`| quote` filter to prevent shell injection issues and test failures.

Affected roles:
- svc-db-postgres
- web-app-gitea
- web-app-mediawiki
- web-app-moodle
- web-app-shopware
- web-app-xwiki

https://chatgpt.com/share/6974dd33-9470-800f-b469-d31fabcd59e1
2026-01-24 15:54:29 +01:00
kevinveenbirkenbach dcb33e089d test(integration): enforce password quoting rules for definitions and shell tasks
- add integration test to ensure password variable definitions never use '| quote'
- add integration test to ensure password usage in shell tasks always uses '| quote'
- scope checks to roles/**.yml using regex-based best-effort parsing

https://chatgpt.com/share/6974da97-e6dc-800f-8acc-43aa45e6cf8f
2026-01-24 15:43:29 +01:00
kevinveenbirkenbach fdb2683ddb test(env): enforce dotenv_quote + double quotes for password vars in env.j2 templates
https://chatgpt.com/share/6974cbac-023c-800f-8198-fd85df2aa7bc
2026-01-24 15:32:33 +01:00
kevinveenbirkenbach aa7d0c642c feat(dotenv): add dotenv_quote filter and enforce quoted password vars in env.j2
https://chatgpt.com/share/6974cbac-023c-800f-8198-fd85df2aa7bc
2026-01-24 15:22:19 +01:00
kevinveenbirkenbach f270e6c6eb fix(openproject): pass admin password via env to avoid shell expansion
https://chatgpt.com/share/6974cbac-023c-800f-8198-fd85df2aa7bc
2026-01-24 14:39:28 +01:00
kevinveenbirkenbach 51e01d0bec Introduced correct order 2026-01-24 14:10:43 +01:00
kevinveenbirkenbach 117b132556 fix(mailu): make user creation idempotent and harden password handling
- rename mailu_password to mailu_user_password for clarity
- switch to shell execution to support proper argument quoting
- define correct changed_when/failed_when based on Mailu CLI behavior
- tolerate duplicate-user errors without failing the run

https://chatgpt.com/share/6974adda-1808-800f-8204-40d94a908bd0
2026-01-24 12:32:28 +01:00
kevinveenbirkenbach 54c75725ed fix(mailu): remove retries/until from user and password management tasks
The Mailu CLI commands are synchronous and deterministic.
Removing retries/until prevents failures caused by skipped tasks
without rc/stderr fields.

https://chatgpt.com/share/6974403a-8624-800f-b423-4656539b7fef
2026-01-24 04:44:51 +01:00
kevinveenbirkenbach 33a4b2a430 **feat(web-app-keycloak): add kcadm noisy-JSON helper and remove jq/--query usage**
Introduces role-local `kcadm_json` filter + `module_utils/kcadm_json.py` to reliably parse kcadm output with JVM noise, and reuses it in `keycloak_kcadm_update` and LDAP/RBAC/recaptcha tasks to eliminate jq/`--query`. Also refactors LDAP groups.path handling via `include_tasks` to avoid repeated `when` conditions and adds unit tests for filter/module utils/library behavior.

https://chatgpt.com/share/69743d89-b1c0-800f-b571-90f64605dfe4
2026-01-24 04:33:14 +01:00
kevinveenbirkenbach ffb470877c fix(keycloak): make kcadm JSON parsing robust against noisy stdout and harden create/update logic
Handle JVM/cgroup warnings mixed into stdout by scanning and validating JSON segments,
replace fragile query-based lookups with list+filter resolution, and fix create-path
control flow to exit deterministically after successful creation.

https://chatgpt.com/share/69742b27-7980-800f-a142-4ffcf379386c
2026-01-24 03:14:56 +01:00
kevinveenbirkenbach edd7660fc9 **fix(mailu): pass passwords starting with “-” safely to CLI**
* Add `--` end-of-options marker to Mailu `flask mailu user/password` commands so passwords like `-C...` aren’t parsed as flags.
* Update `inventory.sample.yml` example password accordingly.

https://chatgpt.com/share/69741500-abb4-800f-a922-087a552ba49d
2026-01-24 01:40:27 +01:00
kevinveenbirkenbach 27fb80bf86 fix(docker-compose): only pass --env-file when it exists on target host
Avoid docker compose config/pull failures by checking env file existence
with `is file` instead of relying on non-empty path strings.

https://chatgpt.com/share/6973f723-0f18-800f-bb75-489f5aeafa81
2026-01-23 23:33:03 +01:00
kevinveenbirkenbach b770c1a4eb Deactivated async and made dbug mode by default for tests 2026-01-23 23:18:06 +01:00
kevinveenbirkenbach 42e59ac58f Added guard for ca injection 2026-01-23 22:56:20 +01:00
kevinveenbirkenbach f4b342ef34 Optimized timings 2026-01-23 21:57:50 +01:00
kevinveenbirkenbach 35c1d29a88 fix(docker-compose): remove has_domain filter dependency from compose_f_args
Make has_domain filter self-contained (no module_utils/sys.path hacks) and let compose_f_args detect domains internally to avoid missing-filter failures. Adjust unit tests accordingly and increase Mailu user creation retry delay.

https://chatgpt.com/share/6973e02e-f22c-800f-aae3-1f57637a746c
2026-01-23 21:54:55 +01:00
kevinveenbirkenbach b1bf9386e2 Track async enabled 2026-01-23 21:48:23 +01:00