Koha-clms/xt
Tomas Cohen Arazi c4f97357c0
Bug 40579: Add author test for CSV formula injection protection
This test ensures all Text::CSV usage in Koha includes proper formula
injection protection to prevent CSV formula injection attacks.

The test scans all Perl modules and verifies that Text::CSV constructors
include the 'formula' parameter set to a safe mode ('empty', 'die',
'croak', 'diag', or numeric 1-5).

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove xt/author/Text_CSV_Various.t
=> FAIL: Test should fail showing files without formula protection:
   - Koha/Patrons/Import.pm
   - Koha/BackgroundJob/ImportKBARTFile.pm
   - Koha/ERM/EUsage/CounterFile.pm
3. Apply the follow-up patch to fix the violations
4. Repeat 2
=> SUCCESS: All tests should pass
5. Sign off :-D

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2025-09-02 16:34:16 +01:00
..
author Bug 40579: Add author test for CSV formula injection protection 2025-09-02 16:34:16 +01:00
api.t Bug 38929: Add 2 exceptions 2025-04-22 23:02:24 +02:00
check_makefile.t Bug 39304: Make sure git commands return something 2025-06-19 12:27:18 +02:00
find-license-problems.t Bug 40419: Changes to testing logic 2025-08-01 14:50:29 +02:00
find-misplaced-executables.t
…
find-missing-auth_checks.t Bug 24879: Exclude koha_perl_deps.pl 2024-04-03 17:05:51 +02:00
find-missing-csrf.t Bug 39304: Make sure git commands return something 2025-06-19 12:27:18 +02:00
find-missing-filters.t Bug 39304: Make sure git commands return something 2025-06-19 12:27:18 +02:00
find-missing-op-in-forms.t Bug 39304: Make sure git commands return something 2025-06-19 12:27:18 +02:00
js_tidy.t Bug 36374: flag JS files to keep tidy 2024-04-29 15:19:33 +02:00
single_quotes.t Bug 39304: Make sure git commands return something 2025-06-19 12:27:18 +02:00
tt_valid.t
…
verify-debian-docbook.t
…
verify-yarnlock.t Bug 37490: Add a test to detect when yarn.lock is not updated 2024-09-02 12:13:47 +02:00
verify_bib1.att.t Bug 32741: Regression tests 2023-02-02 11:59:26 -03:00
vue_tidy.t Bug 33625: Adjust test to deal with cypress tests 2023-05-17 10:24:59 -03:00
yaml_valid.pl
…
yaml_valid.t Bug 28617: (QA follow-up) Restore FindBin in two places 2021-12-07 12:16:28 -10:00