Koha-clms/xt
Tomas Cohen Arazi c3a41742af
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: Lucas Gass <lucas@bywatersolutions.com>
2025-08-29 10:43:39 -06:00
..
author Bug 40579: Add author test for CSV formula injection protection 2025-08-29 10:43:39 -06:00
api.t
…
check_makefile.t
…
find-license-problems.t
…
find-misplaced-executables.t
…
find-missing-auth_checks.t
…
find-missing-csrf.t
…
find-missing-filters.t
…
find-missing-new-lines-at-the-end-of-file.t
…
find-missing-op-in-forms.t
…
js_tidy.t
…
perltidy.t
…
pl_valid.t
…
single_quotes.t
…
tt_tidy.t
…
use-test-no-warnings.t
…
verify-debian-docbook.t
…
verify-yarnlock.t
…
verify_bib1.att.t
…
vue_tidy.t
…
yaml_valid.pl
…
yaml_valid.t
…