Koha-clms/xt
Tomas Cohen Arazi a0ef38c4c3
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: Jesse Maseto <jesse@bywatersolutions.com>
2025-08-28 12:02:40 -04:00
..
author Bug 40579: Add author test for CSV formula injection protection 2025-08-28 12:02:40 -04:00
api.t Bug 37302: Set test to failed if swagger-cli missing 2024-08-28 20:06:11 +00:00
check_makefile.t Bug 34911: Test files from HEAD instead of 'master' 2023-10-04 09:15:35 -04:00
find-license-problems.t
…
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 34478: Add test to catch missing op in POST forms 2024-03-01 10:58:14 +01:00
find-missing-filters.t Bug 33743: Make xt/find-missing-filters.t and xt/single_quotes.t check directories in git index only 2023-05-16 12:56:41 +02:00
find-missing-op-in-forms.t Bug 36190: (QA follow-up) Tidy 2024-03-15 09:38:53 +01:00
js_tidy.t Bug 36374: flag JS files to keep tidy 2024-04-29 15:19:33 +02:00
single_quotes.t Bug 33743: Make xt/find-missing-filters.t and xt/single_quotes.t check directories in git index only 2023-05-16 12:56:41 +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-11-15 20:43:22 +00: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
…