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 Bug 40433: Add missing maxLength to item, library and patron 2025-07-21 14:01:28 -06:00
check_makefile.t Bug 40444: Add Test::NoWarnings to xt tests 2025-07-28 16:26:37 -06:00
find-license-problems.t Bug 40419: Changes to testing logic 2025-07-18 11:09:54 -06:00
find-misplaced-executables.t Bug 40444: Add Test::NoWarnings to xt tests 2025-07-28 16:26:37 -06:00
find-missing-auth_checks.t Bug 40444: Add Test::NoWarnings to xt tests 2025-07-28 16:26:37 -06:00
find-missing-csrf.t Bug 40444: Add Test::NoWarnings to xt tests 2025-07-28 16:26:37 -06:00
find-missing-filters.t Bug 40444: Add Test::NoWarnings to xt tests 2025-07-28 16:26:37 -06:00
find-missing-new-lines-at-the-end-of-file.t Bug 40541: Add missing new line at the end of files when missing 2025-07-31 12:42:09 -06:00
find-missing-op-in-forms.t Bug 40444: Add Test::NoWarnings to xt tests 2025-07-28 16:26:37 -06:00
js_tidy.t Bug 40444: Add Test::NoWarnings to xt tests 2025-07-28 16:26:37 -06:00
perltidy.t Bug 40444: Add Test::NoWarnings to xt tests 2025-07-28 16:26:37 -06:00
pl_valid.t Bug 39876: Apply module to other tests 2025-07-08 15:41:59 -06:00
single_quotes.t Bug 40444: Add Test::NoWarnings to xt tests 2025-07-28 16:26:37 -06:00
tt_tidy.t Bug 40315: (QA follow-up) Fix shebang for both tests 2025-07-31 12:42:07 -06:00
use-test-no-warnings.t Bug 40315: (QA follow-up) Fix shebang for both tests 2025-07-31 12:42:07 -06:00
verify-debian-docbook.t Bug 40444: Add Test::NoWarnings to xt tests 2025-07-28 16:26:37 -06:00
verify-yarnlock.t Bug 40444: Add Test::NoWarnings to xt tests 2025-07-28 16:26:37 -06:00
verify_bib1.att.t Bug 40444: Add Test::NoWarnings to xt tests 2025-07-28 16:26:37 -06:00
vue_tidy.t Bug 40444: Add Test::NoWarnings to xt tests 2025-07-28 16:26:37 -06:00
yaml_valid.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
yaml_valid.t Bug 40444: Add Test::NoWarnings to xt tests 2025-07-28 16:26:37 -06:00