Repository navigation
Soft version supporting only OpenSSL / Apache mod php - #3
Merged
Merged
Conversation
Co-authored-by: Copilot <copilot@github.com>
- Add hrtime-based debug logging to SignController and DecryptController;
each request logs 'sign completed'/'decrypt completed' with durationMs,
algorithm, and backend name at LOG_LEVEL=debug
- Extensively fix tools/comprehensive-perf-test.sh to match actual
implementation:
- Fix log grep patterns to match new debug messages
- Fix BACKEND_ERRORS grep (ExceptionSubscriber never logs; use level_name)
- Fix docker logs --since to use relative 'Xm' format (Docker on this
version ignores bare Unix timestamps)
- Fix set -euo pipefail + grep -c interaction (wrap analysis with set +e)
- Fix declare -A usage (not supported in bash 3.2 on macOS); rewrite
per-phase table in portable awk
- Fix restore_log_level() not called when stats collector is stopped
- Fix hey output parsing (double-% percentile lines, [200] leading spaces)
- Fix memory parsing (strip / <limit> portion before unit detection)
- Optimise compute_stats() to single sort pass
- Add docs/performance-benchmark-report.md with results from a 481-second
four-phase load test (454,274 requests, 0 errors, 0 restarts)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The CI workflow was running 'docker compose run --rm app composer check' which triggered the compose.yaml bind mount (.:/var/www/html). This overwrote the vendor/ directory baked into the dev image, making vendor/bin/phplint (and other dev tools) unavailable on CI. Fix CI by using 'docker run' directly against the built image, which runs checks against the exact image artifact without any volume mounts. Also add a named volume for vendor/ in compose.yaml so that local development correctly uses the image-installed dependencies rather than an empty host directory. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the named vendor volume with an entrypoint script in the dev image stage. On container startup, composer install runs against the bind-mounted source tree, ensuring vendor/ is always in sync with composer.lock without requiring a named volume or image rebuild. When arguments are passed (e.g. docker run ... composer check in CI), the entrypoint runs composer install and then execs the given command instead of starting Apache. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The base image's /entrypoint.sh handles Apache user setup, cache clear, directory permissions, and execs the CMD. Chain into it so upstream changes continue to take effect. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove tests/, phpunit.xml.dist, phpcs.xml, and .phplint.yml from .dockerignore so PHPStan, PHPUnit, PHPCS and phplint can find them when running composer check inside the dev image. Restrict the push trigger to main so feature branches don't run CI twice (once for push, once for the pull_request event). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace COPY . . in prod stage with explicit copies of only runtime files (src, config, bin, public, templates, composer files, .env). Test and dev-tool files (tests/, phpcs.xml, phpunit.xml.dist, phpstan.neon, phpstan-baseline.neon, .phplint.yml) are now only copied in the dev stage. Files must not be in .dockerignore so the dev-stage COPY commands can access them from the build context. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ng Apache When docker run is called with arguments (e.g. composer check), the entrypoint was ignoring them and always launching apache2-foreground, causing the CI 'Run checks' step to hang indefinitely. Add an exec "$@" branch: if arguments are provided, execute them directly; otherwise fall through to the default Apache startup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the Apache startup command to CMD in the Dockerfile so the entrypoint only does setup (optional composer install) and then always delegates via 'exec "$@"'. This is the standard Docker pattern: CMD provides the default arguments to ENTRYPOINT, and 'docker run ... composer check' overrides CMD cleanly without any conditional logic in the script. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mroest
commented
Apr 30, 2026
mroest
left a comment
Collaborator
Author
There was a problem hiding this comment.
PR Review
7 findings across 2 security violations, 2 requests for change, and 3 optional improvements. Finding #6 (dual log lines in controllers) was intentionally withdrawn — tools/comprehensive-perf-test.sh greps for the debug-level messages to extract timing statistics.
…proved stability and security
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Transition to an OpenSSL-only version, simplify backend and key configurations, and improve error handling. Introduce performance benchmarking and implement brute-force rate limiting for authentication failures. Update documentation for clarity and add an initial draft of the OWASP ASVS 5.0 Level 1 security audit report.