3 Commits
Author SHA1 Message Date
Thomas Vincent 41780277d3 fix(docker): restrict development permissions and start the poller (#8453)
* fix(docker): restrict the dev stack to localhost and make the poller run

The web port bound to every interface, named volumes hid the shipped .htaccess denies, and the cron job could neither find php nor write to PID 1's output, so the poller never ran.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* test(docker): keep harnesses polling and restore the developer's config.php

check_docker.sh deleted an existing include/config.php on exit, health polling aborted under pipefail before the container reported, the MariaDB wait had no bound, and the BSD mktemp template left its Xs literal.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs(changelog): add fragment for #8453

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* test(e2e): move the pointer off the Deepness multiselect button

Deepness sets a zero body margin, so the unhovered #ms-button sits at the viewport origin and headless Chromium on Linux intermittently applies :hover to it.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* ci: pull pinned integration database from authenticated mirror

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-10-23 08:17:48 -04:00
TheWitness b1f649bf77 Fix: Remove opcache from nightly heavy as well as rector (#6923)
* Fix: Remove opcache from nightly heavy as well as rector

* Fix: Adding more php-stan checks

* Fix: Proper syntax for array
2026-03-31 13:29:35 -04:00
242751e41b fix: harden Docker dev environment (#6621)
* fix: harden Docker dev environment and add smoke tests

Address Copilot review feedback from #6618: input validation on DB
env vars in entrypoint, scoped AllowOverride, localhost-only DB port
binding, security headers (Referrer-Policy, Permissions-Policy,
X-Permitted-Cross-Domain-Policies), reduced php-fpm worker count,
expose_php disabled, and .env excluded from git.

Adds tests/tools/check_docker.sh — 29-point smoke test covering
build, health, PHP extensions, config generation, cron, HTTP,
security headers, and DB connectivity.

* Update docker/entrypoint.sh

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: address Copilot and TheWitness review feedback

tests/tools/check_docker.sh:
- shebang: #!/bin/bash -> #!/usr/bin/env bash (consistent with repo)
- add GPL copyright header (2004-2026)
- fix grep pattern: single-quoted '^${ext}$' never expanded variable;
  use double quotes so extension name is actually matched
- add opcache to REQUIRED_EXTS (TheWitness)

docker/entrypoint.sh:
- shebang: #!/bin/bash -> #!/usr/bin/env bash

docker/Dockerfile:
- rrdtool comment: clarify that 1.9+ enables graph tooltip output via
  graphv, not merely "hover tooltips" (TheWitness)

docker/apache.conf:
- X-XSS-Protection: add TODO comment noting it is deprecated and that
  Cacti sets its own headers at the application layer (TheWitness)

---------

Co-authored-by: TheWitness <thewitness@cacti.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-17 22:46:45 -05:00