Skip to content

test: add Pest v1 security test infrastructure#214

Merged
TheWitness merged 2 commits into
Cacti:developfrom
somethingwithproof:test/security-test-infrastructure
Jul 9, 2026
Merged

test: add Pest v1 security test infrastructure#214
TheWitness merged 2 commits into
Cacti:developfrom
somethingwithproof:test/security-test-infrastructure

Conversation

@somethingwithproof

Copy link
Copy Markdown
Contributor

Separates the Pest security test infrastructure into its own PR as requested.

Copilot AI review requested due to automatic review settings April 11, 2026 23:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds initial security-oriented test scaffolding under tests/ intended to prevent unsafe reuse of raw request values in HTML output within the monitor plugin.

Changes:

  • Adds a “unit” PHP script that validates expected HTML escaping behavior for a sample payload.
  • Adds an “integration” PHP script that scans monitor_controller.php / monitor_render.php for specific hardening call patterns.
  • Adds an “e2e” PHP script that scans for specific raw get_request_var(...) reuse string patterns.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
tests/unit/test_request_output_escaping.php Adds a basic escaping check for a sample payload.
tests/Integration/test_monitor_request_output_wiring.php Adds a static source scan asserting expected escaping/encoding call sites exist.
tests/e2e/test_monitor_no_raw_request_reuse.php Adds a static source scan asserting specific raw-request string patterns are absent.

Comment thread tests/unit/test_request_output_escaping.php Outdated
Comment thread tests/Integration/test_monitor_request_output_wiring.php
Comment thread tests/Integration/test_monitor_request_output_wiring.php Outdated
Comment thread tests/e2e/test_monitor_no_raw_request_reuse.php Outdated
Comment thread tests/e2e/test_monitor_no_raw_request_reuse.php
@TheWitness TheWitness merged commit dd609de into Cacti:develop Jul 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants