Files
cacti/tests/tools/docker_pest.sh
Thomas Vincent d4e255b5d9 security: stage nonce CSP migration and gated enforcement (#7662)
* security: add nonce CSP mode for inline JavaScript protection

Reworks the content_security_policy_script setting into a three-mode Inline JavaScript Protection dropdown (HTMLX default, Nonce, None) and ports the per-request nonce, strict-dynamic policy, and CSP violation report endpoint from 1.2.x. The stored option key and its default are unchanged, so existing installs keep their current policy byte-for-byte; nonce mode is opt-in.

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

* security: stage nonce CSP enforcement safely

Add report-only migration, gated enforcement, nonce-aware shared emitters, Linux Docker validation, and operator documentation.\n\nRefs #7703

* security: validate CSP header sources

Reject malformed alternate-source configurations at the CSP boundary, validate fallback report URIs, and remove the obsolete Psalm header-taint baseline entry.\n\nRefs #7705

* chore: drop the composer.json change from this PR

Dependency and manifest changes are a maintainer call and do not belong in
this one.

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

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-08-16 21:38:46 -04:00

23 lines
590 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
repo_root="$(cd "${script_dir}/../.." && pwd)"
base_image="${CACTI_DOCKER_BASE_IMAGE:-cacti-web}"
test_image="${CACTI_DOCKER_TEST_IMAGE:-cacti-test}"
docker build \
--tag "${base_image}" \
--file "${repo_root}/docker/Dockerfile" \
"${repo_root}/docker"
docker build \
--tag "${test_image}" \
--file "${repo_root}/docker/Dockerfile.test" \
"${repo_root}"
docker run --rm \
--env XDEBUG_MODE="${XDEBUG_MODE:-off}" \
"${test_image}" \
include/vendor/bin/pest --display-warnings "$@"