7 Commits
Author SHA1 Message Date
Thomas Vincent bd1577a6c7 ci(security): add Semgrep rules for stored XSS and form_selectable_cell (#8550)
The XSS rule only modelled request variables, so stored text such as device
descriptions, graph titles, notes, SNMP strings and plugin hook output was
never reported. form_selectable_cell() prints its contents verbatim and had no
rule at all.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-11-01 17:42:28 +00:00
Thomas Vincent ff31e051dd fix(a11y): [develop] correct labels, document semantics and duplicate IDs (#8295)
* fix(a11y): [develop] correct labels, document semantics and duplicate IDs

Associates form controls with their labels, replaces obsolete tt markup, removes duplicate element IDs, and adds a native accessibility browser suite with its database fixture.

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

* fix(a11y): validate label IDs and recognize attribute escaping

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

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-10-26 23:19:18 +00:00
Thomas Vincent 17638efecc ci(security): correct Semgrep request sources and HTML escaping rules (#8452)
* ci(security): treat grv() and gnrv() as Semgrep request sources

The gating XSS rule missed the short request helpers, the header() rule trusted HTML escapers that do not stop an off-site redirect, and the advisory taint rules missed get_request_var().

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

* ci(security): gate Semgrep on new findings for every event

The new sources also match values an earlier gfrv() validated, so a whole-tree result cannot gate pushes; a single job keeps results stable run to run.

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

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-10-23 10:38:03 -06:00
Thomas Vincent 08c02d3322 security: resolve open code scanning alerts (#8003)
* security: resolve open code scanning alerts

* test(security): constrain SQL helper sanitizer

* fix(security): address follow-up review
2026-09-06 08:41:47 -07:00
Thomas Vincent c02e3803a5 fix(security): resolve automation taint findings (#7848) 2026-08-30 14:06:18 -07:00
Thomas Vincent 5a71037953 ci(security): scope Semgrep SARIF to changed PHP files (#7767) 2026-08-23 14:33:41 -07:00
0a73b61d08 ci(security): add Cacti-aware Semgrep taint rules (#7730)
* ci(security): add Cacti-aware Semgrep taint rules

Off-the-shelf PHP SAST does not model Cacti's request helpers, escaping
wrappers, or db_* API, so it misses request-variable to SQL/shell/RRDtool
flows and flags htmle()-escaped output as false positives. These rules teach
the scanner Cacti's sources (grv/gnrv), sanitizers (db_qstr, sanitize_sql_column,
cacti_escapeshellarg, html_escape, casts) and sinks. The SQL rule independently
flags the host_id sink in lib/html_graph.php.

The rule self-test is a hard gate; the whole-tree scan is advisory and its
findings go to the code-scanning tab (grv() is validated where a filter is
registered, which Semgrep cannot see, and taint over large files is not
deterministic enough for a pass/fail baseline).

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

* Potential fix for pull request finding

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

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Co-authored-by: TheWitness <thewitness@cacti.net>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-08-15 14:04:00 -07:00