hardening: migrate RLIKE to db_qstr and improve input handling#762
Open
somethingwithproof wants to merge 1 commit intoCacti:developfrom
Open
hardening: migrate RLIKE to db_qstr and improve input handling#762somethingwithproof wants to merge 1 commit intoCacti:developfrom
somethingwithproof wants to merge 1 commit intoCacti:developfrom
Conversation
TheWitness
previously approved these changes
Mar 23, 2026
Member
|
@somethingwithproof, please fix the automation and this is ready to merge. |
Author
|
Ran local pre-commit checks with PHP 8.4:
|
SQL hardening: - Convert all db_execute with $selected_items concatenation to db_execute_prepared - Migrate RLIKE filter values from raw interpolation to db_qstr() - Add intval() guards on integer interpolations in thold.php and thold_graph.php - Replace cacti_unserialize(stripslashes()) with sanitize_unserialize_selected_items() - Fix indentation in notify_lists.php form_actions block - Pin shivammathur/setup-php to full commit SHA in CI Tests and tooling: - Add Pest test framework with PHPStan level 6 - Add XSS output escaping tests - Add prepared statement source-verification tests - Add security audit documentation (SECURITY-AUDIT.md, BACKLOG.md) Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
ae36a9a to
f17c7d1
Compare
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.
Summary
Hardening
concatenation to db_execute_prepared with parameter binding
WHERE clauses in thold.php and thold_graph.php (data_template_id,
thold_template_id, site_id, host_id)
CI
cannot be loaded without the Cacti framework)
No behavioral changes. Defense-in-depth hardening only.